Docker Compose Installation¶
The recommended way to install IP-HOP is using Docker Compose. This provides the easiest setup and maintenance experience.
Prerequisites¶
- Docker Engine 20.10+
- Docker Compose v2.0+
Installation Steps¶
1. Download Docker Compose File¶
curl -o docker-compose.yml https://raw.githubusercontent.com/Taoshan98/ip-hop/main/docker-compose.yml
Or clone the repository:
2. Create Environment File¶
Edit .env with your configuration:
# Security
SECRET_KEY=your-secret-key-here
ENCRYPTION_KEY=your-encryption-key-here
# Database
DATABASE_PATH=/app/backend/database/iphop.db
# API Configuration
API_HOST=0.0.0.0
API_PORT=8001
# Frontend Configuration
NEXT_PUBLIC_API_URL=http://localhost:8001
Generate Secure Keys
Never use default keys in production! Generate secure values:
3. Start Services¶
4. Verify Installation¶
Check container status:
Expected output:
Check logs:
5. Access Application¶
Open browser to:
- Frontend: http://localhost:3000
- API: http://localhost:8001/docs
Configuration¶
Custom Ports¶
Edit docker-compose.yml to change ports:
Persistent Data¶
Data is stored in ./data directory by default:
Resource Limits¶
Add resource limits if needed:
Updating¶
Update to Latest Version¶
Update to Specific Version¶
Edit docker-compose.yml:
Then:
Troubleshooting¶
Container Won't Start¶
Check logs:
Permission Issues¶
Fix data directory permissions:
Port Already in Use¶
Change ports in docker-compose.yml or stop conflicting services: