Docs
Start building
Deploy

Services & env vars

Backend services and automated environment variables.

1 min read · 4 sections

Deploy injects the env vars your app needs automatically, so there are no secrets to copy by hand; backend services run from the Code IDE's Services view and their URLs flow into your deploys.

Backend services

Create a service (Bun, Node.js, or Python) in the Code IDE's Services view, then manage its lifecycle there: start, stop, restart, check health, and tail logs. Status shows as a colored dot:

StatusDot
runninggreen
starting / deployingamber (pulsing)
stoppedgrey
errorred

Service URLs

Every running service gets a public URL through Modus, injected into your app's environment as VITE_SERVICE_{NAME}_URL (Vite) or NEXT_PUBLIC_SERVICE_{NAME}_URL (Next.js), so your frontend calls it with no hand-wiring; never hardcode a localhost port.

Automatic env vars

Modus injects the env vars your deploy needs so you don't wire them by hand:

VariableValueWhen
MODUS_GATEWAY_KEYAPI keyWeb3 deploys (which ship a server-side gateway proxy)
MODUS_GATEWAY_URLGateway URLWeb3 deploys
VITE_SERVICE_{NAME}_URLThe service's public URLInjected while the service runs
MODUS_SERVICE_{NAME}_URLA Workers service's URLAfter a Workers deploy (coming soon)

Plain frontends deliberately get no gateway credential: a static site has nowhere safe to hold one, so Modus doesn't leave a live key in your provider's env dashboard. You can add or edit your own variables in the Deploy modal's env editor.

Deploy by chat

The Code chat knows your deploy state (which providers are connected, the latest deploy status, service health). Ask it to "deploy the frontend to Vercel", "why did the last deploy fail?", or "roll back", and it acts on the right target.