Skip to content

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:

Terminal window
# Create directories for persistent data
mkdir -p docker/data docker/nuclei-templates

Docker Run

Terminal window
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:

Terminal window
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:

Terminal window
# Backup data
tar czf orbit_backup.tar.gz docker/data docker/nuclei-templates
# Restore data
tar xzf orbit_backup.tar.gz

Troubleshooting

Common issues and solutions:

  1. Container Won’t Start

    Terminal window
    # Check logs
    docker-compose logs
    # Verify configuration
    docker-compose config
  2. Permission Issues

    Terminal window
    # Fix volume permissions
    sudo chown -R 1000:1000 docker/data docker/nuclei-templates
  3. API Key Issues

    • Ensure API_ENCRYPTION_KEY is exactly 32 characters
    • Check for special characters that might need escaping

Security Best Practices

  1. API Key Security

    • Use a strong, random 32-character key
    • Consider using environment files or secrets management
    • Never share or commit your API key
  2. Network Security

    • Use internal Docker networks when possible
    • Configure reverse proxy for production use
    • Implement proper firewall rules
  3. 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