Skip to content

Setting Up Dockge with Docker

Introduction to Dockge

Dockge is a self-hosted, reactive Docker stack manager, offering an easy-to-use interface for managing Docker containers and compose stacks. It's created by the same developer as Uptime-Kuma.

Instead of directly using the setup from the project page, the following steps are recommended for a smoother setup experience:

  1. Create Dockge Directory: Navigate to the directory where you keep your Docker containers. For example, if you store them in ~/Docker, the commands would be:

    cd ~/Docker
    mkdir dockge && cd dockge

  2. Link Your Containers Directory: Check if /opt/stacks exists, and if not, create and link it to your containers' location:

    ls /opt/stacks # Check if it exists
    sudo mkdir -p /opt/stacks
    sudo ln -s <path-to-your-containers> /opt/stacks
    # Example: sudo ln -s /Users/<username>/Docker /opt/stacks
    # Do not use ~/ in the above command
    Replace <path-to-your-containers> with the actual path to your Docker containers.

  3. Download and Start Dockge: Download the compose.yaml file and start the Dockge service:

    curl --output compose.yaml

Docker Compose File (docker-compose.yml)

Here's an example docker-compose.yml file for Dockge:

version: "3.8"
    image: louislam/dockge:latest
    restart: unless-stopped
      - 5005:5001
      - /var/run/docker.sock:/var/run/docker.sock
      - ./data:/app/data
      - /opt/stacks:/opt/stacks
      - DOCKGE_STACKS_DIR=/opt/stacks

Key Components of the Configuration

Service: Dockge

  • Image: louislam/dockge:latest is the Docker image used for Dockge.
  • Ports:
  • 5005:5001 maps port 5005 on the host to port 5001 in the container, where Dockge's web interface is accessible.
  • Volumes:
  • /var/run/docker.sock:/var/run/docker.sock allows Dockge to interact with the Docker daemon.
  • ./data:/app/data provides persistent storage for Dockge's data.
  • /opt/stacks:/opt/stacks maps a local directory for Docker stacks.
  • Environment Variables:
  • DOCKGE_STACKS_DIR=/opt/stacks sets the directory path for Docker stacks within Dockge.

Deploying Dockge

  1. Save the Docker Compose configuration in a docker-compose.yml file.
  2. Run docker-compose up -d to start Dockge in detached mode.
  3. Access Dockge's web interface by navigating to http://<host-ip>:5005.

Configuring and Using Dockge

After deployment, use the Dockge web interface to manage your Docker containers, images, and stacks. The interface provides tools for monitoring, starting, stopping, and removing Docker components.

Youtube Video


Shoutout to Archigos for their awesome tips and insights that helped shape this guide! 🌟