Docker Deployment
Docker Deployment Guide
This guide will help you deploy Orbit using Docker and Docker Compose.
Prerequisites
Before you begin, ensure you have:
- Docker Engine installed (version 20.10.0 or higher)
- Docker Compose V2 installed
Quick Start
The fastest way to get Orbit running with Docker:
# Create directories for persistent datamkdir -p docker/data docker/nuclei-templates
Docker Run
docker run -d \ --name orbit \ -p 8090:8090 \ -v ./docker/data:/app/pb_data \ -v ./docker/nuclei-templates:/app/nuclei-templates \ ghcr.io/orbitscanner/orbit:latest
Docker Compose
Create a docker-compose.yml
file with the following contents:
version: '3.8'
services: orbit: image: ghcr.io/orbitscanner/orbit:latest restart: unless-stopped environment: - API_ENCRYPTION_KEY=12345678901234567890123456789012 # Change this! - DEBUG=1 # Enable debug output volumes: - ./docker/data:/app/pb_data - ./docker/nuclei-templates:/app/nuclei-templates ports: - "8090:8090" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8090/_/"] interval: 10s timeout: 5s retries: 3 start_period: 5s logging: driver: "json-file" options: max-size: "10m" max-file: "3"
Then start Orbit:
docker-compose up -d
# Access the web interface at http://localhost:8090
Configuration Details
Environment Variables
API_ENCRYPTION_KEY
: A 32-character key used for encryption (required)DEBUG
: Enable debug output (optional, set to 1 to enable)
Volumes
/app/pb_data
: Persistent storage for Orbit data/app/nuclei-templates
: Custom nuclei templates directory
Ports
8090
: Main web interface and API
Health Checks
The Docker container includes health checks to monitor the application status:
healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8090/_/"] interval: 10s timeout: 5s retries: 3 start_period: 5s
Logging
Log rotation is configured to prevent disk space issues:
logging: driver: "json-file" options: max-size: "10m" max-file: "3"
Data Persistence
Docker volumes are used to persist data:
# Backup datatar czf orbit_backup.tar.gz docker/data docker/nuclei-templates
# Restore datatar xzf orbit_backup.tar.gz
Troubleshooting
Common issues and solutions:
-
Container Won’t Start
Terminal window # Check logsdocker-compose logs# Verify configurationdocker-compose config -
Permission Issues
Terminal window # Fix volume permissionssudo chown -R 1000:1000 docker/data docker/nuclei-templates -
API Key Issues
- Ensure
API_ENCRYPTION_KEY
is exactly 32 characters - Check for special characters that might need escaping
- Ensure
Security Best Practices
-
API Key Security
- Use a strong, random 32-character key
- Consider using environment files or secrets management
- Never share or commit your API key
-
Network Security
- Use internal Docker networks when possible
- Configure reverse proxy for production use
- Implement proper firewall rules
-
Data Security
- Regular backups of the data volume
- Proper permissions on mounted volumes
- Monitor disk space usage
Next Steps
- Configure custom nuclei templates
- Set up monitoring
- Implement backup strategies