Docs / Compute

Background Workers

Background workers run long-lived processes without a public HTTP route — queue consumers, stream processors, and similar workloads. They share the workspace Docker network with sibling services.

Create a worker

  1. Click + New → Background Worker.
  2. Connect Git or upload source.
  3. Set build and start commands (or use a Dockerfile).
  4. Deploy. The container restarts on failure according to the runtime restart policy.

No public URL

Workers are not reachable from the public internet. Other services in the same workspace can connect over the workspace network using the container hostname lc-{serviceId} if the worker exposes a port.

Environment

Use environment variables and env groups for database URLs, queue endpoints, and API keys — same as web services.