{
  "manifest_version": "1.0.0",
  "template": {
    "id": "3a8308b3-2df0-4eab-b50d-7bf22e067a69",
    "slug": "evolution-api-whatsapp-rest-api",
    "name": "Evolution API (WhatsApp REST API)",
    "description": "Self-hosted WhatsApp REST API with Postgres + Redis. Hardened defaults.",
    "url": "https://railway.com/deploy/evolution-api-whatsapp-rest-api",
    "upstream": {
      "image": "evoapicloud/evolution-api:v2.3.7"
    }
  },
  "services": [
    {
      "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:7.4.9-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "evolution-api",
      "source": {
        "image": "evoapicloud/evolution-api:v2.3.7"
      },
      "needs_volume": true,
      "volume_mount_path": "/evolution/instances",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data directory inside the mounted volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name created on first boot.",
      "secret": false,
      "strategy": "default",
      "default": "evolution"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Connection string used by Evolution API over private networking.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user for Evolution API.",
      "secret": false,
      "strategy": "default",
      "default": "evolution"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auto-generated Redis password (used by the start command and Evolution API cache URI).",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "LANGUAGE",
      "service": "evolution-api",
      "description": "Default language.",
      "secret": false,
      "strategy": "default",
      "default": "en"
    },
    {
      "key": "SERVER_URL",
      "service": "evolution-api",
      "description": "Public URL of this Evolution API instance.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CACHE_REDIS_URI",
      "service": "evolution-api",
      "description": "Authenticated Redis connection over private networking.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_PROVIDER",
      "service": "evolution-api",
      "description": "Database engine (PostgreSQL).",
      "secret": false,
      "strategy": "default",
      "default": "postgresql"
    },
    {
      "key": "TELEMETRY_ENABLED",
      "service": "evolution-api",
      "description": "Disable telemetry.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CACHE_REDIS_ENABLED",
      "service": "evolution-api",
      "description": "Enable Redis cache (recommended).",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "AUTHENTICATION_API_KEY",
      "service": "evolution-api",
      "description": "Auto-generated master API key. This key controls your entire WhatsApp API - keep it secret. Use it as the apikey header and to log into the Manager UI.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CACHE_REDIS_PREFIX_KEY",
      "service": "evolution-api",
      "description": "Key prefix for cache entries.",
      "secret": true,
      "strategy": "default",
      "default": "evolution"
    },
    {
      "key": "DATABASE_CONNECTION_URI",
      "service": "evolution-api",
      "description": "Postgres connection string over private networking.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WA_BUSINESS_TOKEN_WEBHOOK",
      "service": "evolution-api",
      "description": "Auto-generated webhook verification token for official WhatsApp Cloud API mode.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_CONNECTION_CLIENT_NAME",
      "service": "evolution-api",
      "description": "Client name tag for DB connections.",
      "secret": false,
      "strategy": "default",
      "default": "evolution"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "evolution-api-whatsapp-rest-api"
      }
    },
    "cli": "railway deploy --template evolution-api-whatsapp-rest-api",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "3a8308b3-2df0-4eab-b50d-7bf22e067a69",
            "serializedConfig": {
              "services": {
                "0c881e92-ef80-4b26-ada5-a3e13d8531b8": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres",
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "description": "Postgres data directory inside the mounted volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "description": "Database name created on first boot.",
                      "defaultValue": "evolution"
                    },
                    "DATABASE_URL": {
                      "description": "Connection string used by Evolution API over private networking.",
                      "defaultValue": "postgresql://${{ POSTGRES_USER }}:${{ POSTGRES_PASSWORD }}@${{ RAILWAY_PRIVATE_DOMAIN }}:5432/${{ POSTGRES_DB }}"
                    },
                    "POSTGRES_USER": {
                      "description": "Database user for Evolution API.",
                      "defaultValue": "evolution"
                    },
                    "POSTGRES_PASSWORD": {
                      "description": "Auto-generated database password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "0c881e92-ef80-4b26-ada5-a3e13d8531b8": {
                      "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."
                  }
                },
                "2e453677-f0f9-45de-972c-26abf4e4a41c": {
                  "icon": "https://devicons.railway.com/i/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "sh -c 'exec redis-server --requirepass \"$REDIS_PASSWORD\" --appendonly yes --bind 0.0.0.0 ::'"
                  },
                  "source": {
                    "image": "redis:7.4.9-alpine"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "description": "Auto-generated Redis password (used by the start command and Evolution API cache URI).",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "2e453677-f0f9-45de-972c-26abf4e4a41c": {
                      "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."
                  }
                },
                "8ecbc237-babc-4d70-8333-b0d35ac0fb98": {
                  "icon": "https://devicons.railway.com/i/whatsapp.svg",
                  "name": "evolution-api",
                  "deploy": {
                    "healthcheckPath": "/"
                  },
                  "source": {
                    "image": "evoapicloud/evolution-api:v2.3.7"
                  },
                  "variables": {
                    "LANGUAGE": {
                      "description": "Default language.",
                      "defaultValue": "en"
                    },
                    "SERVER_URL": {
                      "description": "Public URL of this Evolution API instance.",
                      "defaultValue": "https://${{ RAILWAY_PUBLIC_DOMAIN }}"
                    },
                    "CACHE_REDIS_URI": {
                      "description": "Authenticated Redis connection over private networking.",
                      "defaultValue": "redis://default:${{ Redis.REDIS_PASSWORD }}@${{ Redis.RAILWAY_PRIVATE_DOMAIN }}:6379"
                    },
                    "DATABASE_PROVIDER": {
                      "description": "Database engine (PostgreSQL).",
                      "defaultValue": "postgresql"
                    },
                    "TELEMETRY_ENABLED": {
                      "description": "Disable telemetry.",
                      "defaultValue": "false"
                    },
                    "CACHE_REDIS_ENABLED": {
                      "description": "Enable Redis cache (recommended).",
                      "defaultValue": "true"
                    },
                    "AUTHENTICATION_API_KEY": {
                      "description": "Auto-generated master API key. This key controls your entire WhatsApp API - keep it secret. Use it as the apikey header and to log into the Manager UI.",
                      "defaultValue": "{{AUTHENTICATION_API_KEY}}"
                    },
                    "CACHE_REDIS_PREFIX_KEY": {
                      "description": "Key prefix for cache entries.",
                      "defaultValue": "evolution"
                    },
                    "DATABASE_CONNECTION_URI": {
                      "description": "Postgres connection string over private networking.",
                      "defaultValue": "${{ Postgres.DATABASE_URL }}"
                    },
                    "WA_BUSINESS_TOKEN_WEBHOOK": {
                      "description": "Auto-generated webhook verification token for official WhatsApp Cloud API mode.",
                      "defaultValue": "{{WA_BUSINESS_TOKEN_WEBHOOK}}"
                    },
                    "DATABASE_CONNECTION_CLIENT_NAME": {
                      "description": "Client name tag for DB connections.",
                      "defaultValue": "evolution"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "8ecbc237-babc-4d70-8333-b0d35ac0fb98": {
                      "mountPath": "/evolution/instances"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "evolution-api",
      "method": "GET",
      "path": "/",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T00:14:11.041Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_af458ae910f84026ab3a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 67,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "evolution-api"
  }
}
