{
  "manifest_version": "1.0.0",
  "template": {
    "id": "bb249cdc-56f0-4a3c-8e53-0bc7e523e6d6",
    "slug": "open-archiver",
    "name": "Open Archiver",
    "description": "Self-hosted email archiving: ingest mailboxes, keep them searchable",
    "url": "https://railway.com/deploy/open-archiver",
    "upstream": {
      "image": "ghcr.io/youssefsiam38/openarchiver-railway:1.0.0"
    }
  },
  "services": [
    {
      "name": "cache",
      "source": {
        "image": "valkey/valkey:8-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "app",
      "source": {
        "image": "ghcr.io/youssefsiam38/openarchiver-railway:1.0.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/data/open-archiver",
      "http": true
    },
    {
      "name": "search",
      "source": {
        "image": "getmeili/meilisearch:v1.38"
      },
      "needs_volume": true,
      "volume_mount_path": "/meili_data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_PASSWORD",
      "service": "cache",
      "description": "Password for the job queue, shared with the app.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "app",
      "description": "Port the gate listens on. Railway probes its healthcheck here, so keep it equal to the domain's target port.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "APP_URL",
      "service": "app",
      "description": "Public URL. Sets the CORS origin and forms the OAuth redirect URI, so a wrong value breaks sign-in and mailbox connection.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "JWT_SECRET",
      "service": "app",
      "description": "Signs session tokens. The wrapper refuses upstream example value.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEILI_HOST",
      "service": "app",
      "description": "Private URL of the search service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_HOST",
      "service": "app",
      "description": "Private hostname of the job-queue service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PORT",
      "service": "app",
      "description": "Job-queue port.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "DATABASE_URL",
      "service": "app",
      "description": "PostgreSQL connection string.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "app",
      "description": "Encrypts the stored credentials of every mailbox you connect. Exactly 64 hex characters. Changing it makes existing credentials unreadable.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "app",
      "description": "Job-queue password. Must match the cache service.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SYNC_FREQUENCY",
      "service": "app",
      "description": "How often live mailboxes are re-synced. Upstream's default is every minute.",
      "secret": false,
      "strategy": "default",
      "default": "*/15 * * * *"
    },
    {
      "key": "BODY_SIZE_LIMIT",
      "service": "app",
      "description": "Upload limit for PST and mbox imports.",
      "secret": false,
      "strategy": "default",
      "default": "100M"
    },
    {
      "key": "MEILI_MASTER_KEY",
      "service": "app",
      "description": "Search API key. Must match the search service.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_TLS_ENABLED",
      "service": "app",
      "description": "The queue is reached over the private network, not TLS.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "OPENARCHIVER_ADMIN_EMAIL",
      "service": "app",
      "description": "E-mail of the Super Admin created on first start. Change it to your own.",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "OPENARCHIVER_ADMIN_PASSWORD",
      "service": "app",
      "description": "That account's password. Sign in with it, then change it in the app.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "INDEXING_WORKER_MAX_OLD_SPACE_MB",
      "service": "app",
      "description": "Heap ceiling for the indexing worker. Upstream's default is 2048; lower it further on a small plan.",
      "secret": false,
      "strategy": "default",
      "default": "1024"
    },
    {
      "key": "MEILI_HTTP_ADDR",
      "service": "search",
      "description": "Bind dual-stack so Railway's private network can reach it.",
      "secret": false,
      "strategy": "default",
      "default": "[::]:7700"
    },
    {
      "key": "MEILI_MASTER_KEY",
      "service": "search",
      "description": "Search API key, shared with the app.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEILI_NO_ANALYTICS",
      "service": "search",
      "description": "Disable Meilisearch telemetry.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Provide a value for PGHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Provide a value for PGPORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Provide a value for PGUSER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Provide a value for PGDATABASE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Provide a value for PGPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Provide a value for SSL_CERT_DAYS.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Provide a value for RAILWAY_DEPLOYMENT_DRAINING_SECONDS.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "open-archiver"
      }
    },
    "cli": "railway deploy --template open-archiver",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "bb249cdc-56f0-4a3c-8e53-0bc7e523e6d6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "590b1129-7dcd-4aac-93a8-105e000dffe9": {
                  "icon": null,
                  "name": "cache",
                  "deploy": {
                    "startCommand": "valkey-server --requirepass ${REDIS_PASSWORD} --bind :: 0.0.0.0",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "valkey/valkey:8-alpine"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the job queue, shared with the app.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "590b1129-7dcd-4aac-93a8-105e000dffe9": {
                      "mountPath": "/data"
                    }
                  }
                },
                "5f3911ae-c789-4ab2-8ffb-585ba020a61a": {
                  "icon": null,
                  "name": "app",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v1/auth/status",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/youssefsiam38/openarchiver-railway:1.0.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the gate listens on. Railway probes its healthcheck here, so keep it equal to the domain's target port.",
                      "defaultValue": "8080"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public URL. Sets the CORS origin and forms the OAuth redirect URI, so a wrong value breaks sign-in and mailbox connection.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Signs session tokens. The wrapper refuses upstream example value.",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "MEILI_HOST": {
                      "isOptional": false,
                      "description": "Private URL of the search service.",
                      "defaultValue": "http://${{search.RAILWAY_PRIVATE_DOMAIN}}:7700"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of the job-queue service.",
                      "defaultValue": "${{cache.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Job-queue port.",
                      "defaultValue": "6379"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts the stored credentials of every mailbox you connect. Exactly 64 hex characters. Changing it makes existing credentials unreadable.",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Job-queue password. Must match the cache service.",
                      "defaultValue": "${{cache.REDIS_PASSWORD}}"
                    },
                    "SYNC_FREQUENCY": {
                      "isOptional": false,
                      "description": "How often live mailboxes are re-synced. Upstream's default is every minute.",
                      "defaultValue": "*/15 * * * *"
                    },
                    "BODY_SIZE_LIMIT": {
                      "isOptional": false,
                      "description": "Upload limit for PST and mbox imports.",
                      "defaultValue": "100M"
                    },
                    "MEILI_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Search API key. Must match the search service.",
                      "defaultValue": "${{search.MEILI_MASTER_KEY}}"
                    },
                    "REDIS_TLS_ENABLED": {
                      "isOptional": false,
                      "description": "The queue is reached over the private network, not TLS.",
                      "defaultValue": "false"
                    },
                    "OPENARCHIVER_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "E-mail of the Super Admin created on first start. Change it to your own.",
                      "defaultValue": "admin@example.com"
                    },
                    "OPENARCHIVER_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "That account's password. Sign in with it, then change it in the app.",
                      "defaultValue": "{{OPENARCHIVER_ADMIN_PASSWORD}}"
                    },
                    "INDEXING_WORKER_MAX_OLD_SPACE_MB": {
                      "isOptional": false,
                      "description": "Heap ceiling for the indexing worker. Upstream's default is 2048; lower it further on a small plan.",
                      "defaultValue": "1024"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "5f3911ae-c789-4ab2-8ffb-585ba020a61a": {
                      "mountPath": "/var/data/open-archiver"
                    }
                  }
                },
                "b155ce88-8abe-441e-8c8e-77b8bdaefa93": {
                  "icon": null,
                  "name": "search",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "getmeili/meilisearch:v1.38"
                  },
                  "variables": {
                    "MEILI_HTTP_ADDR": {
                      "isOptional": false,
                      "description": "Bind dual-stack so Railway's private network can reach it.",
                      "defaultValue": "[::]:7700"
                    },
                    "MEILI_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Search API key, shared with the app.",
                      "defaultValue": "{{MEILI_MASTER_KEY}}"
                    },
                    "MEILI_NO_ANALYTICS": {
                      "isOptional": false,
                      "description": "Disable Meilisearch telemetry.",
                      "defaultValue": "true"
                    }
                  },
                  "volumeMounts": {
                    "b155ce88-8abe-441e-8c8e-77b8bdaefa93": {
                      "mountPath": "/meili_data"
                    }
                  }
                },
                "bda62314-793e-4a28-8a03-613084b7687c": {
                  "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:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "bda62314-793e-4a28-8a03-613084b7687c": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "app",
      "method": "GET",
      "path": "/api/v1/auth/status",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-12T10:14:41.946Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-12T08:52:43.793Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_ae2ee601cd5345f49740",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED,SUCCESS,SUCCESS,SUCCESS"
      }
    ]
  }
}
