Ali7Zeynalli/dockgate
About
Self-hosted Docker control panel for your local daemon and remote hosts over SSH — manage containers, build & deploy, provision servers, monitor hosts, and get Telegram/email alerts.
Systems & InfrastructureMeasured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
Self-hosted control panel for Docker, Compose, Docker Swarm and your servers.
One container, one admin login, every host - local and over SSH.
Quick Start | Screenshots | Features | Swarm | Notifications | Security | Docs | Changelog | Contributing
What is DockGate?
One container that manages Docker, Compose, Docker Swarm and the servers they run on, locally and over SSH.
- Docker - containers, images, volumes, builds and networks, with logs, a terminal and file editing inside containers; each network compared with its compose files.
- Compose - projects created, deployed and updated on any server, from Git or a folder; replicas, auto-heal, Auto Scaling and updates without downtime, without Swarm.
- Deploys - your Makefile, npm scripts and shell scripts run as tasks; deploy recipes started by a Git push, with checks and roll back.
- Docker Swarm - a cluster set up in a few clicks, Compose projects moved to it and back as well protected as before, Auto Scaling, one firewall for every server.
- Servers - provisioned, secured (SSH, firewall, fail2ban, an SSH honeypot, a live view of the firewall) and monitored; cron, scripts, system settings and files.
- Databases - a PostgreSQL client for the databases in your containers, with no port opened.
- Web - uptime checks of your sites, and the proxies and certificates in front of them.
- Alerts - Telegram, email and webhooks, also from an Edge agent while DockGate is offline.
- Light - at most 256 MB RAM and 0.5 CPU; plain JavaScript, no build step, works offline.
DockGate is single-admin: one password, full control, no user roles.
Where things are
| Sidebar | What is in it |
|---|---|
| Overview | Dashboard, Monitoring (every server) |
| Docker | Resources (Containers, Images, Builds, Volumes, Networks, Cleanup), Deploy (Projects, App templates, Tasks), Swarm, Databases, Logs & events |
| Web | Uptime, Proxies & SSL |
| Servers | Servers, SSH keys, Edge agent |
| Server - the one picked in the top bar | Status (overview, graphs, alerts, logs, system info, connection), Security (SSH, users, firewall, fail2ban, honeypot, live firewall), System (names, network, time, disks and swap, kernel, config files), Software (setup, services, Docker engine, auto updates), Automation (cron, timers, scripts, schedules) |
| Tools | Terminal, Files |
| System - DockGate itself | Settings, Activity (audit log, notifications sent), Help (this guide, inside DockGate) |
Quick Start
mkdir dockgate && cd dockgate
curl -O https://raw.githubusercontent.com/Ali7Zeynalli/dockgate/main/docker-compose.yml
docker compose up -d
Open http://localhost:7077 and set the admin password. From the internet, the first setup also asks for the token printed by docker logs dockgate-control-panel.
| Update | Settings > Software update > Update now, or docker compose pull && docker compose up -d |
| Back up | the data/ folder (database, SSH keys, .master.key, compose projects); volumes from Resources > Volumes or Server > Automation > Schedules |
From source:
git clone https://github.com/Ali7Zeynalli/dockgate.git && cd dockgate
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
Container restart-loops on SELinux-confined Docker (openSUSE Leap 16 and similar)
If the container keeps restarting with SQLITE_CANTOPEN or connect EACCES /var/run/docker.sock, the Docker daemon confines containers with SELinux. Check with docker info --format '{{.SecurityOptions}}'.
Either set "selinux-enabled": false in /etc/docker/daemon.json and restart Docker:
sudo sed -i 's/"selinux-enabled": *true/"selinux-enabled": false/' /etc/docker/daemon.json
sudo systemctl restart docker
or add this to the dockgate service in docker-compose.yml:
security_opt:
- label:disable
Never add :z / :Z to the /var/run/docker.sock mount.
Screenshots
Grouped as in the sidebar. Click a group to open it.
Overview
![]() Dashboard - every server, what needs attention |
![]() Monitoring - every server, live and 48 h |
Resources
![]() Containers - stacks, filters, Swarm tasks |
![]() A container's page - logs, terminal, stats, files, updates |
![]() Topology - by stack or by network |
![]() Images - newer images, unused, pull |
![]() Volumes - backup, restore, files |
![]() Networks > Map - every network with its containers |
![]() A network's page - compared with the compose files, a fix next to each |
![]() New network - subnet checked against Docker, the LAN and VPNs |
Deploy
![]() Projects (Compose) - history, Move to Swarm |
![]() A project's page - Overview, Services, Files, Deploys, Automation, Settings |
![]() New project - Git, a folder, already on the server, YAML, template |
![]() Tasks - Makefile, npm, scripts, deploy recipes |
![]() App templates - 500+ apps |
Docker Swarm
![]() Overview - servers, tasks, events |
![]() Services - replicas, CPU, memory, ports |
![]() Service page - tasks, logs, terminal, files |
![]() Stacks - from Compose, a file or a container |
![]() Migrate - Compose projects and containers |
![]() Nodes - role, state, CPU, memory |
![]() Auto Scaling - capacity, rules, history |
![]() Firewall - published ports on every server |
![]() Secrets & configs |
![]() Overlay networks |
![]() Cluster settings - tokens, autolock, backups |
Databases, Logs, Web
![]() Databases - Explorer, tabs, data edited like a spreadsheet |
![]() Logs - one viewer everywhere, levels, live |
![]() Uptime - sites, response time, certificates |
![]() Proxies & SSL - which domain goes to which container |
![]() Certificates - who renews each one, alerts before expiry |
Server (the one picked in the top bar)
![]() Status > Overview - state and security recommendations |
![]() Status > Monitoring - host metrics, live and 48 h |
![]() Security > Access & SSH - every change tested with a new login |
![]() Security > Firewall - UFW rules, IP lists, Docker port isolation |
![]() Docker port isolation - every port checked before it is turned on |
![]() Security > Live firewall - will this connection pass? |
![]() Security > Fail2ban - bans, unban, settings |
![]() Security > Honeypot - user names and passwords tried |
![]() Software > Services - start, stop, Docker engine settings |
![]() Automation > Cron - crontabs, cron.d, timers, alerts |
![]() Automation > Scripts - 18 templates, blocks or your own shell |
Servers, Tools, System
![]() Servers - every host over SSH |
![]() Edge agent - alerts and healing while DockGate is away |
![]() Files - SFTP with a safe editor |
![]() Terminal - container and host |
![]() Notifications - channels and 36 rules |
![]() Login |
Features
Grouped as in the sidebar. Every group links to its page in the guide.
Overview
- Dashboard - every server's state, then the server in use: host metrics, counters, health, a port map, disk usage, the largest images, restarts, Smart Insights, recent activity and quick actions.
- Needs attention on all servers - containers in trouble, newer images and failed jobs from every server, each with Open to go there.
- Monitoring - CPU, memory, disk, network and containers of every server, live and for 48 hours.
Ctrl/Cmd+Kjumps to any page, container, network or server.
Resources
- Containers - table, cards or topology (by stack or by network), filters, bulk start / stop / restart, Swarm tasks in the list. Run container with ports, network, restart policy, CPUs and command.
- A container's page - stop, restart, pause, resources, recreate, commit, export; tabs for overview, logs, terminal, stats, processes, environment, ports, volumes, files (edit, upload, download), network, inspect, updates and history.
- Image updates - a daily check of every tag against its registry; a safe update with a health check, automatic roll back, version names and history.
- Images - pull, Docker Hub search, tags, layers and history, push to a registry, build from an image, save as
.tar, remove the unused ones. - Builds - from a Dockerfile, a Git URL or an inline Dockerfile, with a live log.
- Volumes - back up and restore (
.tar.gz), clone, browse and edit the files inside. - Networks - search, filters and a Map of every network with its containers. Create any driver: macvlan / ipvlan with the server's interface as parent, IPv6, MTU, bridge options, labels; the subnet is checked as you type against Docker networks, the LAN and VPN routes.
- A network's page - its containers with addresses, aliases and ports, compared with the compose files with a fix next to each difference; connect with aliases and a fixed address; Change settings (made again with every container put back, the old one restored if a step fails); Can a container reach another?; history.
- Cleanup - stopped containers, unused images, build cache, networks and volumes in one table.
Containers | Images | Builds | Volumes | Networks | Cleanup
Deploy
- Projects (Compose) - discover, create and edit projects, locally or on a server over SSH: from Git, an uploaded folder, a project already on the server, a written compose file or a template.
- A project's page - overview, services, files, deploys (history with changes, redeploy), automation and settings; edit YAML, rebuild, terminal in the folder, move to Swarm.
- Git - pull, sync and deploy, force pull; Git access with a token or an SSH key for repositories DockGate did not clone; Connect to Git for a folder that was uploaded: compare, backup, undo, or the first push to an empty repository.
- Auto-deploy in one click: a deploy recipe and its webhook.
- Scaling & health, without Swarm - replicas with one click (your compose files stay as they are), auto-heal, keep running, Auto Scaling (Off / Suggest / Auto), roll out without downtime, proxies reloaded, drift shown.
- App templates - 500+ apps as a container, a Compose project or a Swarm stack; the community list, Portainer's official list or your own URL.
- Tasks - finds the
Makefile,justfile,Taskfile.yml,package.jsonscripts,*.sh, Ansible playbooks and Kamal of a project folder and runs them with a live log: dry run, variables, run as root, cancel, history. - Env & secrets per folder: every
.envfile, encrypted and masked in logs. - Deploy recipes - Git pull, your tasks,
docker compose up, a check of a URL or a container's health, and recovery steps when a step fails; several servers, a schedule, alerts. Started by GitHub, GitLab, Bitbucket, Gitea or Forgejo webhooks (signature and branch checked) or by CI with a token; the result is marked on the commit.
Projects | Scaling & health | Connect to Git | Tasks | Templates and registries
Docker Swarm
- Set up on one server or several at once: checks, firewall ports, undo on failure; add servers later.
- Nodes - pause, drain, promote, demote, labels, remove, rebalance; each node has a page with its tasks, CPU and memory (live and 48 h), labels, events and history.
- Services - a full form, scale, update the image, Update to newest, roll back, restart, resume a paused update. Each service has a page with 16 tabs: overview, tasks, logs, terminal and files on any node, stats, environment, ports, volumes, networks, secrets, placement, updates, autoscale, events, inspect.
- Auto Scaling - adds or removes replicas when CPU or memory per replica stays high or low; suggests limits and reservations from the last 48 hours, shows the free capacity and spreads replicas over the servers.
- Stacks and Migrate - move Compose projects (whole or in part) and
docker runcontainers to Swarm and back, with limits, start order, names and local-only ports kept; new stacks from a file or a template; take over stacks made elsewhere. A move that fails puts the project back. - Protected as before - each service's protection is compared in Compose and on Swarm (user, read-only, no-new-privileges, seccomp, AppArmor, capabilities, mounts, ports); a weaker service stays in Compose unless you choose otherwise.
- Build & push - services with
build:are built, pushed to your registry and deployed from there; secrets and configs from files are versioned by content; privileged images run with only the capabilities they need; macvlan / ipvlan networks are made on every server. - Firewall - the published ports of every service on every server in one table; open or close a port on all servers at once.
- Secrets, configs, overlay networks - create, rotate, remove.
- Cluster - certificates and CA rotation, autolock and unlock-key rotation, heartbeat and Raft tuning, join tokens, nightly backups and restore, Recover cluster.
Setup and nodes | Services | Stacks and migrate | Secrets and networks | Cluster
Databases
- A client for PostgreSQL in containers (postgres, postgis, timescaledb, pgvector, supabase, bitnami...) on any server, through
docker exec psql: no port is opened. - Explorer (container, database, schema, tables, views, functions, columns, indexes, keys), tabs, right-click menus and a status bar.
- Data edited like a spreadsheet in one transaction, foreign-key links, who wrote a row, CSV import, bulk changes.
- SQL workbench - autocomplete, transactions across runs, EXPLAIN, saved queries.
- Design - columns, indexes, foreign keys, checks, triggers, new tables; Show SQL, a Test that is rolled back, save in one transaction.
- Export to SQL, CSV or Excel; import
.sqland CSV; test data that fits the columns; users and grants, sessions, VACUUM, backups with restore. - Read-only until you allow changes; every change is in the audit log.
Logs & events
- Logs - one container live, every container at once, a Swarm service, the server's own logs, and Log Doctor that points out errors. One viewer everywhere: levels, search, time range, live, download.
- Events - Docker events with filters, download as CSV.
Web
- Uptime - HTTP, SSL, TCP and DNS checks from DockGate and from your other servers (down only when every place fails): uptime, response time, incidents, certificate days left. A check can be linked to a container, a project or a Swarm service, with its logs and Restart; paused during deploys; checks suggested from your proxies.
- Proxies & SSL - finds nginx, Caddy, Traefik, HAProxy and Apache in containers and on the host, and shows which domain goes to which container, with warnings. Put a container on a domain with a preview of the exact lines.
- Certificates - every certificate watched whoever renews it (certbot, Caddy, Traefik, Nginx Proxy Manager, acme-companion), alerts before expiry, Why?, fix for one that expired. Let's Encrypt by DockGate, also wildcards through Cloudflare DNS. All servers in one list.
- Config editor - every save is checked (
nginx -t,caddy validate,haproxy -c,configtest), reloaded and tested on the sites; the old file goes back if anything fails; history. - Load balancing, access-log stats and Traefik live routers.
Servers
- Servers - hosts over SSH (password, key, key with passphrase), each with an optional access password asked once per session.
- SSH keys - key pairs for Git deploys: generate (ed25519 or RSA) or import, copy the public key to GitHub or GitLab as a deploy key. The private key is encrypted and never shown.
- Edge agent - a small agent on each server with no network port: alerts while DockGate is offline, and the replicas, auto-heal and Auto Scaling rules, only when signed by your DockGate.
Servers, SSH keys, Edge agent | Agent security
Server (the one picked in the top bar)
- Status - overview with security recommendations, monitoring, alert limits for this server, host logs, system info. Connection: test, add the user to the
dockergroup, re-trust the host key after a rebuild, access password, alerts on or off. - Security > Access & SSH, Users & keys - root and password login, SSH port, timeouts, users and their keys; every change is tested with a new login and undone if it fails.
- Security > Firewall - UFW (or firewalld), inbound and outbound rules, IP lists, Docker port isolation that shows for every port, before it is turned on, whether it stays open.
- Security > Live firewall - the rules the kernel really holds and where each comes from, will this connection pass?, rules left behind with a fix, connections dropped in the last hour.
- Security > Fail2ban, Honeypot - bans, unban, settings; an SSH honeypot on port 22 once SSH has moved: every address that connects is banned on every port, the user names and passwords tried are shown, bans can be shared with every server.
- System - hostname and hosts, network with automatic rollback, time sync, disks (fstab, swap file, swappiness), kernel and limits, config files edited with checks (
sshd -t,visudo,findmnt). - Software - Setup with 12 components (system update, base tools, time sync, UFW, SSH hardening, fail2ban, security updates, swap file, Docker and Compose, Docker log limits, deploy user, Docker group) and presets; services; Docker engine settings; auto updates.
- Automation - cron jobs (crontabs, cron.d, edit with diff, run now, failed / did not run alerts), systemd timers, scripts (18 templates, a block builder or your own shell, run once or scheduled), and schedules (prune, volume backup, database backup, Git sync, and everything scheduled on a server in one list).
Tools
- Terminal - in a container or on the server;
Ctrl+`opens a quick terminal from any page. - Files - an SFTP file manager with two-pane transfers, preview, log tail, extract archives, permissions, Places and bookmarks, and a safe editor (checks, diff before save, earlier versions, sudo for root-owned files).
Ctrl+Shift+Fopens Quick Files over any page.
System
- Settings - theme, timezone, default shell, start with Docker; admin password and sign out everywhere; notification channels, muted servers and the 36 rules; registry logins (test the login, browse repositories and tags); software update.
- Activity - the audit log (what, on which server, from where) and the notifications sent.
- Help - this guide, inside DockGate.
Notifications
Channels: Telegram, SMTP email and webhook (Slack, Discord, Teams, ntfy, JSON). There are 36 rules, each with an on / off switch and a cooldown:
| Group | Rules |
|---|---|
| Containers | stopped / crashed / OOM, restarted, unhealthy, started, paused, unpaused |
| Docker | disk usage, build failed, newer image, image updated, image update failed, scheduled task failed |
| Servers | down, back, disk, memory, CPU - shared or per-server limits; cron job failed, cron job did not run |
| Firewall | web traffic (80 / 443) blocked by the firewall, Docker port isolation rules left behind |
| Sites | site down, back up, slow (Uptime); certificate expires soon, certificate invalid |
| Deploy | deploy failed, deploy finished (Tasks recipes) |
| Compose | auto-heal restarted a container (or gave up), Auto Scaling changed a service or the server was full |
| Swarm | service short of replicas, node down / back, update rolled back, quorum lost, autoscale changed a service |
The optional Edge agent runs on each server, makes only outbound connections and sends alerts directly - behind NAT, and when DockGate is offline. It also keeps the Scaling & health rules there (replicas, auto-heal, Auto Scaling) while DockGate is away; it takes them only signed by the DockGate that installed it.
Security
- One admin password (scrypt), an HMAC-signed HttpOnly session cookie, a login rate limit, and a setup token for the first setup from the internet.
- Every API route and WebSocket needs a session; cross-origin changes are refused.
- SSH, registry and channel secrets, the Swarm unlock key and stack variables are encrypted at rest (AES-256-GCM).
- Every change is in the audit log with the server and source IP; SSH host keys are pinned.
- The Edge agent has no network port: DockGate signs every rule and command with an Ed25519 key only it holds (one per install), the agent checks signature, server, order and age, and does only a short list of actions within their limits - details.
- The Docker socket is root on the host: keep port 7077 off the internet and use a VPN such as NovusGate or an SSH tunnel.
Limitations: single admin; self-update only for DockGate's own host; provisioning needs root or passwordless sudo; Docker port isolation needs UFW; Swarm volumes stay on their server, and files changed inside a Swarm task are lost when the task is replaced.
Configuration
| Env var | Default | |
|---|---|---|
PORT, BIND_HOST |
7077, 0.0.0.0 |
where DockGate listens |
DATA_DIR |
./data |
database, keys, Swarm backups |
DG_MASTER_KEY |
generated | AES key for secrets at rest |
DG_SESSION_SECRET |
generated | session cookie key |
COOKIE_SECURE |
false |
true behind HTTPS |
TRUST_PROXY |
- | proxies allowed to set the client IP |
DG_SETUP_TOKEN |
printed in the log | first-run setup token |
ALLOWED_ORIGIN |
same origin | allow another panel origin |
FILES_ROOT |
/host |
root of Tools > Files on Local |
DG_HOST_ACCESS |
on | off stops DockGate running commands on its own host (Proxies & SSL for proxies and certbot installed on the host) |
Architecture and tech stack
Browser (vanilla JS, xterm.js, Chart.js)
├─ REST -> Express API (/api/*, session + origin check)
└─ WS -> Socket.IO (logs, stats, events, terminals, builds)
│
Docker client of the server in use: local socket or dockerode over SSH
SSH sessions (ssh2): remote Compose, docker stack, SFTP, forked host workers
Monitors: events per server, health 1/min, Swarm 30 s, uptime, certificates,
cron and firewall 5 min, honeypot bans 5 min -> Telegram / SMTP / webhook
better-sqlite3 (WAL), AES-256-GCM secrets at rest
Node.js 22 (Alpine) with docker-cli, docker-cli-compose, openssh-client, git, Express 4, Socket.IO 4, dockerode 5, ssh2, better-sqlite3 11, nodemailer 10. Frontend libraries are bundled in public/vendor/.
API
Everything is under /api, in JSON, behind the session (except /api/auth/{status,setup,login}). Main groups: auth, containers, images, volumes, networks, builds, cleanup, compose, swarm, tasks, hooks, templates, registries, databases, proxies, uptime, files, servers (with each server's security, firewall, cron, scripts and system settings under /api/servers/:id/...), ssh-keys, firewall-lists, fleet-bans, git-connect, schedules, monitoring, agent, system, help, meta. The routes are in server/routes/. WebSocket events: logs:subscribe, stats:subscribe, events:subscribe, terminal:start, hostterm:start, build:start, image:push.
Contributing
Bug reports, fixes and ideas are welcome - see CONTRIBUTING.md for how to run DockGate locally, test and open a pull request. Report security problems privately as described in SECURITY.md. Please follow the Code of conduct.
License
MIT - free to use, modify, and distribute with attribution.
Original Author: Ali Zeynalli - this attribution must be preserved in all copies and derivative works.
DockGate - Docker & servers, managed from one place.
Explore related projects
Loading…















































