Homelab nhiều stack Docker Compose nhưng GUI kiểu Portainer đôi khi lệch với file compose.yml bạn deploy bằng SSH. Dockge — từ tác giả Uptime Kuma — là lựa chọn gọn: stack lưu thư mục thật, vẫn docker compose trên CLI.
Why I looked at Dockge (instead of defaulting to Portainer)
Many homelab guides start with Portainer — familiar and feature-rich. On personal servers I keep hitting three frictions:
| Issue | What it feels like in practice |
|---|---|
| CLI habit | docker compose up -d / logs -f is often faster than clicking through menus |
| Compose “outside” the UI | Stacks deployed from files under /opt or /home do not always line up with Portainer’s internal Stack workflow |
| Wide UI | Enterprise/cluster features I do not need on 1–2 VPS → dense navigation for daily tasks |
I recently moved day-to-day stack management to Dockge — a good fit for GUI + CLI in parallel, with stacks living on a path you own. This post is my install and workflow notes on homelab servers.
What is Dockge?
Dockge is a web-based Docker manager (MIT) by louislam (creator of Uptime Kuma). What I use day to day:
- Manage
compose.yaml/compose.yml: create, edit, deploy, stop, restart, pull updates, delete. - In-browser compose editor plus stacks on disk — SSH and run
docker composeas usual. - Web terminal on the host and per-container shells (
>_). docker run→ compose when you need a quick conversion.- Dockge Agents: attach multiple hosts and operate from one UI (handy for VPS + home lab).
It does not replace knowing Docker — it reduces context switching between “files on disk” and “control panel”.
Prerequisites
- Linux (Debian 11+, Ubuntu, CentOS, …) on a VPS or homelab box.
- Docker Engine + Docker Compose v2 (
docker compose). - Port 5001 open (default) or another host mapping in compose.
Install Dockge (upstream compose)
From the Dockge README:
mkdir -p /opt/stacks /opt/dockge
cd /opt/dockge
curl -fsSL https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml -o compose.yaml
docker compose up -d
Open http://<IP>:5001 — create the admin account on first visit.
Stacks you create in the UI default under /opt/stacks (per upstream volume layout).
Important: DOCKGE_STACKS_DIR when stacks already exist
If you already keep compose projects under /home/... (or elsewhere), edit Dockge’s compose.yaml: stack volumes must use absolute paths, left side equals right side, and set the env var:
services:
dockge:
image: louislam/dockge:1
restart: unless-stopped
ports:
- "5001:5001"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/app/data
- /home:/home
environment:
- DOCKGE_STACKS_DIR=/home
Read the upstream comments — a wrong bind can write data to the wrong place. When stacks already live under /home, mount /home:/home and set DOCKGE_STACKS_DIR=/home as shown above.
Workflow: deploy a sample stack (e.g. Memos)
- + Compose → set stack name (folder + stack id).
- Paste
compose.yml(e.g. self-hosted Memos). - Deploy → open the app from the port link on the card.
Toolbar (short map):
| Control | CLI-ish meaning |
|---|---|
| Edit | Change compose on disk |
| Restart | Restart the stack |
| Update | Pull newer images |
| Stop | docker compose stop |
| Stop & Recreate | down + redeploy |
| Delete | Remove the stack |
In parallel: SSH, cd the stack folder, run docker compose ps / logs — one source of truth.
Console & Agents
- Console (UI corner): host shell when you do not want a separate SSH tab.
>_on a container: same idea asdocker exec.- Add Agent: URL + credentials for Dockge on another machine → left menu aggregates stacks; new stacks can target a chosen host.
When Dockge, when not?
Good fit: homelab, a few VPS boxes, compose-first workflows, light UI without giving up CLI.
Look elsewhere: large-team RBAC, Kubernetes, enterprise policy — Dockge is not aimed there.
Wrap-up
Dockge lets me avoid choosing either GUI or CLI: compose files sit where I back them up; the panel is for fast control. Always verify versions against the official repo.
Read more: Dockge on GitHub · Uptime Kuma
Vì sao tôi quan tâm Dockge (thay vì “mặc định” Portainer)
Nhiều hướng dẫn homelab giới thiệu Portainer — đúng là quen thuộc và đầy tính năng. Trên server cá nhân, tôi thường gặp ba friction:
| Vấn đề | Thực tế khi self-host |
|---|---|
| Thói quen CLI | docker compose up -d / logs -f nhanh hơn click qua nhiều màn |
| Compose “ngoài” Portainer | Stack deploy bằng file trong /opt hoặc /home đôi khi không khớp với cách Portainer quản Stack nội bộ |
| UI quá rộng | Tính năng enterprise/cluster không cần cho 1–2 VPS → menu dày, khó tìm thao tác hàng ngày |
Gần đây tôi chuyển sang Dockge — phù hợp kiểu vừa GUI vừa CLI, stack nằm trên filesystem bạn chọn. Bài này là ghi chép cài đặt + workflow tôi đang dùng trên homelab.
Dockge là gì?
Dockge là Docker manager qua web, MIT, do louislam (tác giả Uptime Kuma). Điểm tôi dùng hàng ngày:
- Quản lý
compose.yaml/compose.yml: tạo, sửa, deploy, stop, restart, update image, xóa. - Editor compose trong UI + stack lưu dưới thư mục cấu hình — vẫn SSH vào chạy
docker composenhư bình thường. - Web terminal (host) và shell vào container (
>_). docker run→ compose (convert nhanh khi cần).- Dockge Agents: gắn nhiều host, quản lý tập trung một UI (hữu ích khi có VPS + máy nhà).
Không phải thay thế kiến thức Docker — chỉ giảm context switch giữa “file trên disk” và “panel quản lý”.
Chuẩn bị
- Linux (Debian 11+, Ubuntu, CentOS, …) trên VPS hoặc homelab.
- Docker Engine + Docker Compose v2 (
docker compose). - Mở port 5001 (mặc định Dockge) hoặc map port khác trong compose.
Cài Dockge (compose chính thức)
Theo README Dockge:
mkdir -p /opt/stacks /opt/dockge
cd /opt/dockge
curl -fsSL https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml -o compose.yaml
docker compose up -d
Truy cập: http://<IP>:5001 — lần đầu tạo tài khoản admin.
Stack bạn tạo trong UI mặc định nằm dưới /opt/stacks (cùng cấu hình volume trong compose.yaml upstream).
Quan trọng: DOCKGE_STACKS_DIR khi đã có stack cũ
Nếu bạn đã có compose trong /home/... (hoặc path khác), sửa compose.yaml của Dockge: volume stack phải là đường dẫn tuyệt đối, trái = phải, và khai báo env:
services:
dockge:
image: louislam/dockge:1
restart: unless-stopped
ports:
- "5001:5001"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/app/data
- /home:/home
environment:
- DOCKGE_STACKS_DIR=/home
Đọc comment trong file upstream — map sai path có thể ghi dữ liệu nhầm chỗ. Pattern phổ biến khi stack đã nằm trong /home là mount /home:/home và set DOCKGE_STACKS_DIR=/home như trên.
Workflow: tạo stack Memos (ví dụ)
- + Compose → đặt Stack name (tên thư mục + stack).
- Dán nội dung
compose.yml(ví dụ Memos self-host). - Deploy → mở app qua link port trên card.
Thanh công cụ stack (tóm tắt):
| Nút | Tương đương CLI (ý nghĩa) |
|---|---|
| Edit | Sửa file compose trên disk |
| Restart | Khởi động lại stack |
| Update | Kéo image mới |
| Stop | docker compose stop |
| Stop & Recreate | docker compose down + deploy lại |
| Delete | Gỡ stack |
Song song: SSH vào server, cd thư mục stack, chạy docker compose ps / logs — cùng một nguồn sự thật.
Console & Agents
- Console (góc UI): terminal trên host — hữu ích khi không mở SSH riêng.
>_trên container: shell trong container nhưdocker exec.- Add Agent: URL + user/pass của Dockge trên máy khác → menu trái gom stack multi-host; tạo stack mới chọn host đích.
Khi nào Dockge, khi nào không?
Hợp: homelab, 1–N VPS, compose-first, muốn UI nhẹ + CLI vẫn hợp lệ.
Cân nhắc tool khác: cần RBAC team lớn, Kubernetes, policy enterprise — Dockge không nhắm tới đó.
Kết
Dockge giúp tôi không chọn một trong hai (GUI hoặc CLI): file compose nằm chỗ tôi backup, panel chỉ điều khiển nhanh. Mọi cập nhật phiên bản nên đối chiếu repo chính thức.
Đọc thêm: Dockge GitHub · Uptime Kuma
