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)
sudo apt update && sudo apt upgrade -yInstall Docker
Dockge requires Docker and Docker Compose. Install Docker using the official 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/nullsudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugindocker --version
docker compose version
sudo systemctl enable docker
sudo systemctl start dockerCreate Directory Structure
Dockge requires two directories: one for its own data and another for your stacks.
sudo mkdir -p /opt/dockge/data
sudo mkdir -p /opt/stacksDeploy Dockge
Navigate to the Dockge directory and create the compose file:
cd /opt/dockgesudo nano compose.yamlversion: "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/stackssudo docker compose up -d✅ Success! Dockge is now running. Access it at http://YOUR_VPS_IP:5001
Initial Setup
Access the Dockge web interface at http://YOUR_VPS_IP:5001
First-Time Configuration
- 1. Open your browser and navigate to your Dockge URL
- 2. Create an admin account with a strong password
- 3. Store your credentials securely
- 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.
Configure Firewall
If you're using UFW, allow access to Dockge:
# 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 statusFor production environments, restrict access to specific IP addresses:
# Allow only your IP to access Dockge
sudo ufw allow from YOUR_IP_ADDRESS to any port 5001Set Up Reverse Proxy with SSL
For production deployments, run Dockge behind a reverse proxy with SSL:
sudo apt install -y nginx certbot python3-certbot-nginxsudo nano /etc/nginx/sites-available/dockgeserver {
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;
}
}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.comUpdate Dockge to Listen on Localhost Only
ports:
- "127.0.0.1:5001:5001"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/tcpDeploy Your First Stack
With Dockge running, deploy containerized applications through the web interface:
Quick Start
- 1. Click + Compose in the Dockge dashboard
- 2. Enter a name for your stack (e.g.,
nginx-demo) - 3. Paste or write your compose configuration
- 4. Click Deploy
version: "3.8"
services:
nginx:
image: nginx:alpine
container_name: nginx-demo
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./html:/usr/share/nginx/html:roDockge will create the stack directory in /opt/stacks/nginx-demo/ and manage the compose file for you.
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
Backup Strategy
Implement regular backups for your Dockge installation:
sudo nano /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"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 -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
Updating Dockge
To update Dockge to the latest version:
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.
Troubleshooting
Dockge Won't Start
Check the container logs:
sudo docker logs dockgeCommon issues: permission problems or port conflicts.
Cannot Connect to Web Interface
Verify container is running and check firewall:
sudo docker ps
sudo ufw statusStacks Not Appearing
Ensure the stacks directory is correctly mounted:
ls -la /opt/stacksWebSocket 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.
