How to setup N8N (SQLite) using CapRover

In case it’s useful to anyone else, here’s a quick guide to getting N8N (using SQLite) running with CapRover.

If you’re not familiar with CapRover it’s an open source frontend for Docker Swarm. Really nice and simple and includes a bunch of “1-click-apps”.

This assumes you have a working CapRover setup.

  1. Under “Apps” click “One-Click Apps/Databases”
  2. Scroll to the very bottom of the page and select “>> TEMPLATE <<”
  3. Cut and paste the below YAML into the text box
  4. Fill out the form fields and click “Deploy”
  5. Once the app has deployed, go to the apps “HTTP Settings” and:
    • Click “Enable HTTPS”
    • Tick "Websocket Support (should happen automatically once 1.12 is released)
    • Tick “Force HTTPS by redirectiong all HTTP traffic to HTTPS”
  6. Click “Save & Restart”

You should now have a working N8N instance.

captainVersion: 4
services:
    $$cap_appname:
        caproverExtra:
            containerHttpPort: 5678
            websocketSupport: 'true'
        image: n8nio/n8n:$$cap_N8N_VERSION
        environment:
            GENERIC_TIMEZONE: $$cap_N8N_TIMEZONE
            TZ: $$cap_N8N_TIMEZONE
            NODE_ENV: $$cap_N8N_ENVIRONMENT
            N8N_PROTOCOL: https
            N8N_HOST: $$cap_appname.$$cap_root_domain
            N8N_DIAGNOSTICS_ENABLED: $$cap_N8N_DIAGNOSTICS_ENABLED
            N8N_EMAIL_MODE: smtp
            N8N_SMTP_HOST: $$cap_N8N_SMTP_HOST
            N8N_SMTP_PORT: $$cap_N8N_SMTP_PORT
            N8N_SMTP_USER: $$cap_N8N_SMTP_USER
            N8N_SMTP_PASS: $$cap_N8N_SMTP_PASS
            N8N_SMTP_SENDER: $$cap_N8N_SMTP_SENDER
            N8N_SMTP_SSL: $$cap_N8N_SMTP_SSL
            WEBHOOK_URL: https://$$cap_appname.$$cap_root_domain
            N8N_EDITOR_BASE_URL: https://$$cap_appname.$$cap_root_domain
        volumes:
            - $$cap_appname:/home/node/.n8n
caproverOneClickApp:
    displayName: n8n.io (SQLite)
    description: Node based workflow automation tool
    isOfficial: false
    instructions:
        start: |-
            n8n is a free and open node based workflow automation tool.
            If you want to invite members and enable password resets, you will need to enter SMTP details.
        end: |-
            n8n has been successfully deployed! It might take few moments before it's fully started.
            You can access it at `http://$$cap_appname.$$cap_root_domain` and set up your account.
            **Important:** Please enable **HTTPS** and **WebSocket Support**.
    variables:
        - id: $$cap_N8N_VERSION
          label: Application | n8n.io
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/n8nio/n8n/tags
          defaultValue: 'latest'
          validRegex: /.{1,}/
        - id: $$cap_N8N_TIMEZONE
          label: Application | Timezone
          description: >-
              Timezone used by the server.
              Please check out this page for valid time zones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
          defaultValue: UTC
          validRegex: /.{1,}/
        - id: $$cap_N8N_ENVIRONMENT
          label: Application | Environment
          description: Application environment.
          defaultValue: 'production'
          validRegex: /^(production|development)$/
        - id: $$cap_N8N_DIAGNOSTICS_ENABLED
          label: Application | Enable Telemetry
          description: Whether to send telemetry data to n8n.io.
          defaultValue: 'false'
          validRegex: /^(true|false)$/
        - id: $$cap_N8N_SMTP_HOST
          label: Application | SMTP Host
          description: SMTP host used for sending mails.
        - id: $$cap_N8N_SMTP_PORT
          label: Application | SMTP Port
          description: SMTP port used for sending mails. Usually `465`.
        - id: $$cap_N8N_SMTP_USER
          label: Application | SMTP User
          description: SMTP user used for sending mails.
        - id: $$cap_N8N_SMTP_PASS
          label: Application | SMTP Password
          description: SMTP user password used for sending mails.
        - id: $$cap_N8N_SMTP_SENDER
          label: Application | SMTP Sender
          description: SMTP sender used for sending mails (e.g. `N8N <[email protected]>`).
        - id: $$cap_N8N_SMTP_SSL
          label: Application | SMTP SSL
          description: Whether to use SSL for sending mails through SMTP.
          defaultValue: 'true'
          validRegex: /^(true|false)$/
2 Likes