{
  "manifest_version": "1.0.0",
  "template": {
    "id": "254cc715-d9d3-45fd-ba55-2d557153bdca",
    "slug": "plausible",
    "name": "Plausible Analytics | Open Source Google Analytics Alternative",
    "description": "Self-host Plausible Analytics — privacy-first, GDPR-Compliant Web Analytics",
    "url": "https://railway.com/deploy/plausible",
    "upstream": {
      "image": "ghcr.io/plausible/community-edition:v2"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "clickhouse",
      "source": {
        "repo": "https://github.com/railwayapp-templates/plausible"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    },
    {
      "name": "plausible",
      "source": {
        "image": "ghcr.io/plausible/community-edition:v2"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Directory storing Postgres data",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Internal hostname for Postgres",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Default Postgres server port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Username for Postgres login",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for Postgres authentication",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created during initialization",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Internal Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Default Postgres administrator user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate validity duration",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated password for Postgres user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "External Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Graceful shutdown draining time",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "clickhouse",
      "description": "HTTP API port for ClickHouse",
      "secret": false,
      "strategy": "default",
      "default": "8123"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "clickhouse",
      "description": "Database storing analytics events",
      "secret": false,
      "strategy": "default",
      "default": "plausible_events_db"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "clickhouse",
      "description": "Username for ClickHouse authentication",
      "secret": false,
      "strategy": "default",
      "default": "plausible"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "clickhouse",
      "description": "Password for ClickHouse user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT",
      "service": "clickhouse",
      "description": "Enable SQL-based access control",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "BASE_URL",
      "service": "plausible",
      "description": "Public URL of Plausible instance",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "plausible",
      "description": "Postgres connection string for Plausible",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "plausible",
      "description": "Secret used for encryption and sessions",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DISABLE_REGISTRATION",
      "service": "plausible",
      "description": "Restrict account creation to invites",
      "secret": false,
      "strategy": "default",
      "default": "invite_only"
    },
    {
      "key": "CLICKHOUSE_DATABASE_URL",
      "service": "plausible",
      "description": "ClickHouse database connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "plausible"
      }
    },
    "cli": "railway deploy --template plausible",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "254cc715-d9d3-45fd-ba55-2d557153bdca",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "58717599-ca8f-4b12-b2ff-20b58b45780d": {
                  "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:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Directory storing Postgres data",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for Postgres",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Default Postgres server port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username for Postgres login",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for Postgres authentication",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created during initialization",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Default Postgres administrator user",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate validity duration",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for Postgres user",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "External Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown draining time",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "58717599-ca8f-4b12-b2ff-20b58b45780d": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "6e7b4836-410a-4b83-84e1-1c962c3b20ec": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/clickhouse.svg",
                  "name": "clickhouse",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/railwayapp-templates/plausible",
                    "rootDirectory": "packages/clickhouse"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP API port for ClickHouse",
                      "defaultValue": "8123"
                    },
                    "CLICKHOUSE_DB": {
                      "isOptional": false,
                      "description": "Database storing analytics events",
                      "defaultValue": "plausible_events_db"
                    },
                    "CLICKHOUSE_USER": {
                      "isOptional": false,
                      "description": "Username for ClickHouse authentication",
                      "defaultValue": "plausible"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for ClickHouse user",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT": {
                      "isOptional": false,
                      "description": "Enable SQL-based access control",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "6e7b4836-410a-4b83-84e1-1c962c3b20ec": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                },
                "a56cfbfd-6e82-419c-95a2-f8357a33c553": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/plausible.svg",
                  "name": "plausible",
                  "deploy": {
                    "startCommand": "sh -c \"/entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run\"",
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/plausible/community-edition:v2"
                  },
                  "variables": {
                    "BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL of Plausible instance",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string for Plausible",
                      "defaultValue": "postgresql://${{Postgres.PGUSER}}:${{Postgres.PGPASSWORD}}@${{Postgres.PGHOST}}:${{Postgres.PGPORT}}/${{Postgres.PGDATABASE}}"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Secret used for encryption and sessions",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "DISABLE_REGISTRATION": {
                      "isOptional": false,
                      "description": "Restrict account creation to invites",
                      "defaultValue": "invite_only"
                    },
                    "CLICKHOUSE_DATABASE_URL": {
                      "isOptional": false,
                      "description": "ClickHouse database connection string",
                      "defaultValue": "http://plausible:${{clickhouse.CLICKHOUSE_PASSWORD}}@${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}:${{clickhouse.PORT}}/${{clickhouse.CLICKHOUSE_DB}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "plausible",
      "method": "GET",
      "path": "/",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-20T18:06:32.744Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_390f72b4befb42268bfe",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,FAILED,SUCCESS"
      }
    ]
  }
}
