littleshop/HOSTINGER-DEPLOYMENT.md
SilverLabs DevTeam 73e8773ea3 Configure BTCPay with external nodes via Tor
- Set up Tor container for SOCKS proxy (port 9050)
- Configured Monero wallet with remote onion node
- Bitcoin node continues syncing in background (60% complete)
- Created documentation for wallet configuration steps
- All external connections routed through Tor for privacy

BTCPay requires manual wallet configuration through web interface:
- Bitcoin: Need to add xpub/zpub for watch-only wallet
- Monero: Need to add address and view key

System ready for payment acceptance once wallets configured.
2025-09-19 12:14:39 +01:00

5.3 KiB

Hostinger Deployment Guide for LittleShop + TeleBot

Overview

This guide explains how to deploy LittleShop and TeleBot to Hostinger VPS with BTCPay Server integration.

Current BTCPay Server Setup

  • URL: https://thebankofdebbie.giize.com
  • Host: srv1002428.hstgr.cloud
  • Cryptocurrencies: BTC, DOGE, XMR, ETH, ZEC
  • API Key: 994589c8b514531f867dd24c83a02b6381a5f4a2
  • Store ID: AoxXjM9NJT6P9C1MErkaawXaSchz8sFPYdQ9FyhmQz33

Deployment Files Created

1. appsettings.Hostinger.json

  • Production configuration for LittleShop
  • Points to Hostinger BTCPay Server
  • Uses local SQLite database

2. docker-compose.hostinger.yml

  • Combined deployment for LittleShop + TeleBot
  • Network configuration for container communication
  • Volume persistence for data

3. .env.hostinger.template

  • Environment variables template
  • Copy to .env and configure

4. deploy-to-hostinger.sh

  • Automated deployment script
  • Builds and starts all services
  • Health checks included

Step-by-Step Deployment

1. Connect to Hostinger VPS

ssh root@srv1002428.hstgr.cloud -p 2255

2. Clone/Update Repository

cd /root
git clone https://git.silverlabs.uk/SilverLABS/LittleShop.git
# OR if already exists
cd LittleShop
git pull

3. Configure Environment

cp .env.hostinger.template .env
nano .env

Required configurations:

  • TELEGRAM_BOT_TOKEN - Your Telegram bot token
  • TELEGRAM_ADMIN_CHAT_ID - Your Telegram chat ID for admin messages
  • BTCPAY_WEBHOOK_SECRET - Generate a secure random string (32+ chars)

4. Run Deployment Script

./deploy-to-hostinger.sh

BTCPay Webhook Configuration

After deployment, configure the webhook in BTCPay Server:

  1. Log into BTCPay: https://thebankofdebbie.giize.com
  2. Go to Store Settings → Webhooks
  3. Add new webhook:
    • URL: http://srv1002428.hstgr.cloud:8080/api/orders/payments/webhook
    • Secret: Use the same value as BTCPAY_WEBHOOK_SECRET in .env
    • Events: Select all payment-related events

Troubleshooting

Problem: TeleBot can't create orders

Solution: Check BTCPay connection

# Check LittleShop logs
docker logs littleshop | grep -i btcpay

# Test BTCPay connectivity from container
docker exec littleshop curl https://thebankofdebbie.giize.com/api/v1/health

Problem: Payment creation fails

Possible causes:

  1. Wrong BTCPay API key or Store ID
  2. Currency not configured in BTCPay
  3. Network connectivity issues

Debug steps:

# Check detailed error logs
docker logs littleshop | grep -i error

# Verify environment variables
docker exec littleshop env | grep BTCPAY

# Test API directly
curl -X GET https://thebankofdebbie.giize.com/api/v1/stores \
  -H "Authorization: token 994589c8b514531f867dd24c83a02b6381a5f4a2"

Problem: TeleBot not responding

Solution: Check bot registration

# Check TeleBot logs
docker logs littleshop-telebot

# Verify bot token
docker exec littleshop-telebot env | grep TELEGRAM

# Restart bot
docker restart littleshop-telebot

Problem: Orders stuck in "PendingPayment"

Solution: Check webhook configuration

# Monitor webhook delivery
docker logs littleshop | grep webhook

# Test webhook manually
curl -X POST http://localhost:8080/api/orders/payments/webhook \
  -H "Content-Type: application/json" \
  -H "BTCPay-Sig: sha256=test" \
  -d '{"test": true}'

Service URLs

External Access

Internal Container Network

Monitoring

View Real-time Logs

# All services
docker-compose -f docker-compose.hostinger.yml logs -f

# Specific service
docker logs -f littleshop
docker logs -f littleshop-telebot

Check Service Status

docker-compose -f docker-compose.hostinger.yml ps

Resource Usage

docker stats

Backup

Database Backup

# Backup LittleShop database
docker exec littleshop sqlite3 /app/data/littleshop.db ".backup /app/data/backup.db"
docker cp littleshop:/app/data/backup.db ./littleshop-backup-$(date +%Y%m%d).db

# Backup TeleBot database
docker exec littleshop-telebot sqlite3 /app/data/telebot.db ".backup /app/data/backup.db"
docker cp littleshop-telebot:/app/data/backup.db ./telebot-backup-$(date +%Y%m%d).db

Full Volume Backup

# Stop services
docker-compose -f docker-compose.hostinger.yml down

# Backup volumes
docker run --rm -v littleshop_data:/data -v $(pwd):/backup alpine tar czf /backup/littleshop-data-$(date +%Y%m%d).tar.gz -C /data .

# Restart services
docker-compose -f docker-compose.hostinger.yml up -d

Update Deployment

To update to latest version:

# Pull latest code
git pull

# Rebuild and restart
./deploy-to-hostinger.sh

Security Considerations

  1. Change default passwords in production
  2. Use strong webhook secret (32+ random characters)
  3. Enable firewall for port 8080 if exposing externally
  4. Regular backups of databases
  5. Monitor logs for suspicious activity

Support Currencies

Currently configured in BTCPay:

  • BTC (Bitcoin)
  • DOGE (Dogecoin)
  • XMR (Monero)
  • ETH (Ethereum)
  • ZEC (Zcash)

To add more currencies, configure them in BTCPay Server first.