Dockge: Browser-Based Docker Compose Manager for Self-Hosting
Video
Transcript
Hello and welcome to Easy Self Host!
Today, we’re going to explore an alternative way to run self-hosted applications and manage our Docker Compose files.
In the past, we’ve managed our Docker Compose files in a Git repository and ran them directly from the command line.
This method is very flexible and gives us the benefit of version control.
But sometimes, I just want to do everything in the browser and quickly experiment with some new applications.
That’s where Dockge comes in—a great app that provides a nice UI for managing and running Docker Compose files while still maintaining the file structure on the file system.
In this video, I’ll start a new stack of self-hosted apps using Dockge with very easy proxy server integration.
Now, let’s get started by running Dockge.
I’ve created a Docker Compose file that runs Dockge alongside a proxy server.
The proxy server will provide multiplexing and HTTPS for Dockge and all the apps it hosts.
For our proxy, I’m using Traefik, because it can monitor the Docker socket and automatically create proxy rules based on each app’s Docker configuration.
This means we can configure everything right within Dockge.
In the Docker Compose file, we first declare an external Docker network called proxy-net.
You can create it by running the command: docker network create proxy-net.
This network will connect our proxy server to all of our web apps.
Next, we set up two volumes: one for Traefik and one for Dockge.
The first service we define is our proxy server, Traefik, using the official Traefik image.
We need to add some command-line flags for Traefik’s configuration:
The first flag enables Docker mode, so Traefik watches Docker services for proxy rules.
Another flag ensures that services must explicitly opt in for Traefik to proxy them.
This gives us the control on which service to proxy to.
The next flags configure the HTTP and HTTPS ports.
The other flags handle automatic certificate creation.
I’m using Cloudflare DNS challenges for certificate generation, so we’ll need a CF_DNS_API_TOKEN in our .env file.
We also specify our email address and where to store the certificates.
In the networks section, we connect Traefik to proxy-net so it can access other self-hosted apps.
For ports, we publish 80 and 443 for HTTP and HTTPS.
For volumes, we map the Docker socket into the container.
We only need to give Traefik read-only access because it does not need to modify any Docker Container.
We also mount the traefik volume at /letsencrypt path, making sure certificates are persisted.
Now, let’s look at the Dockge service.
It uses the official Dockge image from its author.
We connect Dockge to proxy-net so it can communicate with the proxy server.
In the environment, we set DOCKGE_STACKS_DIR to define where Dockge stores its managed Docker Compose files.
For volumes, we map the Docker socket again, since Dockge needs to manage containers.
We also mount the dockge volume to store Dockge’s persistent data.
Finally, we map the same host and container path for the managed Docker Compose files.
It’s required by Dockge that these 2 paths must be the same.
To enable Traefik’s proxy rules for Dockge, we add labels to the Dockge service:
• The first label enables Traefik’s proxy for this service.
• The second specifies Dockge’s port, though this is optional if only one port is exposed.
• Another label sets a hostname for Dockge, and I’m using dockge.home.easyselfhost.com.
• The final two labels make Traefik serve Dockge over HTTPS by default and tell it which certificate resolver to use.
That’s all for the Docker Compose file.
From our server’s command line, let’s navigate to the directory where our Docker Compose file for Dockge is located.
Here, let run the command docker compose up -d to start the Docker Compose.
After this, we can go to our browser and navigate to the hostname we assign to Dockge.
We’ll need to register an account for Dockge the first time we visit.
Once that’s done, we’ll be inside the Dockge interface.
Now, let’s create our first Docker Compose stack in Dockge.
We’ll start with something simple, like Vaultwarden—a password manager that only needs a single Docker service.
Let’s name this new stack “vaultwarden.”
Within this stack, we’ll add the Vaultwarden container.
Dockge automatically adds an nginx container by default, but we don’t need it, so go ahead and remove it.
Click the “Edit” button on the Vaultwarden container to configure it.
In these forms, we can specify all the container details:
First, set the Docker image to vaultwarden/server.
We don’t need to set any ports manually here because we’ll rely on our proxy server for external access.
For volumes, Dockge doesn’t directly support creating new volumes from the UI, but we can switch to the Docker Compose editor to define a volume there.
Then, we’ll mount that volume to Vaultwarden’s data directory.
The restart policy is already set for us, and Vaultwarden doesn’t require any environment variables by default.
For networking, we need to connect Vaultwarden to the proxy-net network.
Let’s enable proxy-net in the External Networks panel, then select it in the Networks section for this container.
Dockge also offers a field to specify a URL for the container, but this is just for reference and doesn’t affect the configuration.
Next, we’ll add the Traefik labels in the Docker Compose editor to create a proxy rule for Vaultwarden.
Make sure to assign a new hostname to the Vaultwarden container so Traefik knows how to route requests.
Now, click “Deploy” to launch the container.
Dockge includes a terminal where you can view the container’s logs, and you’ll see that Vaultwarden is up and running.
Open the URL you configured, and you’ll land right inside the Vaultwarden app.
Now, let’s try something a bit more complex that involves multiple containers.
We’ll use Docmost, the note-taking app I mentioned before.
Docmost requires Redis, Postgres, and the Docmost server itself.
Like before, we’ll start by naming our new stack.
When dealing with multiple containers, I find it much easier to use the Compose editor directly.
I’ll paste my Docker Compose file here, and we can see it sync up with the UI right away.
This Compose file is basically the same as in my previous video, except I’ve added Traefik labels to enable a proxy rule.
Now, let’s click “Deploy” to launch this Docker Compose stack.
Once it’s up, we can go to the Docmost hostname and start using the app immediately.
Back in Dockge, we also have several management tools for our containers.
We can restart the entire Docker Compose setup with just one click.
We can also stop the stack if needed.
There’s an “Update” button that pulls the latest Docker images, making it easy to keep apps up to date.
Additionally, for each container, there’s a built-in “Bash” button.
This opens an interactive terminal inside the container, same to what you’d get by running a docker exec command.
All these features make quick management tasks much more convenient.
Dockge stores all the Docker Compose files it manages right in the directory we specified
So you can easily back them up or customize them later if you want.
That’s it for this video!
If you found this helpful, consider subscribing for more self-hosting content.
You’ll find all the configuration files on GitHub—just check the description below.
Thanks for watching, and see you next time!