{
  "manifest_version": "1.0.0",
  "template": {
    "id": "5a04117d-171b-46cb-9df7-398965d24988",
    "slug": "databasus-v3-postgres-backups-and-restor",
    "name": "Databasus v3 Postgres Backups and Restore",
    "description": "Scheduled database backups to S3 with a dashboard, alerts and restore.",
    "url": "https://railway.com/deploy/databasus-v3-postgres-backups-and-restor",
    "upstream": {
      "image": "databasus/databasus:v3.61.0"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Databasus",
      "source": {
        "image": "databasus/databasus:v3.61.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/databasus-data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Databasus",
      "description": "Port Railway routes the public domain and the healthcheck to. Databasus always listens on 4005; keep this value.",
      "secret": false,
      "strategy": "default",
      "default": "4005"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Databasus",
      "description": "Log level: debug, info, warn or error.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "S3_BUCKET",
      "service": "Databasus",
      "description": "Railway Bucket name for the S3 API. Not read by Databasus: paste it into Storages, S3, Bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "Databasus",
      "description": "Railway Bucket region (auto). Not read by Databasus: paste it into Storages, S3, Region.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "Databasus",
      "description": "Railway Bucket endpoint. Not read by Databasus: paste it into Storages, S3, Endpoint.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASUS_URL",
      "service": "Databasus",
      "description": "Public URL of this instance, used in invitation and sign-in emails.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "Databasus",
      "description": "Railway Bucket access key. Not read by Databasus: paste it into Storages, S3, Access key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LOG_FILE_IS_ENABLED",
      "service": "Databasus",
      "description": "false = log to stdout only (Railway keeps the logs). true also writes a rotating databasus.log on the volume.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "Databasus",
      "description": "Railway Bucket secret key. Not read by Databasus: paste it into Storages, S3, Secret key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASUS_ADMIN_EMAIL",
      "service": "Databasus",
      "description": "Required. Your email: the administrator account is created with it on first boot, before the dashboard goes online. You sign in with it.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DATABASUS_ADMIN_PASSWORD",
      "service": "Databasus",
      "description": "Initial administrator password, generated at deploy. Read on first boot only; change it later under your Databasus profile.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASUS_DISABLE_SIGNUP",
      "service": "Databasus",
      "description": "true = turn off open self-registration on first boot, so only users you invite can join. Applied once, together with the admin bootstrap.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "IS_DISABLE_ANONYMOUS_TELEMETRY",
      "service": "Databasus",
      "description": "Databasus sends anonymous usage telemetry by default (upstream default). Set true to opt out.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Databasus",
      "description": "Time between SIGTERM and SIGKILL, so Databasus and its embedded PostgreSQL shut down cleanly on redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "databasus-v3-postgres-backups-and-restor"
      }
    },
    "cli": "railway deploy --template databasus-v3-postgres-backups-and-restor",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "5a04117d-171b-46cb-9df7-398965d24988",
            "serializedConfig": {
              "buckets": {
                "076e2007-707c-5588-85c4-6e2ab41064ab": {
                  "name": "Bucket"
                }
              },
              "services": {
                "5583f1f1-68ca-568b-b74f-0abb2c2ea5fb": {
                  "icon": "https://cdn.jsdelivr.net/gh/databasus/databasus@v3.61.0/frontend/public/logo.svg",
                  "name": "Databasus",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'set -eu; if ! grep -Eq \"^[[:space:]]*exec gosu databasus [.]/main[[:space:]]*$\" /app/start.sh; then echo \"railway: unexpected /app/start.sh (no exec gosu databasus ./main), refusing to start without the admin bootstrap\" >&2; exit 1; fi; RAILWAY_REAL_GOSU=\"$(command -v gosu)\"; export RAILWAY_REAL_GOSU; railway_pg_stop() { \"$RAILWAY_REAL_GOSU\" databasus /usr/lib/postgresql/17/bin/pg_ctl -D /databasus-data/pgdata -m fast -w -t 30 stop || true; }; railway_bootstrap() { local marker=/databasus-data/.railway-admin-bootstrapped; if [ -f \"$marker\" ]; then echo \"railway: admin already provisioned on this volume\"; return 0; fi; local email=\"${DATABASUS_ADMIN_EMAIL:-}\"; local password=\"${DATABASUS_ADMIN_PASSWORD:-}\"; if [ -z \"$email\" ] || [ -z \"$password\" ]; then echo \"railway: DATABASUS_ADMIN_EMAIL and DATABASUS_ADMIN_PASSWORD are required, refusing to start without an administrator\" >&2; return 1; fi; echo \"railway: creating admin $email before the web server starts\"; if ! \"$RAILWAY_REAL_GOSU\" databasus ./main --create-user --email=\"$email\" --password=\"$password\" --role=admin; then echo \"railway: admin creation failed, see the error above\" >&2; return 1; fi; if [ \"${DATABASUS_DISABLE_SIGNUP:-true}\" = \"true\" ]; then if ! /usr/lib/postgresql/17/bin/psql -X -q -1 -v ON_ERROR_STOP=1 -d \"$DATABASE_DSN\" -c \"INSERT INTO users_settings (is_allow_external_registrations) SELECT false WHERE NOT EXISTS (SELECT 1 FROM users_settings)\" -c \"UPDATE users_settings SET is_allow_external_registrations = false\"; then echo \"railway: could not turn off sign-up, set DATABASUS_DISABLE_SIGNUP=false to skip this step\" >&2; return 1; fi; echo \"railway: open sign-up turned off (an admin can turn it back on in Databasus settings)\"; fi; \"$RAILWAY_REAL_GOSU\" databasus touch \"$marker\"; }; railway_on_term() { if [ -n \"${RAILWAY_MAIN_PID:-}\" ]; then kill -TERM \"$RAILWAY_MAIN_PID\" 2>/dev/null || true; fi; }; railway_run_main() { trap railway_on_term TERM INT; \"$RAILWAY_REAL_GOSU\" databasus ./main & RAILWAY_MAIN_PID=$!; local status=0; wait \"$RAILWAY_MAIN_PID\" || status=$?; while kill -0 \"$RAILWAY_MAIN_PID\" 2>/dev/null; do status=0; wait \"$RAILWAY_MAIN_PID\" || status=$?; done; echo \"railway: Databasus exited with status $status, stopping embedded PostgreSQL\"; railway_pg_stop; exit \"$status\"; }; railway_shim() { if [ \"$#\" -eq 2 ] && [ \"$1\" = databasus ] && [ \"$2\" = ./main ]; then if ! railway_bootstrap; then railway_pg_stop; exit 1; fi; railway_run_main; fi; exec \"$RAILWAY_REAL_GOSU\" \"$@\"; }; mkdir -p /tmp/railway-gosu-shim; { echo \"#!/bin/bash\"; declare -f railway_pg_stop railway_bootstrap railway_on_term railway_run_main railway_shim; echo \"railway_shim \\\"\\$@\\\"\"; } > /tmp/railway-gosu-shim/gosu; chmod 0755 /tmp/railway-gosu-shim/gosu; export PATH=\"/tmp/railway-gosu-shim:$PATH\"; exec /app/start.sh'",
                    "healthcheckPath": "/api/v1/system/version",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "databasus/databasus:v3.61.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port Railway routes the public domain and the healthcheck to. Databasus always listens on 4005; keep this value.",
                      "defaultValue": "4005"
                    },
                    "LOG_LEVEL": {
                      "isOptional": true,
                      "description": "Log level: debug, info, warn or error.",
                      "defaultValue": "info"
                    },
                    "S3_BUCKET": {
                      "isOptional": true,
                      "description": "Railway Bucket name for the S3 API. Not read by Databasus: paste it into Storages, S3, Bucket.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": true,
                      "description": "Railway Bucket region (auto). Not read by Databasus: paste it into Storages, S3, Region.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "SMTP_FROM": {
                      "isOptional": true,
                      "description": "Optional. Sender address, e.g. noreply@your-domain.com. Empty = SMTP_USER if it is an address.",
                      "defaultValue": ""
                    },
                    "SMTP_HOST": {
                      "isOptional": true,
                      "description": "Optional instance mail server for invitations, password reset and sign-in codes. Railway allows outbound SMTP on the Pro plan only.",
                      "defaultValue": ""
                    },
                    "SMTP_PORT": {
                      "isOptional": true,
                      "description": "Optional. SMTP port, e.g. 587 or 465. Required when SMTP_HOST is set.",
                      "defaultValue": ""
                    },
                    "SMTP_USER": {
                      "isOptional": true,
                      "description": "Optional. SMTP username.",
                      "defaultValue": ""
                    },
                    "S3_ENDPOINT": {
                      "isOptional": true,
                      "description": "Railway Bucket endpoint. Not read by Databasus: paste it into Storages, S3, Endpoint.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "DATABASUS_URL": {
                      "isOptional": true,
                      "description": "Public URL of this instance, used in invitation and sign-in emails.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SMTP_PASSWORD": {
                      "isOptional": true,
                      "description": "Optional. SMTP password or API key.",
                      "defaultValue": ""
                    },
                    "SMTP_SECURITY": {
                      "isOptional": true,
                      "description": "Optional. tls, starttls or none. Empty = tls on port 465, starttls on any other port.",
                      "defaultValue": ""
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": true,
                      "description": "Railway Bucket access key. Not read by Databasus: paste it into Storages, S3, Access key.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "LOG_FILE_IS_ENABLED": {
                      "isOptional": true,
                      "description": "false = log to stdout only (Railway keeps the logs). true also writes a rotating databasus.log on the volume.",
                      "defaultValue": "false"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": true,
                      "description": "Railway Bucket secret key. Not read by Databasus: paste it into Storages, S3, Secret key.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "DATABASUS_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Required. Your email: the administrator account is created with it on first boot, before the dashboard goes online. You sign in with it.",
                      "defaultValue": "{{DATABASUS_ADMIN_EMAIL}}"
                    },
                    "DATABASUS_ADMIN_PASSWORD": {
                      "isOptional": true,
                      "description": "Initial administrator password, generated at deploy. Read on first boot only; change it later under your Databasus profile.",
                      "defaultValue": "{{DATABASUS_ADMIN_PASSWORD}}"
                    },
                    "DATABASUS_DISABLE_SIGNUP": {
                      "isOptional": true,
                      "description": "true = turn off open self-registration on first boot, so only users you invite can join. Applied once, together with the admin bootstrap.",
                      "defaultValue": "true"
                    },
                    "IS_DISABLE_ANONYMOUS_TELEMETRY": {
                      "isOptional": true,
                      "description": "Databasus sends anonymous usage telemetry by default (upstream default). Set true to opt out.",
                      "defaultValue": "false"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Time between SIGTERM and SIGKILL, so Databasus and its embedded PostgreSQL shut down cleanly on redeploy.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:4005": {
                        "port": 4005
                      }
                    }
                  },
                  "volumeMounts": {
                    "16ca56d0-1d8d-5fe1-8319-708f9e55b569": {
                      "mountPath": "/databasus-data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Databasus",
      "method": "GET",
      "path": "/api/v1/system/version",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-19T22:14:48.327Z",
  "generator_version": "0.1.0"
}
