Self-hosting and runtime modes
Understand static hosting, Backend, workers and execution nodes, including prerequisites for local startup.
Updated
This page describes repository runtime boundaries for developers with source access and operational setup. It is not a promise of one-command production deployment.
| Component | Responsibility |
|---|---|
| Site | Static website, blog and help content |
| Web | Browser console using Backend business capabilities |
| Backend serve | Public HTTP, tRPC and streamed Agent requests |
| Backend work | Queue consumption and asynchronous business tasks |
| Desktop or remote execution node | Execute authorized tasks without direct business database access |
| Managed cloud Agent | Use task-authorized tools and model services |
Install the repository's Bun version and dependencies, then configure the environment using apps/backend/.env.example. Backend business data uses DRAPUB_DATABASE_URL; retrieval runtime data uses GBRAIN_RUNTIME_DATABASE_URL. Configure authentication, storage, queues and models required by the features you use.
Create databases, apply migrations and set permissions according to current repository instructions. Do not use sample local passwords in production or edit previously applied migrations to repair deployed databases.
After configuration, start API and worker separately from the repository root.
bun run dev:api
bun run dev:workerThese are separate long-running processes. Starting the API alone does not enable background processing.
The public gateway defaults to port 4320. Port 4111 is an internal compatibility listener, not an additional public Agent service. Manage static hosting separately from Backend configuration.
Production also needs HTTPS, access control, backups, monitoring and external services. A desktop local workspace, remote execution node and self-hosted Backend are different scopes.
Begin verification with a read-only CLI check, then check the business flows you use.
Q: Why are background tasks not processed even though the API is running?
**A: ** Queue consumption runs in work mode. Check that the Worker is running as a separate process and inspect its configuration, queue connection, and errors.
Q: Does deploying the static site provide the full DraPub service?
**A: ** The static site serves the website, blog, and help pages. Business capabilities also require Backend, data services, and the relevant execution environment, configured separately.