Self-hosting
Daslab Cloud is the fast path, but nothing about Daslab requires our servers. The whole thing ships as a single binary: point it at a Postgres and a Redis, give it a domain, and you have a Daslab that runs entirely on your infrastructure. This guide covers the software part, which is an afternoon, and then the accounts, which are the reason most teams stay on Cloud.
The server is one binary
The API, the website, sign-in, webhooks and background jobs all run in one server process. There is no cluster to operate and no fleet of services to keep in sync.
Ask us for the current release. Everything else you need is on this page.
What it needs
Three things boot a working instance:
| Dependency | What for |
|---|---|
PostgreSQL 16 with the vector and pg_trgm extensions | all data |
| Redis | job queues, caching, rate limiting |
| At least one model | an API key (Anthropic, OpenAI, Gemini, OpenRouter), or a model server of your own |
Putting it on a domain adds three more:
| Dependency | What for |
|---|---|
| A domain | yourdomain.com: every URL derives from it |
| S3-compatible object storage | file uploads; Cloudflare R2 works well |
| A Resend account | transactional email: magic links, invites |
Any managed Postgres that offers those two extensions works, and any managed Redis: the server only needs a connection URL for each. On a Postgres you run yourself, create the extensions once as a superuser, because the database owner cannot create vector:
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS pg_trgm;On one Ubuntu machine, three scripts set it up
The release carries scripts for a single Ubuntu 24.04 machine, in server/deploy/box/. Run them in order:
| Script | What it does |
|---|---|
install.sh | installs Postgres 16 with pgvector, Redis and Bun, and a daslab system user. Postgres and Redis listen on localhost only |
database.sh | creates the database, its role and the two extensions, and prints the DATABASE_URL line |
release.sh <archive> <version> | unpacks a release, installs its dependencies, builds the web app, switches to it and restarts the server. If the new release does not answer /health within about two minutes, it goes back to the one that was running |
Beside them sit a systemd unit for the server (its settings go in /etc/daslab/daslab.env), a nightly database backup to a bucket, and tunnel.sh, which puts the server behind a Cloudflare tunnel for HTTPS with no open port.
Start the server
The essentials:
DATABASE_URL=postgresql://user:pass@host:5432/daslab
UPSTASH_REDIS_URL=rediss://default:xxx@host:6379 # any Redis URL; the name is historical
# Models: at least one
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GEMINI_API_KEY=...
# Any of these may hold several comma-separated keys; the server fails over
# between them on 401/403/429 (quota, spending cap, revoked key).
OPENROUTER_API_KEY=sk-or-...Or run on model servers of your own: vLLM, SGLang, Ollama, anything that speaks the OpenAI API. Every workspace on the instance can pick the models they serve, in a Self-hosted section at the bottom of the model picker.
DASLAB_MODEL_SERVERS='[{"name":"gpu","url":"http://127.0.0.1:8001/v1","key":"GPU_API_KEY"}]'
DASLAB_DEFAULT_AGENT=install/gpu/qwen3.8-27b # new work runs on it
DASLAB_UTILITY_MODEL=install/gpu/qwen3.8-27b # titles, summaries, small callsA model is install/<server name>/<the name the server serves it under>. key names the env var holding the server's key, never the key itself. Tokens are not billed unless a server sets "price": {"input": 0.1, "output": 0.4}, in USD per million tokens; add "cached": 0.003 to charge less for input the server read from its cache, which otherwise costs what input does. A server on a GPU box elsewhere can stay off the internet: pair the box as a machine, publish the port, and name it with "machine": {"workspace": "<workspace id>", "machine": "gpu", "service": "models"} instead of a url. On an instance several teams share, "worlds": ["<workspace id>", …] limits a server to those workspaces: its models are listed and answer only there, and never where no workspace is known, such as a utility call outside a scene. A model that guesses tool arguments can take "tool_shapes": true: each step then carries its tool's own argument schema, which costs about 20K more prompt tokens for a job with 120 tools and, for the self-hosted DeepSeek we run, took refused steps from about one in nine to about one in a hundred.
On first boot the server creates and migrates its database schema itself; there is no separate migration step.
Going public adds the second tier:
# The one variable every URL derives from: OAuth callbacks, links, sitemaps
PUBLIC_BASE_URL=https://yourdomain.com
# File uploads (any S3-compatible store; R2 shown)
R2_ACCESS_KEY_ID=your_access_key
R2_SECRET_ACCESS_KEY=your_secret_key
R2_ACCOUNT_ID=your_account_id
R2_USER_BUCKET_NAME=daslab-user
R2_PUBLIC_URL=https://tmp.yourdomain.com
# Email
RESEND_API_KEY=re_...
FROM_EMAIL=Daslab <noreply@yourdomain.com>
CONTACT_EMAIL=hello@yourdomain.comOpen https://yourdomain.com and you're looking at your own instance. Magic-link sign-in needs nothing beyond Resend.
Choose how people sign in
Every way in is its own switch. A method appears on the sign-in page and in the desktop app as soon as what it needs is set, and not before: a button that fails at the provider is worse than no button. Set up one, several or all of them.
| Method | What it needs | Returns to |
|---|---|---|
| Daslab | DASLAB_ID_ISSUER=https://daslab.run | /auth/daslab/callback (registers itself) |
| Password | nothing | |
| Apple in the iPhone app | nothing | |
| Email link | RESEND_API_KEY and a verified FROM_EMAIL (also gives password reset) | |
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET | /auth/google/callback | |
| Microsoft | MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET (Entra ID) | /auth/onedrive/callback |
| GitHub | GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET | /auth/github/callback |
| Apple | on the web: your own Services ID in APPLE_WEB_CLIENT_ID, with your domain registered | /auth/apple/callback |
| LINE | LINE_LOGIN_CHANNEL_ID, LINE_LOGIN_CHANNEL_SECRET (a LINE Login channel) | /auth/line/signin/callback |
The quickest is Continue with Daslab: people sign in with their Daslab account, so every way in Daslab Cloud has (Apple, Google, Microsoft, GitHub, LINE, email) works on your server behind one button, and you register nothing with any provider. Your server registers itself with daslab.run the first time someone uses it, and learns only who signed in: their name and email, nothing else from their Daslab account.
Then mix them as you like with DASLAB_SIGN_IN, a comma-separated list of the methods to allow. Unset allows everything that is set up; a list only narrows it:
DASLAB_SIGN_IN=microsoft # your company's Entra ID, nothing else
DASLAB_SIGN_IN=google,password # Google Workspace, passwords for guests
DASLAB_SIGN_IN=email,password # no providers at allA method that is off is refused by the server however it is reached, not just hidden. GET /api/config shows what your server offers right now.
Knowing who someone is doesn't make them welcome. DASLAB_SIGN_UP decides who may create an account; people who already have one always get in:
DASLAB_SIGN_UP=invite # only addresses a world here invited
DASLAB_SIGN_UP=@yourcompany.com # anyone at your domain
DASLAB_SIGN_UP=invite,@yourcompany.com,guest@partner.comUnset, anyone may sign up. It is checked wherever any method creates an account. An address is only as good as the method behind it: a provider proves it, a password doesn't, so pair a domain rule with a provider. For Microsoft work accounts, set MICROSOFT_TENANT_ID to your directory and only its accounts can sign in with Microsoft. These settings decide who can sign in. They do not end a session someone already has, so remove a person who leaves from their workspaces as well. The iPhone app reads the same answer, and offers Sign in with Apple on your server with nothing to set up: its token is bound to the server it was made for, so no other server can use it.
File uploads need one DNS record
Create your uploads bucket, add tmp.yourdomain.com as its custom domain (R2 manages the DNS record and TLS for you), and set R2_PUBLIC_URL to match. Uploaded files are now served from your own subdomain.
Verify your email domain
In the Resend dashboard, add your domain and set the DNS records it asks for (SPF, DKIM, DMARC). Once verified, magic links and invites go out from your FROM_EMAIL address.
Some integrations need an app in your name
Most of the catalog needs nothing from your server at all: API-key integrations ask for their key in the app when you connect them, and MCP servers connect the same way. A few messaging providers just need a webhook URL pasted into their console. The rest are OAuth, and those need a registered app and callbacks pointing at your domain.
The pattern is the same for every OAuth provider: register an app in its developer portal, set {PROVIDER}_CLIENT_ID and {PROVIDER}_CLIENT_SECRET, and give it the callback
https://yourdomain.com/auth/{provider}/callbackThe common registrations:
| Provider | Register at | What to set |
|---|---|---|
| GitHub: sign-in and repos | Developer Settings | Callback URL. GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET |
| Google: sign-in and Gmail, Calendar, Drive, Sheets | Cloud Console | Redirect URI /auth/google/callback, for sign-in and connections alike. Consent screen required; Gmail and Drive scopes need Google's verification, sign-in alone does not. GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET |
| Microsoft: sign-in and Outlook, OneDrive, Excel, SharePoint, Teams, Power BI, Business Central | Entra ID app registrations | One app with a redirect URI per integration: /auth/onedrive/callback (sign-in, OneDrive and Excel), /auth/outlook/callback, /auth/sharepoint/callback, /auth/teams/callback, /auth/powerbi/callback, /auth/businesscentral/callback. MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET. The permissions each one asks for are on Microsoft 365 permissions |
| Apple: sign-in | Apple Developer | On the web: a Services ID with your domain and the return URL /auth/apple/callback, in APPLE_WEB_CLIENT_ID. |
| LINE Login: sign-in | Developers Console | A LINE Login channel with the callback /auth/line/signin/callback. LINE_LOGIN_CHANNEL_ID, LINE_LOGIN_CHANNEL_SECRET |
| Slack | api.slack.com/apps | Redirect URL, plus the events URL https://yourdomain.com/webhooks/slack/events. SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_SIGNING_SECRET |
| Figma | Developer Portal | Callback URL. FIGMA_CLIENT_ID, FIGMA_CLIENT_SECRET |
| Canva | Developer Portal | Redirect URL, plus the webhook URL https://yourdomain.com/webhooks/canva/default. CANVA_CLIENT_ID, CANVA_CLIENT_SECRET |
| Xero | Developer Portal | Redirect URI. XERO_CLIENT_ID, XERO_CLIENT_SECRET |
| Upwork | Developer Portal | Callback URL. UPWORK_CLIENT_ID, UPWORK_CLIENT_SECRET |
| Telegram | @BotFather | Create a bot and paste its token when you connect it; the webhook registers itself. |
| LINE | Developers Console | Messaging API channel; webhook URL https://yourdomain.com/webhooks/line/bot. LINE_CHANNEL_ID, LINE_CHANNEL_SECRET |
This table isn't the full catalog; the integrations page is. Every OAuth provider there follows the same two-variables-and-a-callback pattern, and one you haven't registered simply won't connect until you do. You only need the ones you'll actually use: a GitHub-only instance is a perfectly good instance. But each app you do register becomes yours to own: client IDs, consent screens, keys to rotate. On Cloud, all of this already exists and is maintained for you. That's the trade.
Point the apps at your server
Every app has the same Add account: in the iOS app under Settings, in the web and desktop app in the account menu at the bottom of the sidebar. Enter your server's address and sign in there. You can stay signed in to Daslab Cloud and your own instance at the same time and switch between them from that list; the web app served by your server talks to your server. If your people must never be pointed at Daslab Cloud, set DASLAB_OFFER_CLOUD=false and the web and desktop apps leave it out of that list.
Push notifications for the App Store build are signed with our Apple developer key, so a self-hosted server can't send them on its own. Reach out if you need push.
For the CLI:
export DASLAB_API_URL=https://yourdomain.comMake it yours
The same server runs daslab.run and your instance; what differs is configuration.
INSTANCE_NAME="ACME Lab" # the name the server uses for itself
INSTANCE_SERVER_RUNG_LABEL="ACME credits" # optional: how Model keys names your
# server's own keys in every workspace.
# Default: "<name> server keys"; on
# daslab.run it reads "Daslab plan credits".
BILLING_PLANS='{"pro":{"price_cents":2900,"monthly_cents":4000}}'
# optional: override the plan table when
# you bill your own users (needs Stripe
# keys). Plan ids are fixed; the numbers
# are yours.Workspace keys. Every workspace can add its own model keys under Model keys, above the ones you configured: calls try the workspace's keys first and fall back to yours only when they are spent or down. What your keys served is metered against the workspace's plan when billing is on; what its own keys served is not. Models and keys has the details.
Optional services
A capability switches on when its key is present and off when it isn't, with nothing else to configure, and the same rule holds for keys not listed here. The ones you're most likely to want:
| Service | Env | What it adds |
|---|---|---|
| Tavily | TAVILY_API_KEY | Web search |
| Brave Search | BRAVE_SEARCH_API_KEY | Web search (alternative) |
| Deepgram | DEEPGRAM_API_KEY | Speech-to-text |
| LiveKit | LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_WS_URL | Real-time voice and live video |
| Cloudflare Stream | CLOUDFLARE_STREAM_ACCOUNT_ID, CLOUDFLARE_STREAM_API_TOKEN | Video archive and playback fallback |
| Vapi | webhook https://yourdomain.com/webhooks/vapi/calls in the Vapi dashboard | Phone calls |
| 17TRACK | webhook URL in the API console | Package tracking |
| Airtop | AIRTOP_API_KEY | Browser automation |
| Google Maps | GOOGLE_MAPS_API_KEY | Geocoding and maps |
| Brandfetch | BRANDFETCH_CLIENT_ID | Company logo lookup |
| Any OTLP collector | OTEL_EXPORTER_OTLP_ENDPOINT | OpenTelemetry trace export |
Upgrading is swapping the binary
Swap the binary and restart; on one Ubuntu machine, release.sh does it and rolls back if the new release does not come up. The server keeps nothing it cannot rebuild: all state lives in Postgres, Redis and your object store, and migrations run themselves on boot.
To move domains without breaking sign-in: add the new callback URLs at every provider alongside the old ones, deploy with the new PUBLIC_BASE_URL, verify each flow, then remove the old URLs.
When something doesn't work
OAuth redirects fail
Almost always a mismatch between PUBLIC_BASE_URL and the callback URLs registered at the provider. Compare them character by character: a trailing slash is enough.
File uploads 404
The uploads custom domain hasn't propagated. curl -I https://tmp.yourdomain.com should return a response, not a DNS error.
Emails don't arrive
Your domain isn't fully verified in Resend: all three DNS records (SPF, DKIM, DMARC) need to be in place.
The first boot stops with a schema error
The database is missing an extension. Create vector and pg_trgm as a superuser, as above, and start the server again.
Is it even up?
curl https://yourdomain.com/health returns status, version, and build.
Cloud is the same software, operated for you
A self-hosted instance is yours to run end to end: the OAuth apps and their consent screens, the client secrets and their rotation, the email domain and its DNS records, the releases and their schema changes. On Cloud those are our job. Your data and the trace of every run are yours on either path.
Self-hosted deployments are part of the Enterprise plan: the release, deployment guidance and support are included. Get a demo.
Updated 2026-11-14