Deploy Sorry Cypress
Self-hosted Cypress dashboard alternative for parallel test running
mongodb
Just deployed
/data/db
Just deployed
Just deployed
Just deployed
A self-hosted Cypress dashboard alternative — run tests in parallel, collect results, and visualize outcomes without the Cypress Cloud paywall. Includes MongoDB for persistence, a director for test distribution, a GraphQL API, and a React dashboard UI.
Deploy and Host
Host your own Cypress dashboard on Railway. This template provisions MongoDB, Director, API, and Dashboard services with a persistent volume for test data.
Features
- Parallel test distribution — director splits specs across CI runners automatically
- Dashboard UI — React app with run history, spec status, screenshots, and video playback
- GraphQL API — full query layer for runs, specs, projects, and results
- MongoDB-backed — all test metadata and results persist across restarts
- S3 screenshot storage — automatic capture on failure (optional, requires AWS or MinIO)
- CI integration — drop-in replacement for Cypress Dashboard via
cypress-cloudreporter
Configuration
| Variable | Service | Description | Default |
|---|---|---|---|
MONGODB_URI | director, api | MongoDB connection string | mongodb://mongodb.railway.internal:27017 |
PORT | director | Director HTTP port | 1234 |
PORT | api | GraphQL API port | 4000 |
PORT | dashboard | Dashboard web port | 8080 |
GRAPHQL_SCHEMA_URL | dashboard | Internal API URL for dashboard JS | http://api.railway.internal:4000 |
DASHBOARD_URL | director | Public dashboard URL (CORS/webhook origin) | https://dashboard-production.railway.app |
AWS_ACCESS_KEY_ID | director | S3 access key for screenshot storage | — |
AWS_SECRET_ACCESS_KEY | director | S3 secret key for screenshot storage | — |
AWS_S3_BUCKET | director | S3 bucket name for screenshots | — |
AWS_REGION | director | S3 bucket region | — |
Architecture
CI runners ──► director (:1234) ──► api (:4000) ──► mongodb (:27017)
│
▼
dashboard (:8080) ◄── browser
- director — receives run requests from CI, assigns specs to workers, stores results in MongoDB
- api — GraphQL server that queries MongoDB for runs/specs/projects
- dashboard — React UI that calls the GraphQL API
- mongodb — stores all test metadata, results, screenshots, and video references
About Hosting
Sorry Cypress is a four-service app on Railway:
- MongoDB — stateful database with a persistent volume mounted at
/data/db - Director — stateless HTTP service that receives CI run requests
- API — stateless GraphQL server that reads/writes MongoDB
- Dashboard — static React SPA that calls the API
Inter-service traffic uses Railway's internal networking (*.railway.internal). The dashboard is the only service exposed publicly. The director can optionally be exposed if you need CI runners outside Railway to reach it.
Persistent Storage
The MongoDB service mounts a 5 GB volume at /data/db. All test metadata, results, screenshots, and video references persist across restarts. The other three services are stateless and can be rebuilt without data loss.
Scaling
- Director and API scale horizontally for high test volume
- Dashboard is a static SPA — a single instance handles many concurrent browser clients
- MongoDB is single-instance; scale vertically by increasing volume size
Why Deploy
- Cost — Cypress Cloud charges per test result. Self-hosting means paying only for Railway compute.
- Privacy — test results, screenshots, and videos stay on your own infrastructure.
- Parallelization — distribute specs across many CI runners for faster builds.
- No vendor lock-in — sorry-cypress is open source (MIT). Fork it, modify it, or migrate away anytime.
- Full control — configure S3 storage, set custom retention, and integrate with any CI system.
Dependencies for Deployment
Deployment Dependencies
- Railway project with environment set to
production - Persistent volume mounted at
/data/dbon the MongoDB service - Internal networking (
*.railway.internal) for inter-service communication
Runtime Dependencies
- MongoDB 4.4+ (included via
mongo:4.4image) - Node.js 18+ (bundled in service images)
Common Use Cases
- Replace Cypress Cloud with a self-hosted alternative for test parallelization
- Collect test results from multiple CI runners into a single dashboard
- Keep test metadata and screenshots on your own infrastructure
- Run CI tests cheaper by distributing specs across smaller machines
After Deploy
- Open the dashboard URL in your browser
- Configure your Cypress projects to use the sorry-cypress reporter:
// cypress.config.js module.exports = { reporter: 'cypress-cloud', reporterOptions: { url: 'https://director-production-XXXX.up.railway.app' } } - Run tests — they appear in the dashboard automatically
Template Content