Templates
Templates are the fastest way to get an app running on your own server. Instead of figuring out build commands, environment variables, databases and reverse proxies yourself, you pick a template, choose a server, and DollarDeploy provisions everything for you - in a few minutes.
Browse the full catalog at dollardeploy.com/r. There are 70+ ready-to-use templates for popular open source apps like Ghost, n8n, Metabase, NocoDB, Plausible, Appsmith, Outline and many more, plus starter boilerplates for Next.js, Python, Go, Rust and Java.
What a template is
A template is a small config file that describes how to build, run and host an app. When you launch it, DollarDeploy:
- Clones the source repository (or pulls the Docker Compose stack)
- Installs any required services such as PostgreSQL, MariaDB, Redis or Docker
- Generates secrets and passwords automatically
- Builds and starts the app
- Configures Nginx reverse proxy and a free HTTPS certificate via Let's Encrypt
Everything runs on a server you own. There is no lock-in — a template is just a description of the app, and you can inspect, fork or change any of it.
Where templates come from
DollarDeploy merges templates from three sources, in order:
- The official catalog at github.com/dollardeploy/templates, which is open source and accepts contributions.
- Your own custom templates, defined in Settings → Templates.
If two templates share the same id, the later source wins. That means you can override any official template with your own version simply by reusing its id.
Anatomy of a template
A template is written in YAML (.dollardeploy.yml) or JSON. Here is the Ghost CMS template as an example:
id: ghost-cms
name: Ghost CMS
intro: "Ghost is an independent platform for publishing online by web and email newsletter."
logo: https://example.com/ghost-logo.png
tags:
- cms
- blog
- newsletter
- oss
deployTime: ~3 minutes
description: |
Ghost is a powerful app for professional publishers to create, share, and
grow a business around their content.
requirements:
memory: 2048
cpu: 2
storage: 10
services:
- docker
app:
type: docker-compose
repositoryUrl: https://github.com/dollardeploy/templates
sourcePath: ghost-cms
sourceBranch: main
env:
SERVER_URL: ${APP_URL}
MYSQL_PASSWORD: ${GENERATED_PWD}
PORT: 3000
Top-level fields
| Field | Description |
|---|---|
id |
Unique identifier. Reuse an existing id to override it. |
name |
Display name shown in the catalog. |
intro |
Short one-line summary. |
description |
Longer description (Markdown supported). |
logo |
URL to the app logo. |
tags |
Keywords for search and filtering (e.g. oss, database, popular). |
requirements |
Recommended memory (MB), cpu, storage (GB), and optional gpu. |
services |
Services the app needs, e.g. docker, postgres, mariadb, redis. |
deployTime |
Rough estimate shown to users, e.g. ~3 minutes. |
introVideoUrl |
Optional embedded walkthrough video. |
demoUrl |
Optional link to a live demo. |
experimental |
Marks the template as work-in-progress. |
postLaunchNote |
Note shown to the user right after a successful launch. |
The app block
The app block describes how the app is built and run. The most important field is type:
docker-compose— runs adocker-compose.ymlstack. The most common type and the easiest way to package multi-container apps.native— builds and runs the app directly on the server with systemd. UsebuildCmd,startCmd,installCmdand friends.next,react,php,java— optimized presets for those frameworks.
Common app fields:
| Field | Description |
|---|---|
repositoryUrl |
Git repository to deploy. |
sourceBranch |
Branch to check out (defaults to main). |
sourcePath |
Subdirectory inside the repo. |
dockerComposeFile |
Compose file name for docker-compose apps. |
installCmd |
Command to install dependencies. |
buildCmd / buildScript |
Command to build the app. |
startCmd / startScript |
Command to start the app. |
preStartCmd / postStartCmd |
Hooks run before/after start. |
mainPort |
The port the app listens on. |
env |
Environment variables (see below). |
files |
Inline files written to the build directory before building. |
Heads up: app listening port is required. Every template must expose the port the app listens on, through app.mainPort property. Without it the template won't deploy. This port will be provided in the env to the app during deploy as PORT env variable.
Environment variables and substitution
The env block sets environment variables for the app. Beyond plain values, you can reference variables that DollarDeploy fills in at launch time using ${VAR} syntax.
Generated secrets are created automatically the first time they're used, so you never ship credentials in a template:
| Variable | Value |
|---|---|
${GENERATED_PWD} |
A random 10-character password. |
${GENERATED_HASH} |
A random 32-character string. |
${GENERATED_SECRET} |
A 32-byte hex secret (like openssl rand -hex 32). |
Context variables describe where the app is running:
| Variable | Value |
|---|---|
${APP_URL} |
The app's public URL, https://<hostname>. |
${APP_HOSTNAME} |
The hostname assigned to the app. |
${USER_EMAIL} |
The deploying user's email. |
${USER_IPADDRESS} |
The user's IP (handy with allowAccessFrom). |
${PORT} |
The app's port. |
Service variables are injected by services installed on the host. For example, if PostgreSQL is installed, ${POSTGRES_URL} resolves to the full connection string. The same applies to MARIADB_URL, REDIS_URL and MONGODB_URL.
You can also expand individual parts of a connection string:
env:
DB_HOST: ${POSTGRES_URL:hostname}
DB_PORT: ${POSTGRES_URL:port}
DB_USER: ${POSTGRES_URL:username}
DB_PASS: ${POSTGRES_URL:password}
DB_NAME: ${POSTGRES_URL:database}
Supported parts are hostname, port, path, username, password and database.
Creating your own template
You have two options.
1. Add a custom template in Settings. Go to Settings → Templates and paste your YAML. You can define a single template or a list of them. They are validated against the template schema on save and appear in your catalog immediately — perfect for private apps or quick experiments.
id: my-internal-tool
name: My Internal Tool
intro: Our company's internal dashboard.
requirements:
memory: 1024
cpu: 1
storage: 10
app:
type: next
repositoryUrl: https://github.com/my-org/internal-tool
sourceBranch: main
mainPort: 3000
env:
DATABASE_URL: ${POSTGRES_URL}
SESSION_SECRET: ${GENERATED_SECRET}
2. Contribute to the official catalog. Add a folder containing a .dollardeploy.yml (and any supporting files such as a docker-compose.yml) to github.com/dollardeploy/templates and open a pull request. Once merged it becomes available to everyone.
What's next?
- Follow the Getting Started guide to deploy your first app.
- Browse the Template catalog.
- Explore the open source templates repository.
Have a template you'd like to see, or need a hand writing one? Join our Discord community — we're happy to help.