{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c418b11e-c7be-4faa-bd45-92769264cb74",
    "slug": "n8n-with-ollama-to-build-private-self-ho",
    "name": "N8N [w/ Postgres + Redis + Ollama] | Pro Stack",
    "description": "[Jun '26] Build Automation Workflows Using Self Hosted LLM Models",
    "url": "https://railway.com/deploy/n8n-with-ollama-to-build-private-self-ho",
    "upstream": {
      "image": "ollama/ollama"
    }
  },
  "services": [
    {
      "name": "worker",
      "source": {
        "image": "n8nio/n8n"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Ollama",
      "source": {
        "image": "ollama/ollama"
      },
      "needs_volume": true,
      "volume_mount_path": "/root/.ollama",
      "http": true
    },
    {
      "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",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "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": "OLLAMA_BASE_URL",
      "service": "worker",
      "description": "Points N8N to the internal Ollama API endpoint for model access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "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": "DB_POSTGRESDB_CONNECTION_TIMEOUT",
      "service": "worker",
      "description": "Time (ms) before timeout during db connection",
      "secret": false,
      "strategy": "default",
      "default": "300000"
    },
    {
      "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": "OLLAMA_HOST",
      "service": "Ollama",
      "description": "Allows Ollama to listen on all interfaces",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "OLLAMA_ORIGINS",
      "service": "Ollama",
      "description": "Comma-separated list of allowed origins for CORS.",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "OLLAMA_DEFAULT_MODELS",
      "service": "Ollama",
      "description": "You can specify the model to download at boot time (comma separated, if multiple). This can be updated from UI later as well. By default it downloads the deepsek-r1:1.5b model(from https://ollama.com/library). Please make sure you have enough memory to download the specified model.",
      "secret": false,
      "strategy": "default",
      "default": "deepseek-r1:1.5b"
    },
    {
      "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": "OLLAMA_BASE_URL",
      "service": "main",
      "description": "Points N8N to the internal Ollama API endpoint for model access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "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": "DB_POSTGRESDB_CONNECTION_TIMEOUT",
      "service": "main",
      "description": "Time (ms) before timeout during db connection",
      "secret": false,
      "strategy": "default",
      "default": "300000"
    },
    {
      "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"
    },
    {
      "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"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "n8n-with-ollama-to-build-private-self-ho"
      }
    },
    "cli": "railway deploy --template n8n-with-ollama-to-build-private-self-ho",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c418b11e-c7be-4faa-bd45-92769264cb74",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "51898941-b48d-4c52-b303-0ff8955ebca1": {
                  "icon": "https://devicons.railway.app/n8n",
                  "name": "worker",
                  "deploy": {
                    "startCommand": "n8n worker",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "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"
                    },
                    "OLLAMA_BASE_URL": {
                      "isOptional": false,
                      "description": "Points N8N to the internal Ollama API endpoint for model access.",
                      "defaultValue": "http://${{Ollama.RAILWAY_PRIVATE_DOMAIN}}:11434"
                    },
                    "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"
                    },
                    "DB_POSTGRESDB_CONNECTION_TIMEOUT": {
                      "description": "Time (ms) before timeout during db connection",
                      "defaultValue": "300000"
                    },
                    "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"
                    }
                  }
                },
                "7cffbe21-801b-4a25-9fdf-4a1b97446787": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/ollama-dark.svg",
                  "name": "Ollama",
                  "deploy": {
                    "startCommand": "bash -c \"ollama serve & sleep 5 && ollama pull $OLLAMA_DEFAULT_MODELS && wait\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ollama/ollama"
                  },
                  "variables": {
                    "OLLAMA_HOST": {
                      "isOptional": false,
                      "description": "Allows Ollama to listen on all interfaces",
                      "defaultValue": "::"
                    },
                    "OLLAMA_ORIGINS": {
                      "isOptional": false,
                      "description": "Comma-separated list of allowed origins for CORS.",
                      "defaultValue": "*"
                    },
                    "OLLAMA_DEFAULT_MODELS": {
                      "isOptional": false,
                      "description": "You can specify the model to download at boot time (comma separated, if multiple). This can be updated from UI later as well. By default it downloads the deepsek-r1:1.5b model(from https://ollama.com/library). Please make sure you have enough memory to download the specified model.",
                      "defaultValue": "deepseek-r1:1.5b"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "7cffbe21-801b-4a25-9fdf-4a1b97446787": {
                      "mountPath": "/root/.ollama"
                    }
                  }
                },
                "b3ae683f-0158-4c4b-942d-58be3d71cfb6": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/n8n.svg",
                  "name": "main",
                  "deploy": {
                    "startCommand": "n8n start",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "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"
                    },
                    "OLLAMA_BASE_URL": {
                      "isOptional": false,
                      "description": "Points N8N to the internal Ollama API endpoint for model access.",
                      "defaultValue": "http://${{Ollama.RAILWAY_PRIVATE_DOMAIN}}:11434"
                    },
                    "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"
                    },
                    "DB_POSTGRESDB_CONNECTION_TIMEOUT": {
                      "description": "Time (ms) before timeout during db connection",
                      "defaultValue": "300000"
                    },
                    "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": {
                    "b3ae683f-0158-4c4b-942d-58be3d71cfb6": {
                      "mountPath": "/data"
                    }
                  }
                },
                "b3e0dea3-7402-426e-ba21-7262a3df2ad3": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "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"
                    }
                  },
                  "volumeMounts": {
                    "b3e0dea3-7402-426e-ba21-7262a3df2ad3": {
                      "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."
                  }
                },
                "b8a006e7-5f4f-45e1-a838-bc410ed1cb93": {
                  "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,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "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}}"
                    }
                  },
                  "volumeMounts": {
                    "b8a006e7-5f4f-45e1-a838-bc410ed1cb93": {
                      "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."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T22:13:36.913Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_106b7a9db92b4ae4b1fe",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 144,
    "typical_build_seconds": 0,
    "typical_start_seconds": 15,
    "slowest_service": "worker"
  }
}
