---
title: "Deploy Cap Desktop"
description: "Point Cap Desktop on Mac and Windows at your own server"
category: "Other"
url: https://railway.com/deploy/deploy-cap-screen-recorder-for-mac
---

# Deploy Cap Desktop

Point Cap Desktop on Mac and Windows at your own server

**[Deploy Cap Desktop on Railway](https://railway.com/template/deploy-cap-screen-recorder-for-mac)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-cap-screen-recorder-for-mac/manifest.json

- **Creator:** onepush
- **Category:** Other

## Template content

### media-server

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

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

### 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 self hosted Cap Desktop (Open-Source Screen Recorder for Mac and Windows) on Railway

This template runs your own Cap server on Railway, so Cap Desktop on Mac, Windows or a Linux .deb uploads every recording to you instead of Cap Cloud. Here is the setup order, from permissions to Instant Mode.

## About Hosting Cap Desktop open-source software on Railway (self hosted Cap Desktop with a self-hosted server template)

This template runs the backend half of Cap: cap-web, a private media-server with FFmpeg, MySQL, and a private Railway Bucket for recordings.

Railway gives you the domain, TLS, private networking and generated secrets; you own the MySQL and bucket backups. Idle is about 850 MB of RAM.

## Why Deploy Cap Desktop, the Loom alternative on Railway (Railway Free Trial)

Loom bills per seat and keeps the library. The $5 trial covers a full deploy, so prove the upload path first.

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 Desktop 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.

### Railway vs Other Hosting Providers and VPS for Cap Desktop self hosting

Railway ships the four Cap services wired as a template; the rest hand you a server and a compose file.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | Template, secrets generated, CORS set on boot. | Droplet, managed MySQL and Spaces; you wire CORS. |
| AWS | Same four services, private MySQL and media-server. | EC2 or ECS with RDS and S3; IAM and setup on you. |
| Hetzner | Managed platform, no patching, usage-based billing. | Cheap RAM-rich VPS; install Docker, MySQL, MinIO, backups. |

The template wins on time to first upload; a bare VPS wins on raw cost.

## Common Use Cases for hosted Cap Desktop

- **Bug reports with an instant link:** record the broken window in Instant Mode, paste the share link into the ticket before the stack trace, and let the developer watch it on your own domain.
- **Async team updates recorded on a Mac:** a two minute walkthrough with the microphone on replaces a meeting, and the upload lands in your bucket instead of someone else's.
- **Polished Studio Mode tutorials:** trim the timeline, add the visual styling, export locally, then upload only the version you're happy with.
- **Customer support walkthroughs:** show the exact click path in a short recording and send the share link; recordings play through short-lived presigned URLs, so the bucket itself never goes public.
- **Keeping client recordings on your own storage:** with CAP_VIDEOS_DEFAULT_PUBLIC=false, every new recording stays private until you hand out the link, and the files live in a Railway Bucket you control.

## Dependencies for Cap Desktop Docker hosted on Railway

The template runs four parts: cap-web, media-server, MySQL and a private Railway Bucket. Cap Desktop itself is not hosted here. Your Mac or Windows machine is the recorder, and it only talks to cap-web over HTTPS on port 3000.

### Deployment Dependencies for Managed Cap Desktop Service (Screen Recording)

- **cap-web:** public port 3000, health check /api/status, volume at /app/apps/web/.workflow-data.
- **media-server:** private port 3456, health check /health, no volume.
- **MySQL:** private port 3306, volume /var/lib/mysql, database cap.
- **Railway Bucket:** private storage for recordings and thumbnails.

### Implementation Details for Cap Desktop (Using Cap official docker image)

- **Images:** ghcr.io/capsoftware/cap-web and ghcr.io/capsoftware/cap-media-server, pinned by digest from the same commit c5f22d7, since upstream only ships a moving latest tag.
- **Core variables:** PORT=3000, HOSTNAME=::, WEB_URL, NEXTAUTH_URL, DATABASE_URL, DATABASE_ENCRYPTION_KEY, NEXTAUTH_SECRET, MEDIA_SERVER_URL, S3_PATH_STYLE=false.
- **CORS:** the start command applies a bucket rule allowing only WEB_URL on every boot, because Railway Buckets ship with none.

## How does Cap Desktop compare against other screen recorders for Mac

### Cap vs Loom (Loom Alternative)

- **Hosting:** Clips land in your bucket and share pages sit on your domain, not in a vendor account.
- **Speed:** Instant Mode hands you a link shortly after you stop, the same loop Loom sells without seat math.
- **Where Loom wins:** Viewer comments, analytics and player polish are more finished, and nobody needs MySQL to watch a clip.

### Cap vs CleanShot X (CleanShot X Alternative)

- **Share links:** Cap builds them in; CleanShot X is strongest at capture and annotation, with its cloud as a separate product.
- **Platforms:** Cap Desktop also ships a Windows .exe and a Linux .deb, so non-Mac teammates record into the same server.
- **Where CleanShot X wins:** Scrolling capture, screenshot markup and quick annotation are deeper, and it needs no backend.

### Cap vs Screen Studio (Screen Studio Alternative)

- **Studio Mode:** Timeline edits, styling and local export happen on your Mac, then one file uploads to your instance.
- **Where Screen Studio wins:** Automatic zooms and cursor smoothing look better out of the box with less manual keyframing.
- **Limits:** Self-hosted Cap treats every user as Pro, so there's no five-minute cap and no per-seat billing.

### Cap vs OBS Studio (OBS Studio Alternative)

- **Output:** Cap ends with a share link a reviewer opens in a browser, not a file you upload somewhere else first.
- **Where OBS wins:** Scene composition, multi-source capture, streaming and encoder control go far past Cap, and OBS is mature.
- **Pick OBS if:** You're capturing a stream or a multi-camera setup. Pick Cap when the goal is a two-minute clip for a teammate.

## How to use Cap Desktop (the OSS screen recorder)?

1. Install Cap Desktop for macOS, or run the 64-bit .exe installer on Windows. The Linux build is an x86_64 .deb for Debian-based distros.
2. Record something once and approve the prompts: Screen and System Audio Recording, Microphone, Camera. Fix denials in System Settings > Privacy & Security.
3. Open Cap Desktop settings and set Cap Server URL:

```
https://cap.yourdomain.com
```

4. Sign in with any email, then copy the 6-digit code from the cap-web deploy logs. It expires in 10 minutes.
5. Record a short Instant Mode clip of a non-sensitive window, wait for the share link to finish processing, and open it in a browser to confirm playback.
6. Switch to Studio Mode, edit on the timeline, export locally, then share the file or link.

## How to self host Cap Desktop on other VPS Services (Cap self hosting guide)

You can run the same four parts, cap-web, media-server, MySQL and an S3 bucket, on any VPS. This assumes Ubuntu with Docker and the compose plugin.

### Clone the Repository

```
git clone https://github.com/CapSoftware/Cap.git
```

### Install Dependencies

Docker, the compose plugin and a MySQL 8 container, then open 80 and 443, keeping 3306 and 3456 private. Budget about 1 GB of RAM at idle.

### Configure Environment Variables

Replace the publicly known upstream defaults for WEB_URL, NEXTAUTH_SECRET, DATABASE_ENCRYPTION_KEY and the S3 keys, then allow only WEB_URL in the bucket CORS rule or uploads fail.

### Start the Cap Desktop Application

```
docker compose up -d
```

Wait for migrations, log in with the 6-digit code from the cap-web logs, then set Cap Server URL in Cap Desktop Settings.

Railway runs the same stack and handles the build, private networking, bucket CORS and health checks for you.

## Official Pricing of Cap Desktop (Cap pricing)

Cap Desktop itself is free and open source. No five-minute recording cap, no seat math. Your only real cost is infrastructure: a Railway plan plus bucket storage, and about 850 MB of RAM at idle for a small team.

## Cap Desktop cloud vs self hosted comparison (Pricing, features, costs, and more)

Cloud and self hosted Cap run the same desktop app. What changes is where the bytes land, who holds the account list, and who pays the bill each month.

### Monthly cost of self hosting Cap Desktop on Railway

Railway bills by usage, not seats. Media-server memory grows during long recordings, so budget headroom. Railway's $5 trial covers the first experiments.

### System Requirements for Hosting Cap Desktop on a VPS

You need Docker and roughly 1 GB of RAM to start, more if several people record long sessions at once. Only cap-web needs a public port; MySQL and media-server stay private.

## Frequently Asked Questions (FAQs)

### Where do I set my own Cap server?

Open Cap Desktop settings, set Cap Server URL to https://cap.yourdomain.com, then sign in. Recordings upload to your instance, not Cap Cloud.

### Why do I never get the login email?

The template ships without an email provider, so the 6-digit code appears in the cap-web deploy logs and lasts 10 minutes. Add RESEND_API_KEY and RESEND_FROM_DOMAIN for real mail.

### Instant Mode or Studio Mode?

Instant Mode uploads while you record and hands a share link as processing ends, which suits bug reports. Studio Mode is a local project with timeline editing and export, shared when it looks right.

### Does Cap Desktop work on Windows and Linux?

Yes. Windows has a 64-bit .exe installer and Linux an x86_64 .deb for Debian systems. On Windows, camera and mic access sits under Settings > Privacy.

### Where are local recordings stored on Mac?

In ~/Library/Application Support/so.cap.desktop with the app settings. A custom recordings folder stays where you chose.

### Why does a recording fail to upload?

Usually the Cap Server URL is wrong or cap-web is still running first-boot migrations. Check it is https, matches WEB_URL, and the bucket CORS rule allows your origin.


## 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/deploy-cap-screen-recorder-for-mac
