{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c7e43922-a363-4a92-ac27-7bfed099a025",
    "slug": "paperless-ngx-6",
    "name": "paperless-ngx",
    "description": "Document management system with automated tagging, search and AI",
    "url": "https://railway.com/deploy/paperless-ngx-6",
    "upstream": {
      "image": "paperlessngx/paperless-ngx:3.3"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Valkey",
      "source": {
        "image": "valkey/valkey:9"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Gotenberg",
      "source": {
        "image": "gotenberg/gotenberg:8"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Tika",
      "source": {
        "image": "apache/tika"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "paperless-ngx",
      "source": {
        "image": "paperlessngx/paperless-ngx:3.3"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "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": "PORT",
      "service": "Gotenberg",
      "description": "Port the Gotenberg API listens on for document conversion requests.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "OTEL_LOGS_EXPORTER",
      "service": "Gotenberg",
      "description": "OpenTelemetry logs exporter",
      "secret": false,
      "strategy": "default",
      "default": "none"
    },
    {
      "key": "OTEL_TRACES_EXPORTER",
      "service": "Gotenberg",
      "description": "OpenTelemetry trace exporter",
      "secret": false,
      "strategy": "default",
      "default": "none"
    },
    {
      "key": "OTEL_METRICS_EXPORTER",
      "service": "Gotenberg",
      "description": "OpenTelemetry metrics exporter",
      "secret": false,
      "strategy": "default",
      "default": "none"
    },
    {
      "key": "PAPERLESS_URL",
      "service": "paperless-ngx",
      "description": "Public URL where Paperless is reachable (e.g. https://docs.example.com). Used for CSRF checks and generated links.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PAPERLESS_PORT",
      "service": "paperless-ngx",
      "description": "Port the Paperless web server listens on.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "PAPERLESS_REDIS",
      "service": "paperless-ngx",
      "description": "Redis-like connection URL used for the task queue and caching.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PAPERLESS_DBHOST",
      "service": "paperless-ngx",
      "description": "Hostname of the PostgreSQL database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAPERLESS_DBNAME",
      "service": "paperless-ngx",
      "description": "Name of the PostgreSQL database Paperless uses.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAPERLESS_DBPASS",
      "service": "paperless-ngx",
      "description": "Password for the PostgreSQL database user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAPERLESS_DBPORT",
      "service": "paperless-ngx",
      "description": "Port of the PostgreSQL database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAPERLESS_DBUSER",
      "service": "paperless-ngx",
      "description": "Username for connecting to PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAPERLESS_DATA_DIR",
      "service": "paperless-ngx",
      "description": "Directory for internal data such as the search index and classifier model. Should be on a persistent volume.",
      "secret": false,
      "strategy": "default",
      "default": "/data/data"
    },
    {
      "key": "PAPERLESS_DBENGINE",
      "service": "paperless-ngx",
      "description": "Database engine to use.",
      "secret": false,
      "strategy": "default",
      "default": "postgresql"
    },
    {
      "key": "PAPERLESS_ADMIN_USER",
      "service": "paperless-ngx",
      "description": "Super admin username",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PAPERLESS_MEDIA_ROOT",
      "service": "paperless-ngx",
      "description": "Directory where original documents, archived PDFs and thumbnails are stored. Should be on a persistent volume.",
      "secret": false,
      "strategy": "default",
      "default": "/data/media"
    },
    {
      "key": "PAPERLESS_SECRET_KEY",
      "service": "paperless-ngx",
      "description": "Secret key used to sign sessions and tokens. Generated automatically.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PAPERLESS_TIKA_ENABLED",
      "service": "paperless-ngx",
      "description": "Enables Tika and Gotenberg so Office documents and emails can be parsed and converted.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PAPERLESS_ALLOWED_HOSTS",
      "service": "paperless-ngx",
      "description": "Comma-separated list of hostnames Paperless will accept requests for.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PAPERLESS_TIKA_ENDPOINT",
      "service": "paperless-ngx",
      "description": "URL of the Apache Tika server used to extract text from Office files and emails.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PAPERLESS_ADMIN_PASSWORD",
      "service": "paperless-ngx",
      "description": "Super admin password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PAPERLESS_CONSUMPTION_DIR",
      "service": "paperless-ngx",
      "description": "Folder Paperless watches for new documents to import automatically.",
      "secret": false,
      "strategy": "default",
      "default": "/data/consume"
    },
    {
      "key": "PAPERLESS_DB_READ_CACHE_ENABLED",
      "service": "paperless-ngx",
      "description": "Caches database reads in Redis to speed up page loads. Defaults to \"false\".",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PAPERLESS_TIKA_GOTENBERG_ENDPOINT",
      "service": "paperless-ngx",
      "description": "URL of the Gotenberg server used to convert documents and emails to PDF.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT",
      "service": "paperless-ngx",
      "description": "Default layout for PDFs generated from emails: 1 = text then HTML, 2 = HTML then text (default), 3 = HTML only, 4 = text only.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Directory inside the volume where PostgreSQL stores its data files.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname of the database within the Railway network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Default username for connecting to the database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPORT ",
      "service": "Postgres",
      "description": "Port PostgreSQL listens on.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name for connections.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for the default database user.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Name of the database created on first startup.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Full connection string for the database over Railway’s private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser account created on first startup.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Number of days the auto-generated self-signed SSL certificate stays valid.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password for the superuser account. Generated automatically.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds Railway waits after sending a stop signal before killing the old deployment, giving PostgreSQL time to shut down cleanly.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "paperless-ngx-6"
      }
    },
    "cli": "railway deploy --template paperless-ngx-6",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c7e43922-a363-4a92-ac27-7bfed099a025",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "9d817074-5c10-4899-a999-52468bdf30d9": {
                  "icon": "https://valkey.io/img/valkey-logo-og.png",
                  "name": "Valkey",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "valkey/valkey:9"
                  },
                  "variables": {},
                  "volumeMounts": {
                    "9d817074-5c10-4899-a999-52468bdf30d9": {
                      "mountPath": "/data"
                    }
                  }
                },
                "cfb64980-2054-4335-9061-9ca4ed69dcea": {
                  "icon": "https://gotenberg.dev/assets/ideal-img/logo_hero.79666ec.495.png",
                  "name": "Gotenberg",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "gotenberg/gotenberg:8"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the Gotenberg API listens on for document conversion requests.",
                      "defaultValue": "3000"
                    },
                    "OTEL_LOGS_EXPORTER": {
                      "isOptional": true,
                      "description": "OpenTelemetry logs exporter",
                      "defaultValue": "none"
                    },
                    "OTEL_TRACES_EXPORTER": {
                      "isOptional": true,
                      "description": "OpenTelemetry trace exporter",
                      "defaultValue": "none"
                    },
                    "OTEL_METRICS_EXPORTER": {
                      "isOptional": true,
                      "description": "OpenTelemetry metrics exporter",
                      "defaultValue": "none"
                    }
                  }
                },
                "e394dae4-67d8-4fb2-821e-27dc9f87cbeb": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/apache-tika.webp",
                  "name": "Tika",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "apache/tika"
                  },
                  "variables": {}
                },
                "e7015258-a722-4b0e-8ba9-396583206117": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/paperless-ngx.png",
                  "name": "paperless-ngx",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "paperlessngx/paperless-ngx:3.3"
                  },
                  "variables": {
                    "PAPERLESS_URL": {
                      "isOptional": false,
                      "description": "Public URL where Paperless is reachable (e.g. https://docs.example.com). Used for CSRF checks and generated links.",
                      "defaultValue": "{{PAPERLESS_URL}}"
                    },
                    "PAPERLESS_PORT": {
                      "isOptional": false,
                      "description": "Port the Paperless web server listens on.",
                      "defaultValue": "8000"
                    },
                    "PAPERLESS_REDIS": {
                      "isOptional": false,
                      "description": "Redis-like connection URL used for the task queue and caching.",
                      "defaultValue": "redis://${{Valkey.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PAPERLESS_DBHOST": {
                      "isOptional": false,
                      "description": "Hostname of the PostgreSQL database.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "PAPERLESS_DBNAME": {
                      "isOptional": false,
                      "description": "Name of the PostgreSQL database Paperless uses.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "PAPERLESS_DBPASS": {
                      "isOptional": false,
                      "description": "Password for the PostgreSQL database user.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "PAPERLESS_DBPORT": {
                      "isOptional": false,
                      "description": "Port of the PostgreSQL database.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "PAPERLESS_DBUSER": {
                      "isOptional": false,
                      "description": "Username for connecting to PostgreSQL.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "PAPERLESS_DATA_DIR": {
                      "isOptional": false,
                      "description": "Directory for internal data such as the search index and classifier model. Should be on a persistent volume.",
                      "defaultValue": "/data/data"
                    },
                    "PAPERLESS_DBENGINE": {
                      "isOptional": false,
                      "description": "Database engine to use.",
                      "defaultValue": "postgresql"
                    },
                    "PAPERLESS_ADMIN_USER": {
                      "isOptional": false,
                      "description": "Super admin username",
                      "defaultValue": "{{PAPERLESS_ADMIN_USER}}"
                    },
                    "PAPERLESS_MEDIA_ROOT": {
                      "isOptional": false,
                      "description": "Directory where original documents, archived PDFs and thumbnails are stored. Should be on a persistent volume.",
                      "defaultValue": "/data/media"
                    },
                    "PAPERLESS_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Secret key used to sign sessions and tokens. Generated automatically.",
                      "defaultValue": "{{PAPERLESS_SECRET_KEY}}"
                    },
                    "PAPERLESS_TIKA_ENABLED": {
                      "isOptional": false,
                      "description": "Enables Tika and Gotenberg so Office documents and emails can be parsed and converted.",
                      "defaultValue": "true"
                    },
                    "PAPERLESS_ALLOWED_HOSTS": {
                      "isOptional": false,
                      "description": "Comma-separated list of hostnames Paperless will accept requests for.",
                      "defaultValue": "{{PAPERLESS_ALLOWED_HOSTS}}"
                    },
                    "PAPERLESS_TIKA_ENDPOINT": {
                      "isOptional": false,
                      "description": "URL of the Apache Tika server used to extract text from Office files and emails.",
                      "defaultValue": "${{Tika.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PAPERLESS_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Super admin password",
                      "defaultValue": "{{PAPERLESS_ADMIN_PASSWORD}}"
                    },
                    "PAPERLESS_CONSUMPTION_DIR": {
                      "isOptional": false,
                      "description": "Folder Paperless watches for new documents to import automatically.",
                      "defaultValue": "/data/consume"
                    },
                    "PAPERLESS_CORS_ALLOWED_HOSTS": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "PAPERLESS_DB_READ_CACHE_ENABLED": {
                      "isOptional": false,
                      "description": "Caches database reads in Redis to speed up page loads. Defaults to \"false\".",
                      "defaultValue": "false"
                    },
                    "PAPERLESS_TIKA_GOTENBERG_ENDPOINT": {
                      "isOptional": false,
                      "description": "URL of the Gotenberg server used to convert documents and emails to PDF.",
                      "defaultValue": "${{Gotenberg.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT": {
                      "isOptional": false,
                      "description": "Default layout for PDFs generated from emails: 1 = text then HTML, 2 = HTML then text (default), 3 = HTML only, 4 = text only.",
                      "defaultValue": "2"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "e7015258-a722-4b0e-8ba9-396583206117": {
                      "mountPath": "/data"
                    }
                  }
                },
                "f6889204-079b-4f41-a8c4-3ab32631b569": {
                  "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",
                    "autoUpdates": {
                      "type": "vuln",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 1,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 2,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 3,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 4,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 5,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 6,
                          "endHour": 6,
                          "startHour": 2
                        }
                      ]
                    }
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Directory inside the volume where PostgreSQL stores its data files.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname of the database within the Railway network.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Default username for connecting to the database.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGPORT ": {
                      "isOptional": false,
                      "description": "Port PostgreSQL listens on.",
                      "defaultValue": "5432"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name for connections.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the default database user.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the database created on first startup.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Full connection string for the database over Railway’s private network.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser account created on first startup.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Number of days the auto-generated self-signed SSL certificate stays valid.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the superuser account. Generated automatically.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds Railway waits after sending a stop signal before killing the old deployment, giving PostgreSQL time to shut down cleanly.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "f6889204-079b-4f41-a8c4-3ab32631b569": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-10-15T10:14:43.780Z",
  "generator_version": "0.1.0"
}
