littleshop/Hostinger/FIX_VIA_CONSOLE.md
SysAdmin e1b377a042 Initial commit of LittleShop project (excluding large archives)
- BTCPay Server integration
- TeleBot Telegram bot
- Review system
- Admin area
- Docker deployment configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 15:07:38 +01:00

2.9 KiB

Fix BTCPay via Hostinger Console Access

Since SSH access isn't working, use the Hostinger web console:

Step 1: Access Hostinger Console

  1. Go to https://hpanel.hostinger.com/
  2. Login to your Hostinger account
  3. Find VPS server: srv1002428.hstgr.cloud
  4. Click on the server
  5. Look for "Console" or "VNC Console" or "Browser Terminal"
  6. Click to open web-based terminal

Step 2: Login via Console

Username: ubuntu
Password: (the one you set during hardening)

OR if that doesn't work:

Username: root
Password: Th3fa1r13sd1d1t.

Step 3: Diagnose the Issue

Run these commands to see what's wrong:

# Become root if logged in as ubuntu
sudo su -

# Check container status
docker ps -a | grep -E "btcpay|nginx|postgres"

# Look for stopped containers
docker ps -a | grep Exited

Step 4: Fix Based on What You Find

If BTCPay container is "Exited":

# Start it
docker start generated_btcpayserver_1

# Check logs for why it crashed
docker logs generated_btcpayserver_1 --tail 100

If Postgres is "Exited":

# Start database first
docker start generated_postgres_1

# Wait 10 seconds
sleep 10

# Then start BTCPay
docker start generated_btcpayserver_1

If all containers are running but still 502:

# Full restart
cd /opt/btcpayserver-docker
./btcpay-restart.sh

# Wait 2 minutes for services to fully start
sleep 120

# Check status
docker ps

If containers keep crashing:

# Check disk space
df -h /

# If disk is full (>90%):
docker system prune -a --volumes
# WARNING: Type 'y' carefully - this removes unused data

# Check memory
free -h

# If memory is low (<500MB free):
systemctl restart docker

Step 5: Nuclear Option - Rebuild

If nothing works:

# Stop everything
cd /opt/btcpayserver-docker
docker-compose down

# Restart with fresh build
source /opt/.env
./btcpay-setup.sh -i

Step 6: Monitor the Fix

# Watch containers starting
watch docker ps

# In another console tab, monitor logs
docker logs -f generated_btcpayserver_1

What to Look For in Logs

Good signs:

  • "BTCPay Server started"
  • "Listening on port"
  • "Connected to NBXplorer"

Bad signs:

  • "Cannot connect to database"
  • "Port already in use"
  • "Out of memory"
  • "No space left on device"

If Database is Corrupted

# Last resort - reset database (loses data!)
docker-compose down
docker volume rm generated_postgres_datadir
./btcpay-setup.sh -i

Re-enable SSH Access

While in console, fix SSH:

# Re-add your SSH key for ubuntu user
mkdir -p /home/ubuntu/.ssh
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDoUnUn5wsJyelx5NAzP1lrcTBKAV93m8R1hlR0ZU07Z vps-hardening-20250910" > /home/ubuntu/.ssh/authorized_keys
chown -R ubuntu:ubuntu /home/ubuntu/.ssh
chmod 700 /home/ubuntu/.ssh
chmod 600 /home/ubuntu/.ssh/authorized_keys

# Restart SSH
systemctl restart sshd

Then test from your local machine:

ssh -p 2255 -i vps_hardening_key ubuntu@thebankofdebbie.giize.com