{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f73a8c16-ae5d-4c5a-9f46-6d9ef83bfcfc",
    "slug": "n8n-on-railway",
    "name": "N8N",
    "description": "Self-host n8n w/ workers. Automate with 400+ integrations, 7k+ templates.",
    "url": "https://railway.com/deploy/n8n-on-railway",
    "upstream": {
      "image": "n8nio/n8n"
    }
  },
  "services": [
    {
      "name": "worker",
      "source": {
        "image": "n8nio/n8n"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        6379
      ],
      "http": false
    },
    {
      "name": "main",
      "source": {
        "image": "n8nio/n8n"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "worker",
      "description": "Port on which the n8n service listens (typically 5678).",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "DB_TYPE",
      "service": "worker",
      "description": "Specifies the type of database used by n8n — here it’s postgresdb.",
      "secret": false,
      "strategy": "default",
      "default": "postgresdb"
    },
    {
      "key": "WEBHOOK_URL",
      "service": "worker",
      "description": "Public URL endpoint for receiving external webhook triggers through Railway’s public domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "worker",
      "description": "Configures Node.js memory usage.",
      "secret": false,
      "strategy": "default",
      "default": "--max_old_space_size=8192"
    },
    {
      "key": "EXECUTIONS_MODE",
      "service": "worker",
      "description": "Determines how workflows are processed. queue enables distributed execution using Redis.",
      "secret": false,
      "strategy": "default",
      "default": "queue"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "worker",
      "description": "Host address of the PostgreSQL database connected to n8n.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PORT",
      "service": "worker",
      "description": "Port number where PostgreSQL is running — usually 5432.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_USER",
      "service": "worker",
      "description": "Username used by n8n to authenticate with PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "worker",
      "description": "Secret key used to encrypt sensitive credentials stored in the n8n database.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_LISTEN_ADDRESS",
      "service": "worker",
      "description": "Defines which network interfaces n8n binds to — :: allows both IPv4 and IPv6.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "N8N_RUNNERS_ENABLED",
      "service": "worker",
      "description": "Enables “Runners,” allowing distributed workflow execution across multiple worker nodes.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "worker",
      "description": "Redis host address used by n8n for managing job queues in queue mode.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PORT",
      "service": "worker",
      "description": "Redis port number — typically 6379.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_DATABASE",
      "service": "worker",
      "description": "The name of the PostgreSQL database that stores n8n’s workflow and execution data.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "worker",
      "description": "Password for authenticating the PostgreSQL connection.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "worker",
      "description": "Password used to connect securely to Redis.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_USERNAME",
      "service": "worker",
      "description": "Username used for authenticating Redis connections (if required).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_DUALSTACK",
      "service": "worker",
      "description": "Enables dual IPv4 and IPv6 support for Redis connections.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_ALPINE_PRIVATE_NETWORKING",
      "service": "worker",
      "description": "Enables private networking between services on Railway’s infrastructure for secure internal communication.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS",
      "service": "worker",
      "description": "Runs manual (UI-triggered) executions on worker nodes instead of the main instance to improve performance.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS",
      "service": "worker",
      "description": "Ensures configuration files have strict permissions for improved security in production environments.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "The private domain address of your Redis instance — used for internal service communication within Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "The port on which Redis is running — typically 6379.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "The username used for authenticating connections to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "The full connection URL for Redis, usually combining host, port, and authentication details.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Alias for the Redis password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Securely generated password (using Railway’s secret() helper) used to authenticate Redis connections.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "The public URL for connecting to Redis externally.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "main",
      "description": "Port on which the n8n service listens (typically 5678).",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "DB_TYPE",
      "service": "main",
      "description": "Specifies the type of database used by n8n — here it’s postgresdb.",
      "secret": false,
      "strategy": "default",
      "default": "postgresdb"
    },
    {
      "key": "N8N_PORT",
      "service": "main",
      "description": "Internal port for n8n’s web interface and API (usually same as PORT).",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "WEBHOOK_URL",
      "service": "main",
      "description": "Public URL endpoint for receiving external webhook triggers through Railway’s public domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "main",
      "description": "Configures Node.js memory usage — This config (8192) allows n8n to use up to 8 GB of memory.",
      "secret": false,
      "strategy": "default",
      "default": "--max_old_space_size=8192"
    },
    {
      "key": "EXECUTIONS_MODE",
      "service": "main",
      "description": "Determines how workflows are processed. queue enables distributed execution using Redis.",
      "secret": false,
      "strategy": "default",
      "default": "queue"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "main",
      "description": "Host address of the PostgreSQL database connected to n8n.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PORT",
      "service": "main",
      "description": "Port number where PostgreSQL is running — usually 5432.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_USER",
      "service": "main",
      "description": "Username used by n8n to authenticate with PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "main",
      "description": "Secret key used to encrypt sensitive credentials stored in the n8n database.",
      "secret": true,
      "strategy": "default",
      "default": "{{ secret(32, \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") }}"
    },
    {
      "key": "N8N_LISTEN_ADDRESS",
      "service": "main",
      "description": "Defines which network interfaces n8n binds to — :: allows both IPv4 and IPv6.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "N8N_EDITOR_BASE_URL",
      "service": "main",
      "description": "Base URL where the n8n editor (web UI) is accessible.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "N8N_RUNNERS_ENABLED",
      "service": "main",
      "description": "Enables “Runners,” allowing distributed workflow execution across multiple worker nodes.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "EXECUTIONS_DATA_PRUNE",
      "service": "main",
      "description": "Automatically deletes old workflow execution logs to save storage space.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "QUEUE_BULL_REDIS_HOST",
      "service": "main",
      "description": "Redis host address used by n8n for managing job queues in queue mode.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PORT",
      "service": "main",
      "description": "Redis port number — typically 6379.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_DATABASE",
      "service": "main",
      "description": "The name of the PostgreSQL database that stores n8n’s workflow and execution data.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "main",
      "description": "Password for authenticating the PostgreSQL connection.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_PASSWORD",
      "service": "main",
      "description": "Password used to connect securely to Redis.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_USERNAME",
      "service": "main",
      "description": "Username used for authenticating Redis connections (if required).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_BULL_REDIS_DUALSTACK",
      "service": "main",
      "description": "Enables dual IPv4 and IPv6 support for Redis connections.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_DEFAULT_BINARY_DATA_MODE",
      "service": "main",
      "description": "Defines where binary files (images, PDFs, etc.) are stored — filesystem saves them to attached storage.",
      "secret": false,
      "strategy": "default",
      "default": "filesystem"
    },
    {
      "key": "EXECUTIONS_DATA_PRUNE_MAX_COUNT",
      "service": "main",
      "description": "Maximum number of workflow execution records to retain before pruning older ones.",
      "secret": false,
      "strategy": "default",
      "default": "100"
    },
    {
      "key": "ENABLE_ALPINE_PRIVATE_NETWORKING",
      "service": "main",
      "description": "Enables private networking between services on Railway’s infrastructure for secure internal communication.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS",
      "service": "main",
      "description": "Runs manual (UI-triggered) executions on worker nodes instead of the main instance to improve performance.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS",
      "service": "main",
      "description": "Ensures configuration files have strict permissions for improved security in production environments.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "The directory path inside the container where PostgreSQL stores its data files",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "The hostname or internal private domain for connecting to PostgreSQL within Railway’s private network. Used by other connected services like n8n.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "The port PostgreSQL listens on (default: 5432). Often left empty here because Railway sets it automatically.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Username for PostgreSQL authentication.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Name of the primary database to connect to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password used for connecting to the database",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "The name of the default database created during initialization",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "The full connection string to connect to Postgres",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "The username of the Postgres superuser account created when the container starts",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Defines how long SSL certificates should be valid if PostgreSQL is using SSL mode.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated secure 32-character password for the Postgres instance",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "The publicly accessible connection string for external database access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Defines the grace period (in seconds) Railway waits before fully stopping a service during redeployments.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "n8n-on-railway"
      }
    },
    "cli": "railway deploy --template n8n-on-railway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f73a8c16-ae5d-4c5a-9f46-6d9ef83bfcfc",
            "serializedConfig": {
              "services": {
                "36b9bf5b-0711-49ba-9fa4-d33e31861d5d": {
                  "icon": "https://devicons.railway.app/n8n",
                  "name": "worker",
                  "deploy": {
                    "startCommand": "n8n worker",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "n8nio/n8n"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port on which the n8n service listens (typically 5678).",
                      "defaultValue": "5678"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Specifies the type of database used by n8n — here it’s postgresdb.",
                      "defaultValue": "postgresdb"
                    },
                    "WEBHOOK_URL": {
                      "isOptional": false,
                      "description": "Public URL endpoint for receiving external webhook triggers through Railway’s public domain.",
                      "defaultValue": "https://${{main.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Configures Node.js memory usage.",
                      "defaultValue": "--max_old_space_size=8192"
                    },
                    "EXECUTIONS_MODE": {
                      "isOptional": false,
                      "description": "Determines how workflows are processed. queue enables distributed execution using Redis.",
                      "defaultValue": "queue"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Host address of the PostgreSQL database connected to n8n.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_POSTGRESDB_PORT": {
                      "isOptional": false,
                      "description": "Port number where PostgreSQL is running — usually 5432.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_POSTGRESDB_USER": {
                      "isOptional": false,
                      "description": "Username used by n8n to authenticate with PostgreSQL.",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Secret key used to encrypt sensitive credentials stored in the n8n database.",
                      "defaultValue": "${{main.N8N_ENCRYPTION_KEY}}"
                    },
                    "N8N_LISTEN_ADDRESS": {
                      "isOptional": false,
                      "description": "Defines which network interfaces n8n binds to — :: allows both IPv4 and IPv6.",
                      "defaultValue": "::"
                    },
                    "N8N_RUNNERS_ENABLED": {
                      "isOptional": false,
                      "description": "Enables “Runners,” allowing distributed workflow execution across multiple worker nodes.",
                      "defaultValue": "true"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis host address used by n8n for managing job queues in queue mode.",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "QUEUE_BULL_REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port number — typically 6379.",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "DB_POSTGRESDB_DATABASE": {
                      "isOptional": false,
                      "description": "The name of the PostgreSQL database that stores n8n’s workflow and execution data.",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for authenticating the PostgreSQL connection.",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password used to connect securely to Redis.",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_USERNAME": {
                      "isOptional": false,
                      "description": "Username used for authenticating Redis connections (if required).",
                      "defaultValue": "${{Redis.REDISUSER}}"
                    },
                    "QUEUE_BULL_REDIS_DUALSTACK": {
                      "isOptional": false,
                      "description": "Enables dual IPv4 and IPv6 support for Redis connections.",
                      "defaultValue": "true"
                    },
                    "ENABLE_ALPINE_PRIVATE_NETWORKING": {
                      "isOptional": false,
                      "description": "Enables private networking between services on Railway’s infrastructure for secure internal communication.",
                      "defaultValue": "true"
                    },
                    "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS": {
                      "isOptional": false,
                      "description": "Runs manual (UI-triggered) executions on worker nodes instead of the main instance to improve performance.",
                      "defaultValue": "true"
                    },
                    "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS": {
                      "isOptional": false,
                      "description": "Ensures configuration files have strict permissions for improved security in production environments.",
                      "defaultValue": "true"
                    }
                  }
                },
                "73846fa4-04c2-4f50-afc1-13a4f3ff2166": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "The private domain address of your Redis instance — used for internal service communication within Railway.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "The port on which Redis is running — typically 6379.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "The username used for authenticating connections to Redis.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "The full connection URL for Redis, usually combining host, port, and authentication details.",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Alias for the Redis password.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Securely generated password (using Railway’s secret() helper) used to authenticate Redis connections.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "The public URL for connecting to Redis externally.",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    }
                  },
                  "volumeMounts": {
                    "73846fa4-04c2-4f50-afc1-13a4f3ff2166": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "a1343602-ed03-4d8f-9c2e-19a0a79bb343": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/n8n.svg",
                  "name": "main",
                  "deploy": {
                    "startCommand": "n8n start",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "n8nio/n8n"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port on which the n8n service listens (typically 5678).",
                      "defaultValue": "5678"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Specifies the type of database used by n8n — here it’s postgresdb.",
                      "defaultValue": "postgresdb"
                    },
                    "N8N_PORT": {
                      "isOptional": false,
                      "description": "Internal port for n8n’s web interface and API (usually same as PORT).",
                      "defaultValue": "5678"
                    },
                    "WEBHOOK_URL": {
                      "isOptional": false,
                      "description": "Public URL endpoint for receiving external webhook triggers through Railway’s public domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Configures Node.js memory usage — This config (8192) allows n8n to use up to 8 GB of memory.",
                      "defaultValue": "--max_old_space_size=8192"
                    },
                    "EXECUTIONS_MODE": {
                      "isOptional": false,
                      "description": "Determines how workflows are processed. queue enables distributed execution using Redis.",
                      "defaultValue": "queue"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Host address of the PostgreSQL database connected to n8n.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_POSTGRESDB_PORT": {
                      "isOptional": false,
                      "description": "Port number where PostgreSQL is running — usually 5432.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_POSTGRESDB_USER": {
                      "isOptional": false,
                      "description": "Username used by n8n to authenticate with PostgreSQL.",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Secret key used to encrypt sensitive credentials stored in the n8n database.",
                      "defaultValue": "{{ secret(32, \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") }}"
                    },
                    "N8N_LISTEN_ADDRESS": {
                      "isOptional": false,
                      "description": "Defines which network interfaces n8n binds to — :: allows both IPv4 and IPv6.",
                      "defaultValue": "::"
                    },
                    "N8N_EDITOR_BASE_URL": {
                      "isOptional": false,
                      "description": "Base URL where the n8n editor (web UI) is accessible.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "N8N_RUNNERS_ENABLED": {
                      "isOptional": false,
                      "description": "Enables “Runners,” allowing distributed workflow execution across multiple worker nodes.",
                      "defaultValue": "true"
                    },
                    "EXECUTIONS_DATA_PRUNE": {
                      "isOptional": false,
                      "description": "Automatically deletes old workflow execution logs to save storage space.",
                      "defaultValue": "true"
                    },
                    "QUEUE_BULL_REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis host address used by n8n for managing job queues in queue mode.",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "QUEUE_BULL_REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port number — typically 6379.",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "DB_POSTGRESDB_DATABASE": {
                      "isOptional": false,
                      "description": "The name of the PostgreSQL database that stores n8n’s workflow and execution data.",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for authenticating the PostgreSQL connection.",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password used to connect securely to Redis.",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "QUEUE_BULL_REDIS_USERNAME": {
                      "isOptional": false,
                      "description": "Username used for authenticating Redis connections (if required).",
                      "defaultValue": "${{Redis.REDISUSER}}"
                    },
                    "QUEUE_BULL_REDIS_DUALSTACK": {
                      "isOptional": false,
                      "description": "Enables dual IPv4 and IPv6 support for Redis connections.",
                      "defaultValue": "true"
                    },
                    "N8N_DEFAULT_BINARY_DATA_MODE": {
                      "isOptional": false,
                      "description": "Defines where binary files (images, PDFs, etc.) are stored — filesystem saves them to attached storage.",
                      "defaultValue": "filesystem"
                    },
                    "EXECUTIONS_DATA_PRUNE_MAX_COUNT": {
                      "isOptional": false,
                      "description": "Maximum number of workflow execution records to retain before pruning older ones.",
                      "defaultValue": "100"
                    },
                    "ENABLE_ALPINE_PRIVATE_NETWORKING": {
                      "isOptional": false,
                      "description": "Enables private networking between services on Railway’s infrastructure for secure internal communication.",
                      "defaultValue": "true"
                    },
                    "OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS": {
                      "isOptional": false,
                      "description": "Runs manual (UI-triggered) executions on worker nodes instead of the main instance to improve performance.",
                      "defaultValue": "true"
                    },
                    "N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS": {
                      "isOptional": false,
                      "description": "Ensures configuration files have strict permissions for improved security in production environments.",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "a1343602-ed03-4d8f-9c2e-19a0a79bb343": {
                      "mountPath": "/data"
                    }
                  }
                },
                "c22b40e3-b36a-45d9-aab2-80517a6645d8": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "The directory path inside the container where PostgreSQL stores its data files",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "The hostname or internal private domain for connecting to PostgreSQL within Railway’s private network. Used by other connected services like n8n.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "The port PostgreSQL listens on (default: 5432). Often left empty here because Railway sets it automatically.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username for PostgreSQL authentication.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Name of the primary database to connect to.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password used for connecting to the database",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "The name of the default database created during initialization",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "The full connection string to connect to Postgres",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "The username of the Postgres superuser account created when the container starts",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Defines how long SSL certificates should be valid if PostgreSQL is using SSL mode.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated secure 32-character password for the Postgres instance",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "The publicly accessible connection string for external database access.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Defines the grace period (in seconds) Railway waits before fully stopping a service during redeployments.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    }
                  },
                  "volumeMounts": {
                    "c22b40e3-b36a-45d9-aab2-80517a6645d8": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T20:09:17.385Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_da02536c476941a288a1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 177,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "worker"
  }
}
