VPS Docker Traefik Deploy
Overview
Use this skill to turn an application stack into a real production deployment plan with secure host setup, reverse proxying, registry-based releases, private admin access, persistent storage, backups, and rollback.
Run this skill in the main conversation. Do not spawn subagents, agent teams, or
delegated parallel workers unless the user explicitly approves the proposed
count and scope after being told that doing so can increase usage. Ask again
before expanding an approved scope.
Prefer Ubuntu LTS or Debian stable. Prefer immutable image tags. Prefer Traefik for public ingress and SSH tunnels for admin-only access.
Workflow
- Establish facts before changing anything.
- Minimize the public network surface.
- Baseline the host with a non-root operator account.
- Install Docker from the official stable channel.
- Deploy Traefik separately from the app stack.
- Keep state outside container writable layers.
- Deploy app images by pull, not by rebuilding on the server.
- Validate health, backup, restore, rollback, and pruning.
Establish Facts
Confirm these points first:
- operating system and version
- public domains and subdomains
- TLS strategy: HTTP challenge or DNS challenge
- public services: website, API, websocket, admin UI, registry
- private services: database, Redis, dashboards
- registry type: managed or self-hosted
- persistent data locations
- backup destination and retention
- restore expectations
- whether a single VPS is still acceptable
If the project already has deployment docs, read them first and treat them as the application-specific contract.
Public Exposure Rules
Default public ports:
22/tcp for SSH
80/tcp for HTTP redirect and ACME when needed
443/tcp for HTTPS
Keep these private unless there is a strong reason:
- Traefik dashboard
- MariaDB or PostgreSQL
- Redis
- private registry
- app service ports that can sit behind Traefik
- internal admin tools
If a GUI tool is required, bind the service to 127.0.0.1 only and use an SSH tunnel from the operator workstation.
Output Requirements
When using this skill, produce a deployment answer that includes:
- target topology
- exact public ports
- folder layout
- user and permission model
- Docker and Traefik install method
- DNS record plan
- Traefik routing plan
- registry flow
- persistent data plan
- storage growth plan
- backup and restore plan
- rollout and rollback commands
Mandatory Guardrails
- Do not recommend public exposure of database, Redis, registry, or proxy dashboards by default.
- Do not recommend deploying as the host root account.
- Do not recommend mutable
latest tags for production.
- Do not keep important state only inside container writable layers.
- Do not call a plan complete unless backup and rollback are addressed.
Reference Files
Read these files only when needed:
references/server-baseline.md
Use for Ubuntu 24.04 host prep, non-root users, SSH hardening, swap, firewall, Docker install.
references/traefik-dns.md
Use for Traefik layout, dashboard tunneling, DNS, subdomains, Cloudflare, and routing patterns.
references/registry-storage-backup.md
Use for private registries, image retention, bind mounts versus volumes, S3-compatible storage, backup, restore, and cleanup.
references/deploy-checklist.md
Use for rollout steps, post-deploy verification, rollback, and maintenance cadence.
1---2name: vps-docker-traefik-deploy3description: Coordinator-routed specialist for production Docker Compose deployment on self-hosted VPS or cloud servers with Traefik, DNS, registries, storage, backups, rollback, and host hardening. Use after project-development-mindset makes production deployment primary, or directly when explicitly invoked or installed standalone. Do not use for local Docker development, deployment-adjacent app changes, or generic cloud hosting.4---5
6# VPS Docker Traefik Deploy
7
8## Overview
9
10Use this skill to turn an application stack into a real production deployment plan with secure host setup, reverse proxying, registry-based releases, private admin access, persistent storage, backups, and rollback.
11
12Run this skill in the main conversation. Do not spawn subagents, agent teams, or
13delegated parallel workers unless the user explicitly approves the proposed
14count and scope after being told that doing so can increase usage. Ask again
15before expanding an approved scope.
16
17Prefer Ubuntu LTS or Debian stable. Prefer immutable image tags. Prefer Traefik for public ingress and SSH tunnels for admin-only access.
18
19## Workflow
20
211. Establish facts before changing anything.
222. Minimize the public network surface.
233. Baseline the host with a non-root operator account.
244. Install Docker from the official stable channel.
255. Deploy Traefik separately from the app stack.
266. Keep state outside container writable layers.
277. Deploy app images by pull, not by rebuilding on the server.
288. Validate health, backup, restore, rollback, and pruning.
29
30## Establish Facts
31
32Confirm these points first:
33
34- operating system and version
35- public domains and subdomains
36- TLS strategy: HTTP challenge or DNS challenge
37- public services: website, API, websocket, admin UI, registry
38- private services: database, Redis, dashboards
39- registry type: managed or self-hosted
40- persistent data locations
41- backup destination and retention
42- restore expectations
43- whether a single VPS is still acceptable
44
45If the project already has deployment docs, read them first and treat them as the application-specific contract.
46
47## Public Exposure Rules
48
49Default public ports:
50
51- `22/tcp` for SSH
52- `80/tcp` for HTTP redirect and ACME when needed
53- `443/tcp` for HTTPS
54
55Keep these private unless there is a strong reason:
56
57- Traefik dashboard
58- MariaDB or PostgreSQL
59- Redis
60- private registry
61- app service ports that can sit behind Traefik
62- internal admin tools
63
64If a GUI tool is required, bind the service to `127.0.0.1` only and use an SSH tunnel from the operator workstation.
65
66## Output Requirements
67
68When using this skill, produce a deployment answer that includes:
69
70- target topology
71- exact public ports
72- folder layout
73- user and permission model
74- Docker and Traefik install method
75- DNS record plan
76- Traefik routing plan
77- registry flow
78- persistent data plan
79- storage growth plan
80- backup and restore plan
81- rollout and rollback commands
82
83## Mandatory Guardrails
84
85- Do not recommend public exposure of database, Redis, registry, or proxy dashboards by default.
86- Do not recommend deploying as the host root account.
87- Do not recommend mutable `latest` tags for production.
88- Do not keep important state only inside container writable layers.
89- Do not call a plan complete unless backup and rollback are addressed.
90
91## Reference Files
92
93Read these files only when needed:
94
95- [references/server-baseline.md](references/server-baseline.md)
96 Use for Ubuntu 24.04 host prep, non-root users, SSH hardening, swap, firewall, Docker install.
97
98- [references/traefik-dns.md](references/traefik-dns.md)
99 Use for Traefik layout, dashboard tunneling, DNS, subdomains, Cloudflare, and routing patterns.
100
101- [references/registry-storage-backup.md](references/registry-storage-backup.md)
102 Use for private registries, image retention, bind mounts versus volumes, S3-compatible storage, backup, restore, and cleanup.
103
104- [references/deploy-checklist.md](references/deploy-checklist.md)
105 Use for rollout steps, post-deploy verification, rollback, and maintenance cadence.