Container Management

    Dockge Deployment

    Dockge is a modern, self-hosted Docker Compose stack manager with an intuitive web interface. Deploy it on RamNode's reliable VPS hosting for visual container management without sacrificing Docker Compose flexibility.

    Ubuntu 22.04/24.04
    Compose-Native
    ⏱️ 15-20 minutes

    What is Dockge?

    Dockge (pronounced "dockee") is an open-source project created by Louis Lam, the developer behind Uptime Kuma. It provides an elegant solution for managing Docker Compose stacks through a modern web interface.

    Key Advantages

    • • Compose-native approach
    • • Real-time terminal output
    • • Interactive editor with syntax highlighting
    • • Lightweight footprint
    • • Agent support for multiple hosts

    vs Portainer

    • • Works with standard compose.yaml files
    • • No proprietary formats
    • • Simpler interface focused on Compose
    • • Lower resource consumption
    • • Full compose file visibility

    Prerequisites

    Before beginning, ensure you have:

    Server Requirements

    • • RamNode VPS with 1GB+ RAM
    • • Ubuntu 22.04 or 24.04 LTS
    • • Root or sudo access
    • • Domain name (optional, for SSL)

    Required Ports

    • 22/TCP: SSH access
    • 5001/TCP: Dockge web UI
    • 80/TCP: HTTP (for SSL)
    • 443/TCP: HTTPS (for SSL)
    Update System
    sudo apt update && sudo apt upgrade -y
    3

    Install Docker

    Dockge requires Docker and Docker Compose. Install Docker using the official repository:

    Install Dependencies & Add Docker Repository
    # Install required dependencies
    sudo apt install -y ca-certificates curl gnupg lsb-release
    
    # Add Docker's official GPG key
    sudo install -m 0755 -d /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    sudo chmod a+r /etc/apt/keyrings/docker.gpg
    
    # Add the Docker repository
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    Install Docker Engine
    sudo apt update
    sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    Verify & Enable Docker
    docker --version
    docker compose version
    
    sudo systemctl enable docker
    sudo systemctl start docker
    4

    Create Directory Structure

    Dockge requires two directories: one for its own data and another for your stacks.

    Create Directories
    sudo mkdir -p /opt/dockge/data
    sudo mkdir -p /opt/stacks
    5

    Deploy Dockge

    Navigate to the Dockge directory and create the compose file:

    Navigate to Dockge Directory
    cd /opt/dockge
    Create compose.yaml
    sudo nano compose.yaml
    /opt/dockge/compose.yaml
    version: "3.8"
    services:
      dockge:
        image: louislam/dockge:1
        container_name: dockge
        restart: unless-stopped
        ports:
          - "5001:5001"
        volumes:
          - /var/run/docker.sock:/var/run/docker.sock
          - ./data:/app/data
          - /opt/stacks:/opt/stacks
        environment:
          - DOCKGE_STACKS_DIR=/opt/stacks
    Start Dockge
    sudo docker compose up -d

    Success! Dockge is now running. Access it at http://YOUR_VPS_IP:5001

    6

    Initial Setup

    Access the Dockge web interface at http://YOUR_VPS_IP:5001

    First-Time Configuration

    1. 1. Open your browser and navigate to your Dockge URL
    2. 2. Create an admin account with a strong password
    3. 3. Store your credentials securely
    4. 4. You're now ready to manage Docker stacks!

    💡 Tip: Use a password manager to generate and store a complex password with at least 16 characters.

    7

    Configure Firewall

    If you're using UFW, allow access to Dockge:

    Configure UFW
    # Allow SSH (if not already enabled)
    sudo ufw allow 22/tcp
    
    # Allow Dockge web interface
    sudo ufw allow 5001/tcp
    
    # Enable firewall if not already active
    sudo ufw enable
    
    # Check status
    sudo ufw status

    For production environments, restrict access to specific IP addresses:

    Restrict Access to Specific IP
    # Allow only your IP to access Dockge
    sudo ufw allow from YOUR_IP_ADDRESS to any port 5001
    8

    Set Up Reverse Proxy with SSL

    For production deployments, run Dockge behind a reverse proxy with SSL:

    Install Nginx and Certbot
    sudo apt install -y nginx certbot python3-certbot-nginx
    Create Nginx Configuration
    sudo nano /etc/nginx/sites-available/dockge
    /etc/nginx/sites-available/dockge
    server {
        listen 80;
        server_name dockge.yourdomain.com;
    
        location / {
            proxy_pass http://127.0.0.1:5001;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_read_timeout 86400;
        }
    }
    Enable Site & Get SSL Certificate
    sudo ln -s /etc/nginx/sites-available/dockge /etc/nginx/sites-enabled/
    sudo nginx -t
    sudo systemctl reload nginx
    
    # Obtain SSL certificate
    sudo certbot --nginx -d dockge.yourdomain.com

    Update Dockge to Listen on Localhost Only

    Update compose.yaml ports
    ports:
      - "127.0.0.1:5001:5001"
    Restart Dockge & Update Firewall
    cd /opt/dockge
    sudo docker compose down
    sudo docker compose up -d
    
    # Update firewall
    sudo ufw delete allow 5001/tcp
    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    9

    Deploy Your First Stack

    With Dockge running, deploy containerized applications through the web interface:

    Quick Start

    1. 1. Click + Compose in the Dockge dashboard
    2. 2. Enter a name for your stack (e.g., nginx-demo)
    3. 3. Paste or write your compose configuration
    4. 4. Click Deploy
    Example Stack: Nginx Demo
    version: "3.8"
    services:
      nginx:
        image: nginx:alpine
        container_name: nginx-demo
        restart: unless-stopped
        ports:
          - "8080:80"
        volumes:
          - ./html:/usr/share/nginx/html:ro

    Dockge will create the stack directory in /opt/stacks/nginx-demo/ and manage the compose file for you.

    10

    Managing Stacks

    Dockge provides several management features through its web interface:

    Start/Stop/Restart

    Control stack lifecycle with one click

    Logs

    View real-time container logs with search

    Terminal

    Access container shells directly in browser

    Edit

    Modify compose files with syntax highlighting

    Update

    Pull latest images and recreate containers

    Delete

    Remove stacks and optionally their data

    11

    Backup Strategy

    Implement regular backups for your Dockge installation:

    Create Backup Script
    sudo nano /opt/dockge/backup.sh
    /opt/dockge/backup.sh
    #!/bin/bash
    BACKUP_DIR="/root/backups/dockge"
    DATE=$(date +%Y%m%d_%H%M%S)
    
    mkdir -p $BACKUP_DIR
    
    # Backup Dockge data
    tar -czf $BACKUP_DIR/dockge-data-$DATE.tar.gz -C /opt/dockge data
    
    # Backup all stacks
    tar -czf $BACKUP_DIR/stacks-$DATE.tar.gz -C /opt stacks
    
    # Keep only last 7 days of backups
    find $BACKUP_DIR -type f -mtime +7 -delete
    
    echo "Backup completed: $DATE"
    Enable Daily Backups
    sudo chmod +x /opt/dockge/backup.sh
    
    # Add to crontab for daily backups at 2 AM
    (crontab -l 2>/dev/null; echo "0 2 * * * /opt/dockge/backup.sh") | crontab -
    12

    Security Best Practices

    Recommendations

    • Use strong passwords: At least 16 characters
    • Enable 2FA: When available in future versions
    • Restrict network access: Use firewall rules to limit access
    • Keep software updated: Regularly update Dockge, Docker, and OS
    • Use SSL/TLS: Always access Dockge over HTTPS in production
    • Monitor logs: Check Dockge and Docker logs for suspicious activity
    • Limit Docker socket exposure: Be aware that Dockge has full Docker access
    13

    Updating Dockge

    To update Dockge to the latest version:

    Update Dockge
    cd /opt/dockge
    sudo docker compose pull
    sudo docker compose up -d

    💡 Tip: Check the Dockge GitHub repository for release notes before updating to review any breaking changes.

    14

    Troubleshooting

    Dockge Won't Start

    Check the container logs:

    Check Logs
    sudo docker logs dockge

    Common issues: permission problems or port conflicts.

    Cannot Connect to Web Interface

    Verify container is running and check firewall:

    Check Status
    sudo docker ps
    sudo ufw status

    Stacks Not Appearing

    Ensure the stacks directory is correctly mounted:

    Check Stacks Directory
    ls -la /opt/stacks

    WebSocket Connection Issues

    If using a reverse proxy, ensure WebSocket upgrade headers are properly configured and proxy timeouts are sufficient.

    🎉 Congratulations!

    Dockge is now managing your Docker Compose stacks on your RamNode VPS. Enjoy the convenience of a modern web interface while retaining full control over your container configurations.