Skip to content

Stack Templates

Stack Templates turn a working compose.yaml into a reusable blueprint. Save a well-configured Postgres stack once, then deploy identical (or parameterized) copies on any host with one click.

Two paths:

From an existing stack:

  1. Open the stack detail page
  2. Actions → Save as template
  3. Name + description + (optional) icon
  4. Pick which variables should be parameters

From scratch:

  1. Templates → New template
  2. Paste compose.yaml
  3. Define parameters manually

Parameters are placeholders that get filled at deploy time. Syntax is {{param_name}}:

services:
postgres:
image: postgres:{{version|default:16-alpine}}
environment:
POSTGRES_USER: {{user|default:postgres}}
POSTGRES_PASSWORD: {{password|secret}}
POSTGRES_DB: {{database}}
volumes:
- {{stack_name}}_pgdata:/var/lib/postgresql/data
ports:
- "{{port|default:5432}}:5432"
volumes:
{{stack_name}}_pgdata:

Each parameter can have:

  • default:... — pre-filled value in the deploy dialog
  • secret — renders as password field, stored encrypted
  • description — shown as help text
  • enum:... — dropdown of allowed values
  • pattern:... — regex validation

dockmesh auto-provides these:

  • {{stack_name}} — the name the user picks for the new stack
  • {{host}} — the target host
  • {{timestamp}} — current ISO timestamp (useful for unique volume names)
  1. Templates → [your template] → Deploy
  2. dockmesh shows a form with all parameters
  3. Required fields, defaults, help text, validation
  4. Pick target host
  5. Click Deploy

Behind the scenes: dockmesh substitutes parameters, writes the final compose.yaml to the stack directory, and runs deploy.

Export produces a .yml file with the template + metadata. Import it on another dockmesh instance or commit it to a Git repo for team sharing.

dockmesh ships with starter templates for common self-host apps:

  • PostgreSQL
  • MySQL / MariaDB
  • Redis
  • Nginx reverse proxy
  • Caddy with auto-HTTPS
  • Nextcloud
  • Gitea
  • Vaultwarden
  • Plex / Jellyfin
  • Watchtower (for auto-updates)
  • Uptime Kuma

Clone and customize for your environment.

When a template is updated, existing stacks deployed from it are not touched — they keep running with their original config. To apply template changes, redeploy the stack from the template (with the current parameters).

If you want stacks to update automatically, use Git-backed stacks instead.