{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f84c833d-4160-477c-98a7-f4f3ed2a0541",
    "slug": "evolution-n8n",
    "name": "evolution-n8n",
    "description": "WhatsApp automation stack: Evolution API v2 + n8n, Postgres, Redis, S3",
    "url": "https://railway.com/deploy/evolution-n8n",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/evolution-n8n-railway"
    }
  },
  "services": [
    {
      "name": "n8n",
      "source": {
        "repo": "https://github.com/nomideusz/evolution-n8n-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/node/.n8n",
      "http": true
    },
    {
      "name": "redis",
      "source": {
        "repo": "https://github.com/nomideusz/evolution-n8n-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "postgres",
      "source": {
        "repo": "https://github.com/nomideusz/evolution-n8n-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "evolution",
      "source": {
        "repo": "https://github.com/nomideusz/evolution-n8n-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/evolution/instances",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "n8n",
      "description": "n8n's listen port. Must stay 5678 — Railway would otherwise inject 8080.",
      "secret": false,
      "strategy": "default",
      "default": "5678"
    },
    {
      "key": "N8N_HOST",
      "service": "n8n",
      "description": "Public hostname of this n8n instance. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WEBHOOK_URL",
      "service": "n8n",
      "description": "Public base URL used in generated webhook URLs. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "n8n",
      "description": "Runs the container as root so n8n can write its volume. Required — without it n8n crash-loops on EACCES.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "DB_POSTGRESDB_HOST",
      "service": "n8n",
      "description": "Postgres private hostname. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "N8N_ENCRYPTION_KEY",
      "service": "n8n",
      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DB_POSTGRESDB_PASSWORD",
      "service": "n8n",
      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Auto-generated Redis password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Auto-generated database password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SERVER_URL",
      "service": "evolution",
      "description": "Public URL of this Evolution API instance. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CACHE_REDIS_URI",
      "service": "evolution",
      "description": "Redis cache URI. The family=0 suffix is required on Railway (IPv6-only private DNS) — don't remove it.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "AUTHENTICATION_API_KEY",
      "service": "evolution",
      "description": "Global API key — use it in the apikey header and to sign in to the /manager UI.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_CONNECTION_URI",
      "service": "evolution",
      "description": "Postgres connection string. Wired automatically — don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "evolution-n8n"
      }
    },
    "cli": "railway deploy --template evolution-n8n",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f84c833d-4160-477c-98a7-f4f3ed2a0541",
            "serializedConfig": {
              "services": {
                "0cd51199-aa5a-4fce-8b83-50b82db7ebf5": {
                  "icon": "https://devicons.railway.app/i/n8n.svg",
                  "name": "n8n",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/evolution-n8n-railway",
                    "rootDirectory": "/n8n"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "n8n's listen port. Must stay 5678 — Railway would otherwise inject 8080.",
                      "defaultValue": "5678"
                    },
                    "N8N_HOST": {
                      "isOptional": false,
                      "description": "Public hostname of this n8n instance. Wired automatically — don't change.",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "WEBHOOK_URL": {
                      "isOptional": false,
                      "description": "Public base URL used in generated webhook URLs. Wired automatically — don't change.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runs the container as root so n8n can write its volume. Required — without it n8n crash-loops on EACCES.",
                      "defaultValue": "0"
                    },
                    "DB_POSTGRESDB_HOST": {
                      "isOptional": false,
                      "description": "Postgres private hostname. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "N8N_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts credentials stored by n8n. Must be identical on every n8n service; losing it orphans saved credentials.",
                      "defaultValue": "{{N8N_ENCRYPTION_KEY}}"
                    },
                    "DB_POSTGRESDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password, shared from the postgres service. Wired automatically — don't change.",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "0cd51199-aa5a-4fce-8b83-50b82db7ebf5": {
                      "mountPath": "/home/node/.n8n"
                    }
                  }
                },
                "69d2983c-4182-4311-9659-a49fc3de24d2": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "redis",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/evolution-n8n-railway",
                    "rootDirectory": "/redis"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated Redis password.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  }
                },
                "daac3928-58ad-4a6b-8887-d341599d6b6e": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/evolution-n8n-railway",
                    "rootDirectory": "/postgres"
                  },
                  "variables": {
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "daac3928-58ad-4a6b-8887-d341599d6b6e": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "f6d11aca-e697-438f-b9aa-85c582857f0f": {
                  "icon": "https://raw.githubusercontent.com/EvolutionAPI/evolution-api/main/public/images/evolution-logo.png",
                  "name": "evolution",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/evolution-n8n-railway",
                    "rootDirectory": "/evolution"
                  },
                  "variables": {
                    "SERVER_URL": {
                      "isOptional": false,
                      "description": "Public URL of this Evolution API instance. Wired automatically — don't change.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CACHE_REDIS_URI": {
                      "isOptional": false,
                      "description": "Redis cache URI. The family=0 suffix is required on Railway (IPv6-only private DNS) — don't remove it.",
                      "defaultValue": "redis://:${{redis.REDIS_PASSWORD}}@${{redis.RAILWAY_PRIVATE_DOMAIN}}:6379/6?family=0"
                    },
                    "AUTHENTICATION_API_KEY": {
                      "isOptional": false,
                      "description": "Global API key — use it in the apikey header and to sign in to the /manager UI.",
                      "defaultValue": "{{AUTHENTICATION_API_KEY}}"
                    },
                    "DATABASE_CONNECTION_URI": {
                      "isOptional": false,
                      "description": "Postgres connection string. Wired automatically — don't change.",
                      "defaultValue": "postgresql://postgres:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/evolution?schema=evolution_api"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "f6d11aca-e697-438f-b9aa-85c582857f0f": {
                      "mountPath": "/evolution/instances"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "n8n",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T07:24:55.653Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_bf84aa7eaafe4cfca224",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 146,
    "typical_build_seconds": 32,
    "typical_start_seconds": 30,
    "slowest_service": "n8n"
  }
}
