{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f50e0324-d2b5-4cbf-8a5d-8621f9cd109d",
    "slug": "plausible-web-analytics",
    "name": "Plausible Analytics",
    "description": "Cookie-free web analytics on ClickHouse and Postgres, admin set on boot",
    "url": "https://railway.com/deploy/plausible-web-analytics",
    "upstream": {
      "repo_url": "https://github.com/two-workspaces/plausible"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "ClickHouse",
      "source": {
        "repo": "https://github.com/two-workspaces/plausible"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17.11-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Plausible",
      "source": {
        "repo": "https://github.com/two-workspaces/plausible"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/plausible",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "ClickHouse",
      "description": "Auto-generated ClickHouse password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "ClickHouse",
      "description": "Time for ClickHouse to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "plausible"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "plausible"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Plausible",
      "description": "HTTP port Plausible listens on - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "TMPDIR",
      "service": "Plausible",
      "description": "Temporary files for CSV imports and exports, on the volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/plausible/tmp"
    },
    {
      "key": "BASE_URL",
      "service": "Plausible",
      "description": "Public URL of Plausible. Change it when you add a custom domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "HTTP_PORT",
      "service": "Plausible",
      "description": "HTTP port Plausible listens on - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "DATABASE_URL",
      "service": "Plausible",
      "description": "Postgres connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ADMIN_USER_PWD",
      "service": "Plausible",
      "description": "Admin password, generated at deploy time and used on the first boot only. Change it in Plausible afterwards (Settings, Security).",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Plausible",
      "description": "Signs sessions and derives the 2FA key. Changing it signs everyone out and breaks 2FA.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ADMIN_USER_EMAIL",
      "service": "Plausible",
      "description": "Email of the admin account, created on the first boot. You sign in with it.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DISABLE_REGISTRATION",
      "service": "Plausible",
      "description": "Who can sign up: invite_only (default), true (nobody) or false (anyone).",
      "secret": false,
      "strategy": "default",
      "default": "invite_only"
    },
    {
      "key": "CLICKHOUSE_DATABASE_URL",
      "service": "Plausible",
      "description": "ClickHouse connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "plausible-web-analytics"
      }
    },
    "cli": "railway deploy --template plausible-web-analytics",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f50e0324-d2b5-4cbf-8a5d-8621f9cd109d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "341274f0-741c-4bf2-8493-4a5a3fecec38": {
                  "icon": "https://devicons.railway.app/i/clickhouse.svg",
                  "name": "ClickHouse",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/two-workspaces/plausible",
                    "rootDirectory": "/clickhouse"
                  },
                  "variables": {
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated ClickHouse password",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for ClickHouse to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "adec5ad8-1f3d-4578-b7dc-7273cde4f92f": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                },
                "4f5bc358-3290-4e82-9cb2-c2ddd968edc9": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17.11-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "plausible"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "plausible"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "7d65b377-c41e-4bb3-9751-c89111a9e47d": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "7c5ff2ca-cc07-4fdd-b12e-ca8aa598e45a": {
                  "icon": "https://raw.githubusercontent.com/two-workspaces/plausible/main/icon.svg",
                  "name": "Plausible",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/two-workspaces/plausible",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Plausible listens on - leave as is.",
                      "defaultValue": "8000"
                    },
                    "TMPDIR": {
                      "isOptional": false,
                      "description": "Temporary files for CSV imports and exports, on the volume.",
                      "defaultValue": "/var/lib/plausible/tmp"
                    },
                    "BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL of Plausible. Change it when you add a custom domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "HTTP_PORT": {
                      "isOptional": false,
                      "description": "HTTP port Plausible listens on - leave as is.",
                      "defaultValue": "8000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection (private network)",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "ADMIN_USER_PWD": {
                      "isOptional": false,
                      "description": "Admin password, generated at deploy time and used on the first boot only. Change it in Plausible afterwards (Settings, Security).",
                      "defaultValue": "{{ADMIN_USER_PWD}}"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Signs sessions and derives the 2FA key. Changing it signs everyone out and breaks 2FA.",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "ADMIN_USER_EMAIL": {
                      "isOptional": false,
                      "description": "Email of the admin account, created on the first boot. You sign in with it.",
                      "defaultValue": "{{ADMIN_USER_EMAIL}}"
                    },
                    "DISABLE_REGISTRATION": {
                      "isOptional": false,
                      "description": "Who can sign up: invite_only (default), true (nobody) or false (anyone).",
                      "defaultValue": "invite_only"
                    },
                    "CLICKHOUSE_DATABASE_URL": {
                      "isOptional": false,
                      "description": "ClickHouse connection (private network)",
                      "defaultValue": "http://plausible:${{ClickHouse.CLICKHOUSE_PASSWORD}}@${{ClickHouse.RAILWAY_PRIVATE_DOMAIN}}:8123/plausible_events_db"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "b29a63ef-ab59-4112-8728-fc4241c7f560": {
                      "mountPath": "/var/lib/plausible"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Plausible",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-10-28T16:14:58.566Z",
  "generator_version": "0.1.0"
}
