Deploy n8n
Run your own n8n automation instance, backed by a managed database so your workflows persist.
n8n is a workflow-automation tool you self-host. On Dockhold you run your own instance backed by a managed database, so workflows and credentials survive restarts and deploys. This recipe is the whole path.
License: n8n is distributed under the Sustainable Use License, not a standard open-source license. You may run it for your own internal or business automations and build workflows for clients. You may not offer your instance as a paid service to others, white-label it, or charge for access without a commercial license from n8n. As the operator, that's your responsibility.
Start from the n8n-starter template: click Use this template, then deploy it.
1. Deploy with a database
n8n needs more memory and a larger image than the free 256 MB allowance, so
give it a larger app size (1 GB is a good start) and add some
database memory. On the
deploy form, check "Add a managed database." Dockhold
injects DATABASE_URL and the template points n8n at Postgres
automatically. That is essential, because without it n8n would store everything on
the app's ephemeral disk and lose it on restart.
2. Set the encryption key
n8n encrypts saved credentials with N8N_ENCRYPTION_KEY. Add it
as a secret under Secrets in the dashboard sidebar with a stable value (generate one with
openssl rand -hex 16) before you save any credentials.
If it isn't set, n8n generates one on the ephemeral disk that's lost on
restart, making saved credentials unrecoverable.
3. Set your URL and restart
Once it's live, set these in the dashboard so the editor and webhooks use the right address, then restart:
N8N_HOST=<your-app>.dockhold.app
WEBHOOK_URL=https://<your-app>.dockhold.app/
Open the URL and create your owner account.
How it works
The template's entrypoint adapts upstream n8n to Dockhold: it binds
0.0.0.0:$PORT, maps the injected DATABASE_URL to
n8n's Postgres settings, uses a writable temp folder (the container runs as
a non-root user), and sets HTTPS/proxy options so login works behind the
edge. Pin a specific n8nio/n8n version in the Dockerfile for
reproducible deploys.
Troubleshooting
-
Workflows or credentials vanish after a deploy: the
managed database isn't enabled, or
N8N_ENCRYPTION_KEYwasn't set to a stable value. Enable the database, set the key as a secret, and redeploy. -
Login redirect loops / "secure cookie" errors: set
N8N_HOSTandWEBHOOK_URLto your realhttps://URL and restart. - Out of memory / won't start on the free size: n8n needs more than the free 256 MB. Resize the app to 1 GB or more from its Size tab.