---
title: "Deploy Sorry Cypress"
description: "Self-hosted Cypress dashboard alternative for parallel test running"
category: "Automation"
url: https://railway.com/deploy/sorry-cypress
---

# Deploy Sorry Cypress

Self-hosted Cypress dashboard alternative for parallel test running

**[Deploy Sorry Cypress on Railway](https://railway.com/template/sorry-cypress)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/sorry-cypress/manifest.json

- **Creator:** mcmax
- **Category:** Automation
- **Total deploys:** 6

## Template content

### mongodb

- **Image:** mongo:4.4

### director

- **Image:** agoldis/sorry-cypress-director:latest

### dashboard

- **Image:** agoldis/sorry-cypress-dashboard:latest
- **Public domain:** Yes

### api

- **Image:** agoldis/sorry-cypress-api:latest
- **Public domain:** Yes

## Documentation

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.

[![Deploy to Railway](https://railway.app/button.svg)](https://railway.com/deploy/sorry-cypress)

## 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-cloud` reporter

## 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:

1. **MongoDB** — stateful database with a persistent volume mounted at `/data/db`
2. **Director** — stateless HTTP service that receives CI run requests
3. **API** — stateless GraphQL server that reads/writes MongoDB
4. **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/db` on the MongoDB service
- Internal networking (`*.railway.internal`) for inter-service communication

### Runtime Dependencies
- MongoDB 4.4+ (included via `mongo:4.4` image)
- 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

1. Open the dashboard URL in your browser
2. Configure your Cypress projects to use the sorry-cypress reporter:
   ```js
   // cypress.config.js
   module.exports = {
     reporter: 'cypress-cloud',
     reporterOptions: {
       url: 'https://director-production-XXXX.up.railway.app'
     }
   }
   ```
3. Run tests — they appear in the dashboard automatically


## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/sorry-cypress
