Skip to content

n8n Β· deploy guide

Deploy n8n (workflow automation) with Docker Compose

Self-host n8n on bashrack web hosting with Docker Compose: persistent data, your own domain and automatic SSL, billed hourly.

about 10 minutes of hands-on time

Who it's for

Teams automating webhooks, CRMs and APIs who want their workflows and credentials on their own instance.

You'll need

  • A bashrack account with at least $5 in the wallet
  • A domain or subdomain, e.g. n8n.example.com

Steps

  1. step 1

    Create a web app from Docker Compose

    In the console open Web hosting β†’ New app, choose Docker Compose and paste the file below. Pick the Medium resource tier and 5 GB of storage.

    yaml
    services:
      n8n:
        image: docker.n8n.io/n8nio/n8n
        restart: unless-stopped
        environment:
          - N8N_HOST=${N8N_HOST}
          - N8N_PORT=5678
          - N8N_PROTOCOL=https
          - WEBHOOK_URL=https://${N8N_HOST}/
          - GENERIC_TIMEZONE=${TZ}
          - TZ=${TZ}
        volumes:
          - n8n_data:/home/node/.n8n
    volumes:
      n8n_data:
  2. step 2

    Set the environment variables

    Add N8N_HOST (your domain without https://) and TZ (for example Europe/Belgrade) in the app's environment variables.

    ini
    N8N_HOST=n8n.example.com
    TZ=Europe/Belgrade
  3. step 3

    Add your domain

    In the Domains tab add https://n8n.example.com pointing at the n8n service on port 5678, then create a DNS A/CNAME record as shown. The certificate is issued automatically.

  4. step 4

    Deploy and create the owner account

    Deploy the app, open your domain and create the owner account on the first screen β€” do this immediately so nobody else can claim the instance.

Security and upkeep

  • Create the owner account right after the first deploy.
  • Keep the n8n_data volume: it holds the encryption key for stored credentials.
  • Update by redeploying; n8n publishes breaking changes in its release notes.

Official documentation