{
  "manifest_version": "1.0.0",
  "template": {
    "id": "30b6cd5c-dcb9-48ed-8111-125083e92f72",
    "slug": "O5gHP2",
    "name": "ente",
    "description": "The API server for ente photos & auth (2fa). ",
    "url": "https://railway.com/deploy/O5gHP2",
    "upstream": {
      "image": "ghcr.io/ente-io/server"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "museum",
      "source": {
        "image": "ghcr.io/ente-io/server"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "museum",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "ENDPOINT",
      "service": "museum",
      "description": "The endpoint of the museum server. Use this link to connect to your instance.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ENTE_DB_HOST",
      "service": "museum",
      "description": "Provide a value for ENTE_DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_DB_NAME",
      "service": "museum",
      "description": "Provide a value for ENTE_DB_NAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_DB_PORT",
      "service": "museum",
      "description": "Provide a value for ENTE_DB_PORT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_DB_USER",
      "service": "museum",
      "description": "Provide a value for ENTE_DB_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_DB_PASSWORD",
      "service": "museum",
      "description": "Provide a value for ENTE_DB_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_S3_B2_EU_CEN_KEY",
      "service": "museum",
      "description": "Provide a value for ENTE_S3_B2_EU_CEN_KEY.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_S3_B2_EU_CEN_BUCKET",
      "service": "museum",
      "description": "Provide a value for ENTE_S3_B2_EU_CEN_BUCKET.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_S3_B2_EU_CEN_REGION",
      "service": "museum",
      "description": "Provide a value for ENTE_S3_B2_EU_CEN_REGION.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_S3_B2_EU_CEN_SECRET",
      "service": "museum",
      "description": "Provide a value for ENTE_S3_B2_EU_CEN_SECRET.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENTE_S3_ARE_LOCAL_BUCKETS",
      "service": "museum",
      "description": "Provide a value for ENTE_S3_ARE_LOCAL_BUCKETS.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "ENTE_S3_B2_EU_CEN_ENDPOINT",
      "service": "museum",
      "description": "Provide a value for ENTE_S3_B2_EU_CEN_ENDPOINT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "O5gHP2"
      }
    },
    "cli": "railway deploy --template O5gHP2",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "30b6cd5c-dcb9-48ed-8111-125083e92f72",
            "serializedConfig": {
              "services": {
                "0924b806-efd7-4911-807c-2f1fd1dfe4e7": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "postgres",
                  "build": {},
                  "deploy": {},
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "0924b806-efd7-4911-807c-2f1fd1dfe4e7": {
                      "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."
                  }
                },
                "c3d01575-0ed0-4dc2-b328-4d8ec43a4abd": {
                  "icon": "https://avatars.githubusercontent.com/u/64603161",
                  "name": "museum",
                  "source": {
                    "image": "ghcr.io/ente-io/server"
                  },
                  "variables": {
                    "PORT": {
                      "defaultValue": "8080"
                    },
                    "ENDPOINT": {
                      "description": "The endpoint of the museum server. Use this link to connect to your instance.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "S3_BUCKET": {
                      "isOptional": true,
                      "description": "The name of your bucket. Leave empty, if you're only going to use ente auth.",
                      "defaultValue": ""
                    },
                    "S3_REGION": {
                      "isOptional": true,
                      "description": "Your S3 region. Leave empty, if you're only going to use ente auth.",
                      "defaultValue": ""
                    },
                    "S3_ENDPOINT": {
                      "isOptional": true,
                      "description": "Your S3 enpoint. Leave empty, if you're only going to use ente auth.",
                      "defaultValue": ""
                    },
                    "ENTE_DB_HOST": {
                      "defaultValue": "${{postgres.PGHOST}}"
                    },
                    "ENTE_DB_NAME": {
                      "defaultValue": "${{postgres.POSTGRES_DB}}"
                    },
                    "ENTE_DB_PORT": {
                      "defaultValue": "${{postgres.PGPORT}}"
                    },
                    "ENTE_DB_USER": {
                      "defaultValue": "${{postgres.POSTGRES_USER}}"
                    },
                    "ENTE_KEY_JWT": {
                      "isOptional": true,
                      "description": "Can be left empty for quick start. To generate a key see https://github.com/ente-io/ente/tree/74377a93d8e20e969d9a2531f32f577b5f0ef090/server/tools/gen-random-keys",
                      "defaultValue": ""
                    },
                    "ENTE_KEY_HASH": {
                      "isOptional": true,
                      "description": "Can be left empty for quick start. To generate a key see https://github.com/ente-io/ente/tree/74377a93d8e20e969d9a2531f32f577b5f0ef090/server/tools/gen-random-keys",
                      "defaultValue": ""
                    },
                    "ENTE_DB_PASSWORD": {
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": true,
                      "description": "Your S3 access key id. Leave empty, if you're only going to use ente auth.",
                      "defaultValue": ""
                    },
                    "ENTE_KEY_ENCRYPTION": {
                      "isOptional": true,
                      "description": "Can be left empty for quick start. To generate a key see https://github.com/ente-io/ente/tree/74377a93d8e20e969d9a2531f32f577b5f0ef090/server/tools/gen-random-keys",
                      "defaultValue": ""
                    },
                    "S3_ACCESS_KEY_SECRET": {
                      "isOptional": true,
                      "description": "Your S3 access key secret. Leave empty, if you're only going to use ente auth.",
                      "defaultValue": ""
                    },
                    "ENTE_S3_B2_EU_CEN_KEY": {
                      "defaultValue": "${{museum.S3_ACCESS_KEY_ID}}"
                    },
                    "ENTE_S3_B2_EU_CEN_BUCKET": {
                      "defaultValue": "${{museum.S3_BUCKET}}"
                    },
                    "ENTE_S3_B2_EU_CEN_REGION": {
                      "description": "",
                      "defaultValue": "${{museum.S3_REGION}}"
                    },
                    "ENTE_S3_B2_EU_CEN_SECRET": {
                      "defaultValue": "${{museum.S3_ACCESS_KEY_SECRET}}}}"
                    },
                    "ENTE_S3_ARE_LOCAL_BUCKETS": {
                      "isOptional": false,
                      "defaultValue": "false"
                    },
                    "ENTE_S3_B2_EU_CEN_ENDPOINT": {
                      "defaultValue": "${{museum.S3_ENDPOINT}}"
                    },
                    "ENTE_INTERNAL_HARDCODED-OTT_LOCAL-DOMAIN-VALUE": {
                      "isOptional": true,
                      "description": "A six-digit hardcoded OTTs code, to complete the email verification at account creation, e.g. \"123456\". If left empty the code will be printed in the deploy logs.",
                      "defaultValue": ""
                    },
                    "ENTE_INTERNAL_HARDCODED-OTT_LOCAL-DOMAIN-SUFFIX": {
                      "isOptional": true,
                      "description": "Email domain to use the hardcoded OTP code with. E.g. \"@gmail.com\"",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T11:29:10.073Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_2771df3b46d3437cacd4",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,FAILED"
      }
    ]
  }
}
