---
title: "Deploy Cap: Self-Hosted Screen Recorder & Loom Alternative"
description: "Record your screen and share video links from your own server."
category: "Other"
url: https://railway.com/deploy/cap-loom-alternative
---

# Deploy Cap: Self-Hosted Screen Recorder & Loom Alternative

Record your screen and share video links from your own server.

**[Deploy Cap: Self-Hosted Screen Recorder & Loom Alternative on Railway](https://railway.com/template/cap-loom-alternative)**

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

- **Creator:** blueorange
- **Category:** Other

## Template content

### cap-web

- **Image:** ghcr.io/capsoftware/cap-web@sha256:8ee4cbd3fd87f88f538831aed06c954c525db9c2426a62abeaf0ca307c5e1ce9
- **Start command:** `node -e 'const e=process.env,fs=require("fs"),d=e.WORKFLOW_LOCAL_DATA_DIR||"/app/apps/web/.workflow-data";if(process.getuid()===0){fs.mkdirSync(d,{recursive:true});fs.chownSync(d,1001,1001);process.setgroups([1001]);process.setgid(1001);process.setuid(1001);console.log("[railway] workflow data in "+d+", running as uid "+process.getuid())}try{const{S3Client:C,PutBucketCorsCommand:P}=require("/app/node_modules/.pnpm/node_modules/@aws-sdk/client-s3");new C({endpoint:e.S3_INTERNAL_ENDPOINT,region:e.CAP_AWS_REGION,forcePathStyle:e.S3_PATH_STYLE==="true",credentials:{accessKeyId:e.CAP_AWS_ACCESS_KEY||"",secretAccessKey:e.CAP_AWS_SECRET_KEY||""}}).send(new P({Bucket:e.CAP_AWS_BUCKET,CORSConfiguration:{CORSRules:[{AllowedOrigins:[e.WEB_URL],AllowedMethods:["GET","HEAD","PUT","POST"],AllowedHeaders:["*"],ExposeHeaders:["ETag"],MaxAgeSeconds:3600}]}})).then(()=>console.log("[railway] bucket CORS set for "+e.WEB_URL),x=>console.error("[railway] bucket CORS not set: "+x.name+" "+x.message))}catch(x){console.error("[railway] bucket CORS skipped: "+x.message)}e.HOSTNAME="::";require("/app/apps/web/server.js")'`
- **Health check:** /api/status
- **Public domain:** Yes

### media-server

- **Image:** ghcr.io/capsoftware/cap-media-server@sha256:d47944a3744f30e0e0a36b184e24ca99b2723618580ffe97853af2b6a08abde4
- **Health check:** /health

### MySQL

- **Image:** mysql:8.0.46@sha256:7dcddc01f13bab2f15cde676d44d01f61fc9f99fe7785e86196dfc07d358ae2b
- **Start command:** `docker-entrypoint.sh mysqld --max_connections=1000 --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --performance-schema=OFF`

## Buckets

- **Bucket**

## Documentation

# Deploy and Host Cap on Railway

![Cap logo](https://github.com/CapSoftware.png)

Cap is an open source **screen recorder and async video platform**, built as an alternative to Loom. Record your screen, camera and microphone with the Cap desktop app for macOS, Windows or Linux, and get a share link the moment you stop. Viewers watch in the browser, leave comments and reactions, and read transcripts. Cap's web app is AGPL-3.0 licensed with about 25,000 GitHub stars, and desktop 0.6.3 shipped in November 2026. This template runs the full self-hosted stack on Railway: the Cap web app, the FFmpeg media server, MySQL and a private Railway Bucket for recordings, with every secret generated for you. Loom Business costs $18 per user per month billed monthly, and Loom's free plan stops at 25 videos of 5 minutes. Cap on Railway costs about $10–20/month for the whole team, with no per-seat fees.

---

## What This Template Deploys

| Service | Purpose |
|---|---|
| **cap-web** | The official Next.js web app on port `3000` with a public domain. Sign-in, dashboard, share pages, comments and the API the desktop app uploads to. Health check on `/api/status`. Volume at `/app/apps/web/.workflow-data` for background job state. |
| **media-server** | The official Bun and FFmpeg media server, private on port `3456`. Processes uploads, builds thumbnails and reports progress back to cap-web. |
| **MySQL** | `mysql:8.0.46`, private only. Volume at `/var/lib/mysql` holds accounts, videos, comments and settings. |
| **Bucket** | A private Railway Bucket for video files, thumbnails and avatars. Viewers get short-lived signed links, so nothing in the bucket is public. |

Both Cap images are pinned by digest to the same upstream build, so a redeploy never changes versions by surprise.

---

## About Hosting Cap

Async video replaces a lot of meetings: a two-minute walkthrough explains a bug, a design or a sprint update better than a long message. Hosted recorders charge for every person who records, cap free plans, and keep every video on their servers. Self-hosted Cap gives the same workflow with recordings in a bucket you own.

**Instant Mode.** Cap uploads while you record and hands you a link as soon as you stop, ready to paste into Slack, email or a ticket.

**Studio Mode.** Record locally, then polish in the desktop editor with backgrounds, zooms, trimming and captions before you share or export.

**Share pages.** Every video gets a page on your domain with playback, comments, emoji reactions and a view count.

**Desktop apps.** Native recorders for macOS, Windows and Linux. Point them at your server under **Settings, Cap Server URL** and new recordings upload to your Railway project.

**Teams.** Organizations, shared spaces and folders keep recordings tidy, and sign-ups can be limited to your company's email domain.

**Your storage.** Recordings live in the Railway Bucket, MySQL holds metadata, and the encryption key for stored credentials is generated per deploy.

---

## Deploy Cap in Under 5 Minutes

1. Click **Deploy on Railway**. Nothing needs to be filled in.
2. Wait about a minute for cap-web to finish its first database migrations, then open the public domain.
3. Enter your email and choose to log in with email. Without email set up, the 6-digit code appears in the **cap-web** deploy logs; copy it within 10 minutes.
4. Install Cap Desktop, set **Cap Server URL** to your Railway domain, and sign in.
5. Record a short test clip and open its share link to confirm upload and playback.

---

## Common Use Cases

- **Async standups:** record a quick walkthrough of the sprint board instead of a status meeting.
- **Bug reports:** show the exact click path with your voice, so engineers can reproduce it.
- **Product demos:** send prospects a polished Studio Mode recording on your own domain.
- **Onboarding and training:** build a library of how-to videos for new hires.
- **Design and code reviews:** walk through a mockup or pull request and collect comments on the video.
- **Customer support:** answer tickets with a short screen recording instead of long instructions.
- **Private or regulated teams:** keep recordings of internal tools out of third-party clouds.
- **Leaving Loom:** import existing Loom videos and keep one library on your own server.

---

## Configuration

| Variable | Required | Default | Description |
|---|---|---|---|
| `WEB_URL` | Auto-set | Railway domain | Public URL of Cap and the bucket's allowed origin |
| `DATABASE_URL` | Auto-set | MySQL reference | Private MySQL connection |
| `NEXTAUTH_SECRET` | 🔐 Auto-generated | 64-char hex | Signs sessions; changing it signs everyone out |
| `DATABASE_ENCRYPTION_KEY` | 🔐 Auto-generated | 64-char hex | Encrypts stored credentials; never change it |
| `MEDIA_SERVER_WEBHOOK_SECRET` | 🔐 Auto-generated | 64-char hex | Shared between cap-web and media-server |
| `CAP_AWS_*`, `S3_*` | Auto-set | Bucket references | Bucket name, region, keys and endpoint |
| `MEDIA_SERVER_URL` | Auto-set | Private URL | Where cap-web sends processing jobs |
| `RESEND_API_KEY` | Optional | not set | Add to send login codes by email |
| `RESEND_FROM_DOMAIN` | Optional | not set | Verified sending domain for those emails |
| `CAP_ALLOWED_SIGNUP_DOMAINS` | Optional | not set | Limits sign-ups to your company domain |

**Set up email.** Login codes go to the logs until you add `RESEND_API_KEY` and `RESEND_FROM_DOMAIN` to cap-web. That suits a solo user, but a team needs real email.

**Close sign-ups.** As soon as email works, anyone who finds your URL can request a code. Add `CAP_ALLOWED_SIGNUP_DOMAINS` with your company domain and redeploy.

**Custom domain.** Add it in Railway, set `WEB_URL` to the new address and redeploy. The start script reapplies the bucket CORS rule for the new origin, so uploads keep working.

**Storage costs.** Railway Buckets bill by stored gigabytes with free egress, so viewers watching a video don't add bandwidth charges. A minute of 1080p screen recording is usually a few megabytes to a few dozen, depending on motion and camera use. Delete old recordings from the dashboard to keep the bucket small.

**Memory.** cap-web is a Next.js app and idles at a few hundred megabytes. The media server only works hard while processing new uploads, so the stack stays cheap between recordings.

**Sharing outside your team.** Share pages work for anyone with the link, no Cap account needed. Viewers who want to comment can sign in, or you can keep videos private to your organization.

**Upgrades.** Images are pinned by digest. To upgrade, change both cap-web and media-server to a newer matching build at the same time, and back up MySQL first.

---

## Cap vs. Alternatives

| Feature | Cap on Railway | Loom Business | Vidyard | OBS Studio |
|---|---|---|---|---|
| Hosting | Self-hosted | Hosted SaaS | Hosted SaaS | Desktop only |
| License | AGPL-3.0 | Proprietary | Proprietary | GPL-2.0 |
| Instant share links | ✅ | ✅ | ✅ | ❌ |
| Comments and reactions | ✅ | ✅ | ✅ | ❌ |
| Recordings in your storage | ✅ | ❌ | ❌ | Local files |
| Per-seat pricing | None | Yes | Yes | None |
| Price | About $10–20/month total | $18/user/month | Per-seat plans | Free |

Loom has more mature analytics and integrations. Vidyard focuses on sales video. OBS is a powerful recorder but has no sharing. Cap gives you Loom-style links with your own storage.

---

## Dependencies for Cap Hosting

- A Railway account.
- The Cap desktop app on each recorder's computer.
- Optional: a Resend account and verified domain for email login codes.

### Deployment Dependencies

- [Cap on GitHub](https://github.com/CapSoftware/Cap): source code and releases
- [Cap documentation](https://cap.so/docs): self-hosting and desktop guides
- [Cap downloads](https://cap.so/download): desktop apps for macOS, Windows and Linux

### Implementation Details

The cap-web start command creates the workflow data folder on the volume, hands it to the app user, drops root privileges, and sets the bucket CORS rule for `WEB_URL` before starting the server. The desktop app uploads straight to the bucket through signed URLs, then the media server processes the file. Railway Buckets have no automatic backups yet, so copy important recordings elsewhere and dump MySQL on a schedule.

---

## Frequently Asked Questions

**What is Cap?**
An AGPL-3.0 open source screen recorder and video sharing platform, built as a self-hostable alternative to Loom.

**How much does it cost to host Cap?**
About $10–20/month on Railway for the whole stack, plus bucket storage, with no per-user fees.

**Where do I find my login code?**
In the cap-web deploy logs until you configure Resend email. Each code is valid for 10 minutes.

**How do I connect the desktop app?**
Open Cap Desktop, go to **Settings**, set **Cap Server URL** to your Railway domain and sign in.

**Are my recordings public?**
No. The bucket is private, and share pages hand out short-lived signed links only to people with the video link.

**How do I stop strangers from signing up?**
Set `CAP_ALLOWED_SIGNUP_DOMAINS` on cap-web to your company's email domain and redeploy.

---

## Why Deploy and Host 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 get Loom-style screen recording and instant share links for your whole team, with videos in your own bucket and no per-seat subscription.


## 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) — Self-hosted virtual tabletop for role-playing games (license required)
- [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-loom-alternative
