{
  "manifest_version": "1.0.0",
  "template": {
    "id": "66ef7cb2-2d9c-4a08-85ef-f02806a8d7f1",
    "slug": "docspell",
    "name": "DocSpell",
    "description": "Template for a basic DocSpell installation",
    "url": "https://railway.com/deploy/docspell",
    "upstream": {
      "image": "ghcr.io/docspell/restserver:v0.43"
    }
  },
  "services": [
    {
      "name": "docspell-joex",
      "source": {
        "image": "ghcr.io/docspell/joex:v0.43"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "docspell-restserver",
      "source": {
        "image": "ghcr.io/docspell/restserver:v0.43"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "docspell-joex",
      "description": "Time zone (same as REST server by default)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCSPELL_JOEX_APP__ID",
      "service": "docspell-joex",
      "description": "Job executor instance ID (must be unique per instance)",
      "secret": false,
      "strategy": "default",
      "default": "joex1"
    },
    {
      "key": "DOCSPELL_JOEX_JDBC_URL",
      "service": "docspell-joex",
      "description": "Database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCSPELL_JOEX_BASE__URL",
      "service": "docspell-joex",
      "description": "Job executor base URL",
      "secret": false,
      "strategy": "default",
      "default": "http://docspell-joex:7878"
    },
    {
      "key": "DOCSPELL_JOEX_JDBC_USER",
      "service": "docspell-joex",
      "description": "Database UserID",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCSPELL_JOEX_BIND_ADDRESS",
      "service": "docspell-joex",
      "description": "Set bind address",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "DOCSPELL_JOEX_JDBC_PASSWORD",
      "service": "docspell-joex",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCSPELL_JOEX_SCHEDULER_NAME",
      "service": "docspell-joex",
      "description": "Job executor scheduler name",
      "secret": false,
      "strategy": "default",
      "default": "joex1"
    },
    {
      "key": "DOCSPELL_JOEX_CONVERT_HTML__CONVERTER",
      "service": "docspell-joex",
      "description": "Select HTML converter",
      "secret": false,
      "strategy": "default",
      "default": "weasyprint"
    },
    {
      "key": "DOCSPELL_JOEX_PERIODIC__SCHEDULER_NAME",
      "service": "docspell-joex",
      "description": "Job executor periodic scheduler name",
      "secret": false,
      "strategy": "default",
      "default": "joex1"
    },
    {
      "key": "DOCSPELL_JOEX_FULL__TEXT__SEARCH_ENABLED",
      "service": "docspell-joex",
      "description": "Job executor full text search enabled",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCSPELL_JOEX_FULL__TEXT__SEARCH_SOLR_URL",
      "service": "docspell-joex",
      "description": "Solr URL for full text search",
      "secret": false,
      "strategy": "default",
      "default": "http://docspell-solr:8983/solr/docspell"
    },
    {
      "key": "DOCSPELL_JOEX_ADDONS_EXECUTOR__CONFIG_RUNNER",
      "service": "docspell-joex",
      "description": "Misc add-ons info",
      "secret": false,
      "strategy": "default",
      "default": "docker,trivial"
    },
    {
      "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": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "TZ",
      "service": "docspell-restserver",
      "description": "Time zone",
      "secret": false,
      "strategy": "default",
      "default": "Europe/Berlin"
    },
    {
      "key": "DOCSPELL_SERVER_BIND_ADDRESS",
      "service": "docspell-restserver",
      "description": "Set bind address",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "DOCSPELL_SERVER_INTERNAL__URL",
      "service": "docspell-restserver",
      "description": "REST server internal URL",
      "secret": false,
      "strategy": "default",
      "default": "http://docspell-restserver:7880"
    },
    {
      "key": "DOCSPELL_SERVER_BACKEND_JDBC_URL",
      "service": "docspell-restserver",
      "description": "Database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCSPELL_SERVER_BACKEND_JDBC_USER",
      "service": "docspell-restserver",
      "description": "Database UserID",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCSPELL_SERVER_AUTH_SERVER__SECRET",
      "service": "docspell-restserver",
      "description": "Auth server secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DOCSPELL_SERVER_BACKEND_SIGNUP_MODE",
      "service": "docspell-restserver",
      "description": "Allow signups from login page (open/closed)",
      "secret": false,
      "strategy": "default",
      "default": "open"
    },
    {
      "key": "DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD",
      "service": "docspell-restserver",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET",
      "service": "docspell-restserver",
      "description": "Admin endpoint secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DOCSPELL_SERVER_BACKEND_ADDONS_ENABLED",
      "service": "docspell-restserver",
      "description": "REST server backend addons enabled",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCSPELL_SERVER_FULL__TEXT__SEARCH_ENABLED",
      "service": "docspell-restserver",
      "description": "REST server full text search enabled",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCSPELL_SERVER_FULL__TEXT__SEARCH_SOLR_URL",
      "service": "docspell-restserver",
      "description": "Solr URL for full text search",
      "secret": false,
      "strategy": "default",
      "default": "http://docspell-solr:8983/solr/docspell"
    },
    {
      "key": "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_ENABLED",
      "service": "docspell-restserver",
      "description": "Integration endpoint enabled",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_ENABLED",
      "service": "docspell-restserver",
      "description": "Integration endpoint HTTP headers enabled",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE",
      "service": "docspell-restserver",
      "description": "Integration endpoint HTTP header",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "docspell"
      }
    },
    "cli": "railway deploy --template docspell",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "66ef7cb2-2d9c-4a08-85ef-f02806a8d7f1",
            "serializedConfig": {
              "services": {
                "c6a9cd66-9e81-4d5e-8b6b-3428e7c17df2": {
                  "icon": "https://github.com/eikek/docspell/blob/master/artwork/logo-48.png?raw=true",
                  "name": "docspell-joex",
                  "source": {
                    "image": "ghcr.io/docspell/joex:v0.43"
                  },
                  "variables": {
                    "TZ": {
                      "description": "Time zone (same as REST server by default)",
                      "defaultValue": "${{docspell-restserver.TZ}}"
                    },
                    "DOCSPELL_JOEX_APP__ID": {
                      "description": "Job executor instance ID (must be unique per instance)",
                      "defaultValue": "joex1"
                    },
                    "DOCSPELL_JOEX_JDBC_URL": {
                      "description": "Database URL",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "DOCSPELL_JOEX_BASE__URL": {
                      "description": "Job executor base URL",
                      "defaultValue": "http://docspell-joex:7878"
                    },
                    "DOCSPELL_JOEX_JDBC_USER": {
                      "description": "Database UserID",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "DOCSPELL_JOEX_BIND_ADDRESS": {
                      "description": "Set bind address",
                      "defaultValue": "0.0.0.0"
                    },
                    "DOCSPELL_JOEX_JDBC_PASSWORD": {
                      "description": "Database password",
                      "defaultValue": "\n${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "DOCSPELL_JOEX_SCHEDULER_NAME": {
                      "description": "Job executor scheduler name",
                      "defaultValue": "joex1"
                    },
                    "DOCSPELL_JOEX_CONVERT_HTML__CONVERTER": {
                      "description": "Select HTML converter",
                      "defaultValue": "weasyprint"
                    },
                    "DOCSPELL_JOEX_PERIODIC__SCHEDULER_NAME": {
                      "description": "Job executor periodic scheduler name",
                      "defaultValue": "joex1"
                    },
                    "DOCSPELL_JOEX_FULL__TEXT__SEARCH_ENABLED": {
                      "description": "Job executor full text search enabled",
                      "defaultValue": "false"
                    },
                    "DOCSPELL_JOEX_FULL__TEXT__SEARCH_SOLR_URL": {
                      "description": "Solr URL for full text search",
                      "defaultValue": "http://docspell-solr:8983/solr/docspell"
                    },
                    "DOCSPELL_JOEX_ADDONS_EXECUTOR__CONFIG_RUNNER": {
                      "description": "Misc add-ons info",
                      "defaultValue": "docker,trivial"
                    }
                  }
                },
                "ca1cdf95-47f9-4220-b497-b16820a6dc27": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "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": "jdbc:postgresql://${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}?user=${{PGUSER}}&password=${{POSTGRES_PASSWORD}}"
                    },
                    "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}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "ca1cdf95-47f9-4220-b497-b16820a6dc27": {
                      "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."
                  }
                },
                "fe420d2c-c277-4ef6-bcb1-167a56261620": {
                  "icon": "https://github.com/eikek/docspell/blob/master/artwork/logo-48.png?raw=true",
                  "name": "docspell-restserver",
                  "source": {
                    "image": "ghcr.io/docspell/restserver:v0.43"
                  },
                  "variables": {
                    "TZ": {
                      "description": "Time zone",
                      "defaultValue": "Europe/Berlin"
                    },
                    "DOCSPELL_SERVER_BIND_ADDRESS": {
                      "description": "Set bind address",
                      "defaultValue": "0.0.0.0"
                    },
                    "DOCSPELL_SERVER_INTERNAL__URL": {
                      "description": "REST server internal URL",
                      "defaultValue": "http://docspell-restserver:7880"
                    },
                    "DOCSPELL_SERVER_BACKEND_JDBC_URL": {
                      "description": "Database URL",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "DOCSPELL_SERVER_BACKEND_JDBC_USER": {
                      "description": "Database UserID",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "DOCSPELL_SERVER_AUTH_SERVER__SECRET": {
                      "description": "Auth server secret",
                      "defaultValue": "{{DOCSPELL_SERVER_AUTH_SERVER__SECRET}}"
                    },
                    "DOCSPELL_SERVER_BACKEND_SIGNUP_MODE": {
                      "description": "Allow signups from login page (open/closed)",
                      "defaultValue": "open"
                    },
                    "DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD": {
                      "description": "Database password",
                      "defaultValue": "\n${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET": {
                      "description": "Admin endpoint secret",
                      "defaultValue": "{{DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET}}"
                    },
                    "DOCSPELL_SERVER_BACKEND_ADDONS_ENABLED": {
                      "description": "REST server backend addons enabled",
                      "defaultValue": "false"
                    },
                    "DOCSPELL_SERVER_FULL__TEXT__SEARCH_ENABLED": {
                      "description": "REST server full text search enabled",
                      "defaultValue": "false"
                    },
                    "DOCSPELL_SERVER_FULL__TEXT__SEARCH_SOLR_URL": {
                      "description": "Solr URL for full text search",
                      "defaultValue": "http://docspell-solr:8983/solr/docspell"
                    },
                    "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_ENABLED": {
                      "description": "Integration endpoint enabled",
                      "defaultValue": "true"
                    },
                    "DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD": {
                      "isOptional": true,
                      "description": "New invite password (required if signups are closed)",
                      "defaultValue": ""
                    },
                    "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_ENABLED": {
                      "description": "Integration endpoint HTTP headers enabled",
                      "defaultValue": "true"
                    },
                    "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE": {
                      "description": "Integration endpoint HTTP header",
                      "defaultValue": "{{DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:7880": {
                        "port": 7880
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T04:14:46.774Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T22:43:52.934Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f9736e4d3d054d9b9502",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 149,
    "typical_build_seconds": 0,
    "typical_start_seconds": 71,
    "slowest_service": "docspell-joex"
  }
}
