{
  "manifest_version": "1.0.0",
  "template": {
    "id": "97155a11-3f96-45c1-b671-85ce268b1f99",
    "slug": "joplin-server-railway",
    "name": "Joplin Server",
    "description": "Joplin Server — self-hosted sync backend for the Joplin note-taking apps",
    "url": "https://railway.com/deploy/joplin-server-railway",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/joplin-server-railway"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "joplin-server",
      "source": {
        "repo": "https://github.com/gridalpha/joplin-server-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "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": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "joplin-server",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8081"
    },
    {
      "key": "APP_PORT",
      "service": "joplin-server",
      "description": "Port the application listens on",
      "secret": false,
      "strategy": "default",
      "default": "22300"
    },
    {
      "key": "DB_CLIENT",
      "service": "joplin-server",
      "description": "Use PostgreSQL, not SQLite",
      "secret": false,
      "strategy": "default",
      "default": "pg"
    },
    {
      "key": "MFA_ENABLED",
      "service": "joplin-server",
      "description": "Allow TOTP multi-factor authentication",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "APP_BASE_URL",
      "service": "joplin-server",
      "description": "Public URL clients sync against",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "joplin-server",
      "description": "Private database hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "joplin-server",
      "description": "Database port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "joplin-server",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "COOKIES_SECURE",
      "service": "joplin-server",
      "description": "Mark the session cookie Secure",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SIGNUP_ENABLED",
      "service": "joplin-server",
      "description": "Admins create accounts, not the public",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "STORAGE_DRIVER",
      "service": "joplin-server",
      "description": "Note content goes to object storage",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DATABASE",
      "service": "joplin-server",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "joplin-server",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MFA_ENCRYPTION_KEY",
      "service": "joplin-server",
      "description": "Encrypts stored TOTP secrets",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DEFAULT_ADMIN_PASSWORD",
      "service": "joplin-server",
      "description": "Password for admin@localhost",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "joplin-server",
      "description": "Dockerfile at the repo root",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "joplin-server",
      "description": "Let in-flight syncs finish",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "joplin-server-railway"
      }
    },
    "cli": "railway deploy --template joplin-server-railway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "97155a11-3f96-45c1-b671-85ce268b1f99",
            "serializedConfig": {
              "buckets": {
                "935b9a54-98ea-48fa-9b41-03ef96e61ee3": {
                  "name": "joplin-storage"
                }
              },
              "services": {
                "375742a7-940d-4be9-8ccd-899a2e265188": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/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,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "375742a7-940d-4be9-8ccd-899a2e265188": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "4155bd04-a043-45bd-b948-bfc10217ad7c": {
                  "icon": "https://cryov.ceitec.muni.cz/images/server_logo.png",
                  "name": "joplin-server",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/joplin-server-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "8081"
                    },
                    "APP_PORT": {
                      "isOptional": false,
                      "description": "Port the application listens on",
                      "defaultValue": "22300"
                    },
                    "DB_CLIENT": {
                      "isOptional": false,
                      "description": "Use PostgreSQL, not SQLite",
                      "defaultValue": "pg"
                    },
                    "MFA_ENABLED": {
                      "isOptional": false,
                      "description": "Allow TOTP multi-factor authentication",
                      "defaultValue": "1"
                    },
                    "APP_BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL clients sync against",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Private database hostname",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Database port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "COOKIES_SECURE": {
                      "isOptional": false,
                      "description": "Mark the session cookie Secure",
                      "defaultValue": "true"
                    },
                    "SIGNUP_ENABLED": {
                      "isOptional": false,
                      "description": "Admins create accounts, not the public",
                      "defaultValue": "false"
                    },
                    "STORAGE_DRIVER": {
                      "isOptional": false,
                      "description": "Note content goes to object storage",
                      "defaultValue": "Type=S3; Region=${{joplin-storage.REGION}}; AccessKeyId=${{joplin-storage.ACCESS_KEY_ID}}; SecretAccessKeyId=${{joplin-storage.SECRET_ACCESS_KEY}}; Bucket=${{joplin-storage.BUCKET}}; Endpoint=${{joplin-storage.ENDPOINT}}"
                    },
                    "POSTGRES_DATABASE": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "MFA_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts stored TOTP secrets",
                      "defaultValue": "{{MFA_ENCRYPTION_KEY}}"
                    },
                    "DEFAULT_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for admin@localhost",
                      "defaultValue": "{{DEFAULT_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile at the repo root",
                      "defaultValue": "Dockerfile"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Let in-flight syncs finish",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:22300": {
                        "port": 22300
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "joplin-server",
      "method": "GET",
      "path": "/api/ping",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T20:10:14.914Z",
  "success_rate_30d": 0.1429,
  "validation": {
    "last_run_id": "run_537851189c9247a2b71d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 232
  }
}
