# Environments

> Every service runs in development on 00b5e2.dev. Production on 00b5e2.app is manual by default and happens only when you, or an agent you allowed, say so. You can set production to follow main instead; development then follows another branch, or deploys by hand. Custom environments, like staging, are coming later.

## Two environments

| environment | address | how you get there |
| --- | --- | --- |
| `development` | my-site.00b5e2.dev | Every deploy and every push to main, by default |
| `production` | my-site.00b5e2.app | Manual by default (deploy --prod or promote), or every push to main |

## Go to production

```sh
$ 00b5e2 deploy --prod
building 3f9c2a1 ......... 36s
▪ web  https://my-site.00b5e2.app
▪ api  https://api.my-site.00b5e2.app
# or promote what is already running in development
$ 00b5e2 promote dpl_8f2k
■ dpl_8f2k live on my-site.00b5e2.app
```

> An agent needs a token with the deploy:prod scope. Without it, a production deploy is refused, and the attempt is written to the audit log.

## Kept apart

Variables, databases and cron jobs are separate per environment. A development database never holds production data, and a secret set in development never reaches production.

```sh
$ 00b5e2 env ls --prod --json
[ { "key": "DATABASE_URL", "env": "production", "secret": true } ]
```

## Roll back

Every deploy is kept. Going back is instant, because nothing is rebuilt.

```sh
$ 00b5e2 rollback --prod
■ production back on dpl_7c1d (2026-11-22 18:04 UTC)
```

## From an agent

| tool | what it does |
| --- | --- |
| `deploy` | env: development (default) or production |
| `promote` | Move a development deploy to production |
| `rollback` | Go back to a previous deploy in one environment |

Previous: [GitHub](https://docs.00b5e2.com/github.md)
Next: [Previews](https://docs.00b5e2.com/previews.md)
