Send to your agent
How a first deploy works
Before you deploy
- Get a Locus API key from the Agent Wallets quickstart, or reuse a
claw_key you already have. - Make your app read
PORTor listen on port 8080. Optionally, serve a health check path that returns HTTP 200. - For a private repository, connect GitHub at buildwithlocus.com/integrations.
- Choose a region:
us-east-1(Northern Virginia, the default),sa-east-1(São Paulo), oreu-west-1(Ireland). It applies to every service in the project.
Authentication
Exchange your Locus API key for a Build token atPOST https://api.buildwithlocus.com/v1/auth/exchange. Send the token as Authorization: Bearer on every Build API request. Tokens last 30 days, and you can refresh one through POST /v1/auth/refresh.
Keep keys and tokens server-side, and app secrets in environment variables instead of source control.
Deploy your first service
1
Create and deploy the project
For a GitHub repository, one request creates the project, environment, services, and deployments:Replace
Deploy a GitHub repository
repo with your repository. The response includes service URLs and deployment IDs. Locus reads a .locusbuild file if present; otherwise it creates a single web service.2
Wait for a healthy deployment
Check its status with the deployment ID, or follow it in the dashboard. Source builds typically take 3–7 minutes. When the deployment is
healthy, open the service URL. If it fails, read the logs. See deployments.Git push deploys
To deploy local code, create a project and services, add a Locus git remote, and push. The remote URL looks likehttps://x:[email protected]/{workspaceId}/{projectId}.git. A Build token works in place of the API key.
- Keep this remote private, because it contains a credential.
- A push deploys every service in the project, each from its configured
rootDir. - See the git deployment reference for setup.
Runtime configuration
Each service starts with port 8080, 0.25 vCPU, 512 MB of memory, and one to three instances. See service configuration.Pricing
Services and Postgres or Redis addons cost $1.50/month each, from workspace credits. New Locus-linked workspaces start with $1.00 in credits toward the first service. See pricing and credits for the x402 rate and how to add credits.Next steps
Services
Choose a deploy source and configure a service.
Deployments
Follow, fix, and roll back releases.
Variables and connections
Connect services and databases.
Addons
Add Postgres or Redis.