Railway
Railway builds the collector from the repository using deploy/railway.json and gives you HTTPS on a
*.up.railway.app domain or your own.
-
Create a project from the repository
In Railway, choose New project → Deploy from GitHub repo and pick your fork of Shardlens. In the service’s Settings → Config-as-code, set the config file to
/deploy/railway.json. Railway then buildsapps/collector/Dockerfileand checks/readyzbefore switching traffic. -
Add PostgreSQL
New → Database → PostgreSQL in the same project.
-
Generate a domain under the service’s Settings → Networking. The collector needs its own address in the next step.
-
Set the variables on the collector service
Variable Value DATABASE_URL${{Postgres.DATABASE_URL}}SHARDLENS_PUBLIC_URLhttps://${{RAILWAY_PUBLIC_DOMAIN}}SHARDLENS_APP_IDYour Discord application ID SHARDLENS_SESSION_SECRETopenssl rand -base64 32SHARDLENS_SETTINGS_KEYopenssl rand -base64 32SHARDLENS_INGEST_KEYnpx shardlens keys --scope ingestSHARDLENS_READ_KEYnpx shardlens keys --scope readSHARDLENS_TRUST_PROXY1${{RAILWAY_PUBLIC_DOMAIN}}is the*.up.railway.appdomain from step 3. With your own domain, write its URL instead. Railway setsPORT, and the collector listens on it. The optional variables are in the environment reference. -
Deploy, then open the domain.