---
title: "Deploy Cap (w/ MinIO)"
description: "Loom alternative screen recorder, no 5 min limit, optional Resend email"
category: "Other"
url: https://railway.com/deploy/cap-w-minio
---

# Deploy Cap (w/ MinIO)

Loom alternative screen recorder, no 5 min limit, optional Resend email

**[Deploy Cap (w/ MinIO) on Railway](https://railway.com/template/cap-w-minio)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/cap-w-minio/manifest.json

- **Creator:** Auromations
- **Category:** Other
- **Total deploys:** 1

## Template content

### Cap Web https://raw.githubusercontent.com/CapSoftware/Cap/main/apps/web/public/apple-touch-icon.png

- **Image:** ghcr.io/capsoftware/cap-web:latest
- **Health check:** /api/status
- **Public domain:** Yes

### MinIO https://devicons.railway.com/i/minio.svg

- **Image:** pgsty/minio:RELEASE.2026-08-04T00-00-00Z
- **Start command:** `/bin/sh -c "exec minio server --address [::]:$MINIO_PRIVATE_PORT $RAILWAY_VOLUME_MOUNT_PATH"`
- **Health check:** /minio/health/live
- **Public domain:** Yes

### MediaServer https://cdn.simpleicons.org/ffmpeg

- **Image:** ghcr.io/capsoftware/cap-media-server:latest
- **Health check:** /health

### MySQL https://devicons.railway.com/i/mysql.svg

- **Image:** mysql:8.0
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0`

## Documentation

# Deploy and Host Cap on Railway

Cap is an open source screen recorder and video sharing platform, a Loom alternative. Record with the Cap desktop app for macOS, Windows or Linux, and get an instant share link with comments, transcripts and viewer analytics. This template runs the Cap Web server so the recordings and links live on your own Railway project.

## About Hosting Cap

Cap has two halves: the desktop recorder everyone installs from cap.so, and Cap Web, the server that stores recordings and serves share links. This template deploys Cap Web with everything it needs:

- **Cap Web**, the Next.js app (dashboard, share pages, desktop API)
- **MySQL** for accounts and video metadata
- **MinIO** for the video files, created and configured on first boot
- **Media Server** for processing, thumbnails and transcoding

On a self-hosted Cap server every account has the Pro features. There is no 5 minute limit on Instant Mode recordings, which is the limit free cap.so accounts hit.

## Common Use Cases

- Product demos, bug reports and walkthroughs shared as links, for a small team or a group of friends
- Keeping recordings on infrastructure you control instead of a third party cloud
- Recording longer than 5 minutes without a cap.so subscription

## Dependencies for Cap Hosting

- The Cap desktop app (free, https://cap.so/download) on each recording machine
- Optional: a Resend account and a verified domain, for emailed sign-in codes

### Deployment Dependencies

- Cap source and docs: https://github.com/CapSoftware/Cap
- Self-hosting guide: https://cap.so/docs/self-hosting
- Resend (optional): https://resend.com

### Implementation Details

**Connect the desktop app.** After the deploy finishes, copy the Cap Web public URL (it is also in the `WEB_URL` variable). In the Cap app open Settings, General, Self-host, paste it into **Cap Server URL** and click Update. Then click **Sign Out** at the bottom left: the current Cap desktop app does not sign you out of cap.so by itself. Sign in again and the sign-in page opens on your server.

**Signing in without email (the default).** If you leave `RESEND_API_KEY` empty, Cap does not send emails. Each sign-in code is printed to Cap Web's deploy logs instead, next to the email address that asked for it, and is valid for 10 minutes. To find it:

1. Open the link in Cap Web's `LOGIN_CODES_URL` variable. It points at your own Cap Web service.
2. Open the latest deployment's logs and search for `Code:`.
3. Use the newest code listed under the right `Email:` line. Requesting a new code makes the older one stop working.

With the Railway CLI: `railway logs --service "Cap Web" | grep -A1 "Email: someone@example.com"`

This doubles as an access gate: nobody can sign in unless someone with access to your Railway project reads them the code.

**Signing in with email.** Set `RESEND_API_KEY` and `RESEND_FROM_DOMAIN` on Cap Web (at deploy time or any time later, then redeploy Cap Web). Codes are sent from `auth@` your domain, which must be verified in Resend. If Resend rejects a message, the error is in the same logs and the sign-in fails rather than pretending a code was sent.

**What this template fixes compared with the original Cap template:**

- MinIO uses `pgsty/minio`, the image Cap's own docker-compose pins. The `minio/minio` image fails to deploy on Railway with no logs.
- MinIO credentials are generated per deploy. The original shares one hardcoded access key across every deployer and has a malformed password generator.
- The media server is reachable. The original's `MEDIA_SERVER_URL` resolved to `http://:3456` because of a service name mismatch.
- Media server callbacks reach Cap Web. The original pointed them at port 3000 while Cap Web listened on 8080.
- MySQL is only reachable on the private network, with no public TCP proxy and no egress billing for database traffic.

**Optional extras** (add to Cap Web any time, then redeploy):

- Google sign-in: `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`
- Transcription: `ASSEMBLY_API_KEY` (AssemblyAI); AI titles and summaries: `OPENAI_API_KEY` or `GROQ_API_KEY`
- A custom domain: add it to Cap Web in Railway, then update `WEB_URL` and the desktop apps' server URL

**Troubleshooting**

- *Desktop app still shows your cap.so account after changing the URL:* click Sign Out, then Sign In.
- *"Invalid code":* a newer code was requested for that email. Use the newest one in the logs.
- *Share links load but videos do not play:* check that the MinIO service has a public domain. Browsers stream videos from it directly.

**Upgrades and scaling.** Cap publishes only `latest` images, so a redeploy of Cap Web and Media Server picks up the newest release. Storage grows with your recordings on the MinIO volume. To use Cloudflare R2 or S3 instead, change the `CAP_AWS_*` and `S3_*` variables on Cap Web.

## Why Deploy Cap on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Cap on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/cap-w-minio
