[{"data":1,"prerenderedAt":210},["ShallowReactive",2],{"content-developer\u002Fdecisions\u002F006-self-hosted-convex":3,"surround-\u002Fdeveloper\u002Fdecisions\u002F006-self-hosted-convex":201},{"id":4,"title":5,"body":6,"description":193,"extension":194,"meta":195,"navigation":196,"path":197,"seo":198,"stem":199,"__hash__":200},"content\u002F3.developer\u002Fdecisions\u002F7.006-self-hosted-convex.md","ADR-006: Self-Hosted Convex",{"type":7,"value":8,"toc":186},"minimark",[9,26,31,41,44,72,76,79,82,133,137,142,163,168],[10,11,12,20],"ul",{},[13,14,15,19],"li",{},[16,17,18],"strong",{},"Status:"," Accepted",[13,21,22,25],{},[16,23,24],{},"Date:"," 2026-03-24",[27,28,30],"h2",{"id":29},"context","Context",[32,33,34,35,40],"p",{},"Owlat's backend runs entirely on Convex (",[36,37,39],"a",{"href":38},"\u002Fdeveloper\u002Fdecisions\u002F002-convex-backend","ADR-002","). As the platform grows, self-hosting becomes a requirement for organizations that need data sovereignty, compliance with on-premises mandates, or full control over their infrastructure.",[32,42,43],{},"The options considered:",[45,46,47,53,59],"ol",{},[13,48,49,52],{},[16,50,51],{},"Migrate to PostgreSQL + custom API layer"," — rewrite all Convex queries, mutations, and actions into a traditional REST\u002FtRPC backend with PostgreSQL. Full control, but massive migration effort and loss of real-time reactivity, ACID transactions, and the co-located TypeScript function model.",[13,54,55,58],{},[16,56,57],{},"Abstract with a database adapter layer"," — maintain both Convex (cloud) and PostgreSQL (self-hosted) behind an interface. Doubles the maintenance surface and testing matrix for every feature.",[13,60,61,64,65,71],{},[16,62,63],{},"Use the open-source Convex backend"," — Convex ",[36,66,70],{"href":67,"rel":68},"https:\u002F\u002Fgithub.com\u002Fget-convex\u002Fconvex-backend",[69],"nofollow","open-sourced their backend"," under the MIT license. Self-hosters run the same Convex runtime via Docker. Zero code changes to the application layer.",[27,73,75],{"id":74},"decision","Decision",[32,77,78],{},"Use the open-source Convex backend for self-hosting. The entire Owlat stack — API, real-time subscriptions, file storage, vector search, scheduled functions — runs identically whether deployed to Convex Cloud or self-hosted via Docker.",[32,80,81],{},"Key properties of self-hosted Convex:",[10,83,84,90,101,111,127],{},[13,85,86,89],{},[16,87,88],{},"Docker deployment"," — single container for the backend, with an optional dashboard container for administration",[13,91,92,95,96,100],{},[16,93,94],{},"Built-in storage"," — file uploads via ",[97,98,99],"code",{},"ctx.storage"," work without an external S3 service",[13,102,103,106,107,110],{},[16,104,105],{},"Built-in vector search"," — ",[97,108,109],{},"vectorIndex"," definitions work natively, enabling the Knowledge Graph and semantic file search without a separate vector database",[13,112,113,106,116,119,120,123,124],{},[16,114,115],{},"Full CLI support",[97,117,118],{},"npx convex dev"," and ",[97,121,122],{},"npx convex deploy"," work against self-hosted instances via ",[97,125,126],{},"CONVEX_SELF_HOSTED_URL",[13,128,129,132],{},[16,130,131],{},"MIT license"," — no usage restrictions, no license fees",[27,134,136],{"id":135},"consequences","Consequences",[32,138,139],{},[16,140,141],{},"Enables:",[10,143,144,151,154,157,160],{},[13,145,146,147,150],{},"Zero application code changes for self-hosting — the same ",[97,148,149],{},"apps\u002Fapi\u002Fconvex\u002F"," functions run on both cloud and self-hosted",[13,152,153],{},"Single Docker Compose file for the entire Owlat stack (Convex, web, MTA, Redis, ClamAV)",[13,155,156],{},"Vector search for the Knowledge Graph and semantic file system without deploying a separate vector database",[13,158,159],{},"File storage without deploying MinIO or S3",[13,161,162],{},"Data sovereignty — all data stays within the self-hoster's infrastructure",[32,164,165],{},[16,166,167],{},"Trade-offs:",[10,169,170,173,176,179],{},[13,171,172],{},"Self-hosters take on operational responsibility for the Convex backend (backups, upgrades, monitoring)",[13,174,175],{},"Self-hosted Convex supports free-tier features of the cloud product — some advanced cloud features may not be available",[13,177,178],{},"Requires Docker and sufficient compute resources for the Convex runtime",[13,180,181,182,185],{},"Community support for self-hosted issues (via Discord ",[97,183,184],{},"#self-hosted"," channel) rather than enterprise SLA",{"title":187,"searchDepth":188,"depth":188,"links":189},"",2,[190,191,192],{"id":29,"depth":188,"text":30},{"id":74,"depth":188,"text":75},{"id":135,"depth":188,"text":136},"Why Owlat uses the open-source Convex backend for self-hosting instead of migrating to a different database.","md",{},true,"\u002Fdeveloper\u002Fdecisions\u002F006-self-hosted-convex",{"title":5,"description":193},"3.developer\u002Fdecisions\u002F7.006-self-hosted-convex","t_n6Vr2kVLCQq5omwjAjOqUfQ7fecWl-CPtSoSewiHs",[202,206],{"title":203,"path":204,"stem":205,"children":-1},"ADR-005: Custom MTA","\u002Fdeveloper\u002Fdecisions\u002F005-custom-mta","3.developer\u002Fdecisions\u002F6.005-custom-mta",{"title":207,"path":208,"stem":209,"children":-1},"ADR-007: Pluggable LLM Provider","\u002Fdeveloper\u002Fdecisions\u002F007-pluggable-llm","3.developer\u002Fdecisions\u002F8.007-pluggable-llm",1774391042884]