server
self-host Coder: the server, its dashboard and sign-in
Self-host Coder: the server your agents and platform apps talk to, with a dashboard and sign-in. We run one as the hosted service; you can run your own.
server serve [--port <port>] [--host <host>] [--memory] [--runner <runner>] [--json] [--cwd <cwd>]
run the server
Run the Coder server on Bun: the address platforms deliver events to, the dashboard, and the worker that runs tasks. With DATABASE_URL it is a full server with sign-in and workspaces. Without one it is the dashboard for this machine's CLI: its config, agents, tasks and engine logins, on loopback only. --memory makes a throwaway test server that keeps everything in memory. Configured through the environment; every variable is in coder docs self-host.
--port <port>listen port (default: PORT, else the port in a localhost PUBLIC_URL, else 8787)--host <host>listen address (default: HOST, else 127.0.0.1 without a database, else every interface)--memorya throwaway test server: everything in memory, no sign-in, admin token only--runner <runner>local, local-docker, vercel-sandbox, github-actions, or http--jsonJSON output--cwd <cwd>workspace directory; default current
Environment:
PUBLIC_URLthe address platforms and browsers reach the server at (default http://localhost:) PORTlisten port, as hosts set it (default 8787)HOSTlisten address, as --hostDATABASE_URLPostgres, set up with drizzle-kit push; turns on sign-in and workspacesAUTH_WULAR_URLthe Wular Auth issuer people sign in with (default https://auth.wular.ai)SERVER_ENCRYPTION_KEYencrypts stored secrets and derives the sign-in keys; required with DATABASE_URL (openssl rand -base64 32)RUNNERwhere tasks run: local (default), local-docker, vercel-sandbox, github-actions, httpMAX_TASKS, TASK_TIMEOUT, TASK_STALL, TASK_ATTEMPTSrunner capacity and lifecycle limitsADMIN_TOKENlocal and memory servers: the dashboard and CLI key; minted and shown when unsetCODER_CACHE_HOMEarchived tasks, flows and usage (default OS cache directory/wular-coder)WORK_DIRwhere the local runner keeps task work foldersSERVER_NAMEwhat the dashboard calls this server (default Coder)
PUBLIC_URL=https://abc.ngrok.app coder server serve # receive GitHub and Slack events through a tunnel; the tunnel serves only their webhooks and callbacks
PUBLIC_URL=https://agents.example.com DATABASE_URL=postgres://... coder server serve # on your own host, backed by Postgres
server rotate-key [--json]
re-seal secrets with SERVER_ENCRYPTION_KEY
Re-seal stored app, installation, engine, and linked user secrets with the current key.
--jsonJSON output
Environment:
SERVER_ENCRYPTION_KEYthe new keySERVER_ENCRYPTION_KEY_PREVIOUSthe old key, still accepted while rotating
server workflow
print the GitHub Actions workflow for RUNNER=github-actions
Print the workflow the github-actions runner dispatches. Save it as .github/workflows/coder-runner.yml in every repo the agent runs on, and set RUNNER=github-actions on the server.
coder server workflow > .github/workflows/coder-runner.yml # add it to a repo
server app
the built-in agent's public apps
The built-in agent's apps, one per platform, shared by every workspace on this server.
server app create <integration> [--org <org>] [--name <name>] [--json]
create the built-in agent's public app
Open the page that creates the built-in agent's public app on a platform, once per server. Every workspace then connects it from its dashboard with one click. Run it where the server's environment is set.
<integration>the platform, such as github--org <org>create it under this organization instead of your own account--name <name>the app's name and handle (default Coder)--jsonJSON output
Environment:
DATABASE_URLthe server's PostgresPUBLIC_URLthe server's address, which goes into the app
coder server app create github --name wular-coder # the hosted GitHub App