Moving to Production Server
Follow these steps when deploying to a production server for the first time.
Step 1: Transfer Project Files
Option A: Git Clone (Recommended)
# On production server
git clone <repository-url> /opt/claw-machine-manager
cd /opt/claw-machine-manager
Option B: SCP/RSYNC from Desktop
# From your desktop
rsync -avz --exclude 'db_data' \
/path/to/claw-machine-manager/ \
user@production-server:/opt/claw-machine-manager/
⚠️ Important: Do NOT copy the db_data/ directory or any existing database volumes.
Step 2: Configure for Production
Edit html/config.js and update the API URL:
window.APP_CONFIG = {
API_BASE_URL: 'http://your-server-ip:8000/api'
// Or use domain: 'https://api.yourdomain.com/api'
};
Edit docker-compose.yaml and update CORS origins (line 48):
CORS_ORIGINS: http://your-server-ip:56421,http://your-server-ip:8000,http://localhost:56421
Step 3: Deploy
Follow the same steps as First-Time Deployment above.
Step 4: Configure Firewall
# Allow frontend access
sudo ufw allow 56421/tcp
# Allow API access (if needed for external clients)
sudo ufw allow 8000/tcp
# Verify rules
sudo ufw status
Step 5: Verify External Access
From another machine:
curl http://your-server-ip:56421
curl http://your-server-ip:8000/api/health