Railway template scaffolding for Swetrix, an open-source, privacy-first web analytics platform (cookieless Google Analytics alternative with error tracking and performance monitoring). The published Railway marketplace name is swetrix.
Based on the official Swetrix selfhosting Compose stack.
The template runs Swetrix Community Edition as five Railway services:
gateway— public nginx entrypoint (UI + API on one origin)frontend— Swetrix web UI (private)api— analytics API (private)redis— cachingclickhouse— analytics and transactional data
Follow docs/railway-wiring.md when creating or
updating the marketplace template. It contains the exact service names,
reference variables, generated secrets, ports, healthchecks, and volume mounts.
Only gateway, frontend, and api build from this repo; redis and
clickhouse are Docker Image services.
Only the gateway URL should be opened in a browser. Swetrix v5 routes API
requests through /backend/ on the same public origin.
The wrappers currently track Swetrix v5.3.1.
- Copy
.env.exampleto.env. - Replace
SECRET_KEY_BASEandCLICKHOUSE_PASSWORDwith random values (openssl rand -base64 48andopenssl rand -hex 32). - Start the stack:
docker compose up --buildOpen http://localhost:8080 (gateway). Register the first account, then
further registrations stay disabled when DISABLE_REGISTRATION=true.
- Bump the image tags in
services/frontend/Dockerfileandservices/api/Dockerfileto the new Swetrix release. - Diff swetrix/selfhosting for Compose, nginx, or ClickHouse config changes and port them here.
- Run
docker compose configand smoke-test registration, dashboard load, and a tracking event through the gateway URL.
This repository contains deployment configuration only. Swetrix Community Edition is distributed under AGPL-3.0; see the upstream license.