{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d580cc7f-9d5f-44b5-91d4-c97fe3a642c4",
    "slug": "papra-dms",
    "name": "Papra",
    "description": "Document archive that makes scans and PDFs searchable by their text",
    "url": "https://railway.com/deploy/papra-dms",
    "upstream": {
      "image": "axllent/mailpit:latest"
    }
  },
  "services": [
    {
      "name": "mailpit",
      "source": {
        "image": "axllent/mailpit:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "papra",
      "source": {
        "repo": "https://github.com/gridalpha/papra-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/app-data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "mailpit",
      "description": "Web inbox port",
      "secret": false,
      "strategy": "default",
      "default": "8025"
    },
    {
      "key": "SMTP_USER",
      "service": "mailpit",
      "description": "SMTP username Papra authenticates with",
      "secret": false,
      "strategy": "default",
      "default": "papra"
    },
    {
      "key": "MP_UI_AUTH",
      "service": "mailpit",
      "description": "Basic auth on the web inbox",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MP_DATABASE",
      "service": "mailpit",
      "description": "Message store on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/mailpit.db"
    },
    {
      "key": "MP_SMTP_AUTH",
      "service": "mailpit",
      "description": "Credentials the SMTP listener accepts",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SMTP_PASSWORD",
      "service": "mailpit",
      "description": "SMTP password Papra authenticates with",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MP_MAX_MESSAGES",
      "service": "mailpit",
      "description": "Messages kept before rotation",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "MP_SMTP_AUTH_ALLOW_INSECURE",
      "service": "mailpit",
      "description": "Allow auth on the plaintext private listener",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PORT",
      "service": "papra",
      "description": "HTTP port the app listens on",
      "secret": false,
      "strategy": "default",
      "default": "1221"
    },
    {
      "key": "SMTP_HOST",
      "service": "papra",
      "description": "Private mail host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SMTP_PORT",
      "service": "papra",
      "description": "Mailpit SMTP port",
      "secret": false,
      "strategy": "default",
      "default": "1025"
    },
    {
      "key": "SMTP_USER",
      "service": "papra",
      "description": "SMTP username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTH_SECRET",
      "service": "papra",
      "description": "Session signing secret, 32+ chars",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SMTP_SECURE",
      "service": "papra",
      "description": "Plain connection on the private network",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "APP_BASE_URL",
      "service": "papra",
      "description": "Public URL for links and cookies",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "papra",
      "description": "SQLite database on the volume",
      "secret": false,
      "strategy": "default",
      "default": "file:/app/app-data/db/db.sqlite"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "papra",
      "description": "Node heap ceiling for the container",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=3072"
    },
    {
      "key": "EMAILS_DRIVER",
      "service": "papra",
      "description": "Send mail over SMTP",
      "secret": false,
      "strategy": "default",
      "default": "smtp"
    },
    {
      "key": "SMTP_PASSWORD",
      "service": "papra",
      "description": "SMTP password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAPRA_ADMIN_NAME",
      "service": "papra",
      "description": "Display name for that account",
      "secret": false,
      "strategy": "default",
      "default": "Admin"
    },
    {
      "key": "PAPRA_ADMIN_EMAIL",
      "service": "papra",
      "description": "First admin account, seeded at boot",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "EMAILS_FROM_ADDRESS",
      "service": "papra",
      "description": "From address on outgoing mail",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SERVER_CORS_ORIGINS",
      "service": "papra",
      "description": "Origins allowed to call the API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PAPRA_ADMIN_PASSWORD",
      "service": "papra",
      "description": "Its password, at least 8 characters",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DOCUMENTS_OCR_LANGUAGES",
      "service": "papra",
      "description": "Tesseract language codes",
      "secret": false,
      "strategy": "default",
      "default": "eng"
    },
    {
      "key": "DOCUMENT_STORAGE_DRIVER",
      "service": "papra",
      "description": "Store documents in object storage",
      "secret": false,
      "strategy": "default",
      "default": "s3"
    },
    {
      "key": "DOCUMENT_STORAGE_S3_REGION",
      "service": "papra",
      "description": "Bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTH_IS_REGISTRATION_ENABLED",
      "service": "papra",
      "description": "Public sign-up, closed by default",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCUMENT_STORAGE_S3_ENDPOINT",
      "service": "papra",
      "description": "Bucket endpoint, scheme included",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTH_IS_PASSWORD_RESET_ENABLED",
      "service": "papra",
      "description": "Password reset emails",
      "secret": true,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCUMENT_STORAGE_S3_BUCKET_NAME",
      "service": "papra",
      "description": "Bucket holding document files",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "papra",
      "description": "First-boot health check window",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "DOCUMENT_STORAGE_MAX_UPLOAD_SIZE",
      "service": "papra",
      "description": "Per-file upload ceiling in bytes",
      "secret": false,
      "strategy": "default",
      "default": "26214400"
    },
    {
      "key": "DOCUMENT_STORAGE_S3_ACCESS_KEY_ID",
      "service": "papra",
      "description": "Bucket access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCUMENT_STORAGE_S3_FORCE_PATH_STYLE",
      "service": "papra",
      "description": "Path-style addressing, required here",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCUMENT_STORAGE_S3_SECRET_ACCESS_KEY",
      "service": "papra",
      "description": "Bucket secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DOCUMENT_STORAGE_ENCRYPTION_IS_ENABLED",
      "service": "papra",
      "description": "Encrypt documents at rest",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCUMENT_STORAGE_DOCUMENT_KEY_ENCRYPTION_KEYS",
      "service": "papra",
      "description": "Key wrapping each document key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "papra-dms"
      }
    },
    "cli": "railway deploy --template papra-dms",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d580cc7f-9d5f-44b5-91d4-c97fe3a642c4",
            "serializedConfig": {
              "buckets": {
                "fa26ec72-1d2c-45b4-86e4-7952eac55506": {
                  "name": "papra-documents"
                }
              },
              "services": {
                "40fe453b-971f-4143-903d-e0b578b3fd86": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mailpit.svg",
                  "name": "mailpit",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/livez",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "axllent/mailpit:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Web inbox port",
                      "defaultValue": "8025"
                    },
                    "SMTP_USER": {
                      "isOptional": false,
                      "description": "SMTP username Papra authenticates with",
                      "defaultValue": "papra"
                    },
                    "MP_UI_AUTH": {
                      "isOptional": false,
                      "description": "Basic auth on the web inbox",
                      "defaultValue": "{{MP_UI_AUTH}}"
                    },
                    "MP_DATABASE": {
                      "isOptional": false,
                      "description": "Message store on the volume",
                      "defaultValue": "/data/mailpit.db"
                    },
                    "MP_SMTP_AUTH": {
                      "isOptional": false,
                      "description": "Credentials the SMTP listener accepts",
                      "defaultValue": "${{SMTP_USER}}:${{SMTP_PASSWORD}}"
                    },
                    "SMTP_PASSWORD": {
                      "isOptional": false,
                      "description": "SMTP password Papra authenticates with",
                      "defaultValue": "{{SMTP_PASSWORD}}"
                    },
                    "MP_MAX_MESSAGES": {
                      "isOptional": true,
                      "description": "Messages kept before rotation",
                      "defaultValue": "5000"
                    },
                    "MP_SMTP_AUTH_ALLOW_INSECURE": {
                      "isOptional": false,
                      "description": "Allow auth on the plaintext private listener",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8025": {
                        "port": 8025
                      }
                    }
                  },
                  "volumeMounts": {
                    "40fe453b-971f-4143-903d-e0b578b3fd86": {
                      "mountPath": "/data"
                    }
                  }
                },
                "c97869a6-f809-49d4-b067-12b642e8b93f": {
                  "icon": "https://cdn.jsdelivr.net/gh/papra-hq/papra@main/.github/icon-light.png",
                  "name": "papra",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/papra-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port the app listens on",
                      "defaultValue": "1221"
                    },
                    "SMTP_HOST": {
                      "isOptional": false,
                      "description": "Private mail host",
                      "defaultValue": "${{mailpit.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "SMTP_PORT": {
                      "isOptional": false,
                      "description": "Mailpit SMTP port",
                      "defaultValue": "1025"
                    },
                    "SMTP_USER": {
                      "isOptional": false,
                      "description": "SMTP username",
                      "defaultValue": "${{mailpit.SMTP_USER}}"
                    },
                    "AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Session signing secret, 32+ chars",
                      "defaultValue": "{{AUTH_SECRET}}"
                    },
                    "SMTP_SECURE": {
                      "isOptional": false,
                      "description": "Plain connection on the private network",
                      "defaultValue": "false"
                    },
                    "APP_BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL for links and cookies",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "SQLite database on the volume",
                      "defaultValue": "file:/app/app-data/db/db.sqlite"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": true,
                      "description": "Node heap ceiling for the container",
                      "defaultValue": "--max-old-space-size=3072"
                    },
                    "EMAILS_DRIVER": {
                      "isOptional": false,
                      "description": "Send mail over SMTP",
                      "defaultValue": "smtp"
                    },
                    "SMTP_PASSWORD": {
                      "isOptional": false,
                      "description": "SMTP password",
                      "defaultValue": "${{mailpit.SMTP_PASSWORD}}"
                    },
                    "PAPRA_ADMIN_NAME": {
                      "isOptional": true,
                      "description": "Display name for that account",
                      "defaultValue": "Admin"
                    },
                    "PAPRA_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First admin account, seeded at boot",
                      "defaultValue": "admin@example.com"
                    },
                    "EMAILS_FROM_ADDRESS": {
                      "isOptional": false,
                      "description": "From address on outgoing mail",
                      "defaultValue": "Papra <papra@${{RAILWAY_PUBLIC_DOMAIN}}>"
                    },
                    "SERVER_CORS_ORIGINS": {
                      "isOptional": false,
                      "description": "Origins allowed to call the API",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PAPRA_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Its password, at least 8 characters",
                      "defaultValue": "{{PAPRA_ADMIN_PASSWORD}}"
                    },
                    "DOCUMENTS_OCR_LANGUAGES": {
                      "isOptional": true,
                      "description": "Tesseract language codes",
                      "defaultValue": "eng"
                    },
                    "DOCUMENT_STORAGE_DRIVER": {
                      "isOptional": false,
                      "description": "Store documents in object storage",
                      "defaultValue": "s3"
                    },
                    "DOCUMENT_STORAGE_S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket region",
                      "defaultValue": "${{papra-documents.REGION}}"
                    },
                    "AUTH_IS_REGISTRATION_ENABLED": {
                      "isOptional": true,
                      "description": "Public sign-up, closed by default",
                      "defaultValue": "false"
                    },
                    "DOCUMENT_STORAGE_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Bucket endpoint, scheme included",
                      "defaultValue": "${{papra-documents.ENDPOINT}}"
                    },
                    "AUTH_IS_PASSWORD_RESET_ENABLED": {
                      "isOptional": true,
                      "description": "Password reset emails",
                      "defaultValue": "true"
                    },
                    "DOCUMENT_STORAGE_S3_BUCKET_NAME": {
                      "isOptional": false,
                      "description": "Bucket holding document files",
                      "defaultValue": "${{papra-documents.BUCKET}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First-boot health check window",
                      "defaultValue": "600"
                    },
                    "DOCUMENT_STORAGE_MAX_UPLOAD_SIZE": {
                      "isOptional": true,
                      "description": "Per-file upload ceiling in bytes",
                      "defaultValue": "26214400"
                    },
                    "DOCUMENT_STORAGE_S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Bucket access key",
                      "defaultValue": "${{papra-documents.ACCESS_KEY_ID}}"
                    },
                    "DOCUMENT_STORAGE_S3_FORCE_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Path-style addressing, required here",
                      "defaultValue": "true"
                    },
                    "DOCUMENT_STORAGE_S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Bucket secret key",
                      "defaultValue": "${{papra-documents.SECRET_ACCESS_KEY}}"
                    },
                    "DOCUMENT_STORAGE_ENCRYPTION_IS_ENABLED": {
                      "isOptional": false,
                      "description": "Encrypt documents at rest",
                      "defaultValue": "true"
                    },
                    "DOCUMENT_STORAGE_DOCUMENT_KEY_ENCRYPTION_KEYS": {
                      "isOptional": false,
                      "description": "Key wrapping each document key",
                      "defaultValue": "{{DOCUMENT_STORAGE_DOCUMENT_KEY_ENCRYPTION_KEYS}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:1221": {
                        "port": 1221
                      }
                    }
                  },
                  "volumeMounts": {
                    "c97869a6-f809-49d4-b067-12b642e8b93f": {
                      "mountPath": "/app/app-data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "mailpit",
      "method": "GET",
      "path": "/livez",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T22:14:40.394Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-15T19:20:18.665Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_e3653ed13ef442eab94d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ]
  }
}
