Installing Dockge on Ubuntu

Dockge is a sleek, web interface designed for managing Docker Compose stacks.
Whether you’re orchestrating multiple services or just prefer a GUI over the command line, Dockge offers an intuitive experience.

Prerequisites

Before proceeding, ensure you have:

  • An Ubuntu system (20.04 LTS or newer)
  • Docker and Docker Compose installed
  • A user with sudo privileges or the user to be able to run docker without sudo

💡 Note: If Docker isn’t installed yet, refer to our Installing Docker on Ubuntu guide.

Step 1: Set Up Directories

Dockge requires a directory to function correctly so we will be creating one on our home folder
called Dockge and inside of it another folder for stacks

cd ~ # if not on home folder already
mkdir -p dockge/stacks
Bash

Step 2: Create and Run Dockge

Navigate to the Dockge directory:

cd ~/dockge # ~ = home folder
Bash

Now we have to options of how to deploy Dockge to our system. You just need need to follow one of the follow so either option 1 which is Docker Run, or, option 2 which will be via Docker Compose.

Option 1: Docker Run

Run the following command:

sudo docker run -d -p 5001:5001 --name Dockge --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v /home/$USER/dockge/dockge/data:/app/data -v /home/$USER/dockge/stacks:/home/$USER/dockge/stacks -e DOCKGE_STACKS_DIR=/home/$USER/dockge/stacks louislam/dockge:latest
Bash

📌 Remember to replace $USER with your username

Option 2: Docker Compose

Creating the Docker Compose File

Create and edit the compose.yaml file:

nano compose.yaml
Bash

Paste the following into the file:

services:
  dockge:
    ports:
      - 5001:5001
    container_name: Dockge
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/$USER/dockge/dockge/data:/app/data
      - /home/$USER/dockge/stacks:/home/$USER/dockge/stacks
    environment:
      - DOCKGE_STACKS_DIR=/home/$USER/dockge/stacks
    image: louislam/dockge:latest
networks: {}
YAML

📌 Port 5001 is used by default. If needed, replace it with a custom port.

Deploy Dockge

Run the following command to launch Dockge:

docker compose up -d
Bash

📌 This will download the image and start the service in the background.

Step 3: Access the Dockge Interface

Visit Dockge in your browser:

📌 Replace <your-server-ip> with your actual IP and if you used a different port on your deployment use that port.

On first access, you’ll be prompted to set up an admin user account.

Conclusion

You now have Dockge running on your Ubuntu server!
Enjoy an easier way to visualize and manage your Docker Compose stacks.