Skip to content

docs(self-hosting): document extension sign-in, sign-up limits, media server capacity and safe migration recovery - #3521

Open
prosomoalexd wants to merge 2 commits into
CapSoftware:mainfrom
prosomoalexd:docs/self-hosting-setup-and-safe-recovery
Open

prosomoalexd wants to merge 2 commits into
CapSoftware:mainfrom
prosomoalexd:docs/self-hosting-setup-and-safe-recovery

Conversation

@prosomoalexd

@prosomoalexd prosomoalexd commented Oct 28, 2026 •

Copy link
Copy Markdown

Things we had to find in the source while self-hosting Cap (Kubernetes, MySQL 8, S3-compatible storage), added to self-hosting.mdx:

  • Chrome extension: outside localhost development, extension sign-in needs CAP_CHROME_EXTENSION_ID (packages/web-backend/src/Extension/Http.ts). Neither compose file forwards it today (feat(self-hosting): allow configuring CAP_CHROME_EXTENSION_ID for extension login #1992 proposes that); the note on adding variables is worded so it stays right either way.
  • Restricting sign-in: CAP_ALLOWED_SIGNUP_DOMAINS (new accounts only), CAP_BLOCKED_SIGNUP_DOMAINS (existing users too: web sessions and desktop/extension sign-ins stop working) and CAP_VIDEOS_DEFAULT_PUBLIC, with the organization override.
  • Media server capacity: the default concurrency from job-manager.ts, what 503 Server is busy does (the video waits with backoff in process-video.ts), and the two MEDIA_SERVER_MAX_CONCURRENT_* overrides. On a 2-CPU container it processes one video at a time.
  • External buckets: links to the existing AWS S3 and R2 CORS sections; browser uploads to S3 need ETag exposed.
  • Troubleshooting: "Database migration issues" no longer starts with docker compose down -v, which deletes the MySQL and MinIO volumes. It now says to read the log, back up (database, media, DATABASE_ENCRYPTION_KEY) and report. "Reset everything" stays, labeled as deleting all data.

Docs only. No textual overlap with #2299 or #3002, which also edit this file.

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge, with two non-blocking documentation corrections.

Findings

  1. P2 SSO users join without invitations ▶
  2. P2 Busy work sometimes gets dropped ▶
Fix with agent prompt
### Issue 1
apps/web/content/docs/self-hosting.mdx:127
The claim that uninvited users start in their own organization misses the WorkOS SSO path. If WorkOS SSO is configured, `provisionSsoMembership` adds a new user to the SSO organization without an invitation. Admins could mistake this wording for an invitation requirement. Keep the statement that these domain settings do not add members, but qualify the next sentence with the SSO exception.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 2
apps/web/content/docs/self-hosting.mdx:146
The promise that busy media work always waits is too broad. The faststart rewrite in `multipart.ts` calls `/video/process` directly. A busy response is caught, logged, and dropped without retrying, so self-hosters cannot expect that rewrite to run once capacity returns. Limit this promise to the workflows that retry, and mention that the faststart rewrite can be skipped when the server is full.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Updates the self-hosting guide with:

  • Self-hosters can find the bucket settings needed for browser uploads.
  • Self-hosters can set up extension sign-in for their Cap server.
  • Self-hosters can allow new signup domains and block sign-ins by address or domain.
  • Self-hosters can make new videos private by default.
  • Self-hosters can tune how many video jobs run at once.
  • Migration troubleshooting now starts with logs and backups, not volume deletion.

Two non-blocking corrections remain: explain the SSO membership exception and narrow the promise that busy media work always retries.

Reviews (1) · Last reviewed commit: "docs(self-hosting): document extension s..." · Reviewed by Greptile

… server capacity and safe migration recovery
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Oct 28, 2026 4:55pm UTC

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 28, 2026 15:50 Inactive
Comment thread apps/web/content/docs/self-hosting.mdx Outdated

- `CAP_ALLOWED_SIGNUP_DOMAINS` applies to **new** accounts only. Users who already have an account can still sign in from any domain.
- `CAP_BLOCKED_SIGNUP_DOMAINS` applies to existing users too: a blocked address can't sign in, and its existing web sessions and Cap app sign-ins (desktop, Chrome extension) stop working.
- Neither setting adds users to an organization. New users who weren't invited start in their own organization.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 SSO users join without invitations

The claim that uninvited users start in their own organization misses the WorkOS SSO path. If WorkOS SSO is configured, provisionSsoMembership adds a new user to the SSO organization without an invitation. Admins could mistake this wording for an invitation requirement. Keep the statement that these domain settings do not add members, but qualify the next sentence with the SSO exception.

Knowledge Base Used: Data and identity platform

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/content/docs/self-hosting.mdx
Line: 127

Comment:
**SSO users join without invitations**

The claim that uninvited users start in their own organization misses the WorkOS SSO path. If WorkOS SSO is configured, `provisionSsoMembership` adds a new user to the SSO organization without an invitation. Admins could mistake this wording for an invitation requirement. Keep the statement that these domain settings do not add members, but qualify the next sentence with the SSO exception.

**Knowledge Base Used:** [Data and identity platform](https://app.greptile.com/cap/-/custom-context/knowledge-base/capsoftware/cap/-/docs/data-and-identity-platform.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4903e4c: the sentence now names the WorkOS SSO exception.

Comment thread apps/web/content/docs/self-hosting.mdx Outdated

The media server runs a limited number of video jobs at once. Unless you set a limit, it uses the smallest of 4 and half the CPUs, and, if the container has a memory limit, the memory limit × 0.85 ÷ 768 MB (at least 1). A media server with 2 CPUs therefore processes one video at a time.

When it is full, it answers `503 Server is busy` and Cap Web keeps the video waiting and retries until a slot frees up. Videos queue behind each other instead of failing. To process more at once, set the limits on the **media server** container:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Busy work sometimes gets dropped

The promise that busy media work always waits is too broad. The faststart rewrite in multipart.ts calls /video/process directly. A busy response is caught, logged, and dropped without retrying, so self-hosters cannot expect that rewrite to run once capacity returns. Limit this promise to the workflows that retry, and mention that the faststart rewrite can be skipped when the server is full.

Knowledge Base Used: Media-server runtime service

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/content/docs/self-hosting.mdx
Line: 146

Comment:
**Busy work sometimes gets dropped**

The promise that busy media work always waits is too broad. The faststart rewrite in `multipart.ts` calls `/video/process` directly. A busy response is caught, logged, and dropped without retrying, so self-hosters cannot expect that rewrite to run once capacity returns. Limit this promise to the workflows that retry, and mention that the faststart rewrite can be skipped when the server is full.

**Knowledge Base Used:** [Media-server runtime service](https://app.greptile.com/cap/-/custom-context/knowledge-base/capsoftware/cap/-/docs/media-server-and-web-cluster.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4903e4c: the paragraph now limits the retry promise to video processing and says the post-upload faststart rewrite is skipped when the server is full.

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 28, 2026 16:55 Inactive

This branch was previously deployed

1 inactive deployment
Preview – cap-status — 4903e4c2 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant