## Environments

During onboarding, Cofounder sets up staging and production for the managed app stack.

**Staging** is where changes get reviewed and tested before they go live. **Production** is what powers the live app.

## Staging And Production

For the app:

- **Staging** is the shared review environment for finished work
- **Production** is the live customer-facing environment
- the app also has a staging backend and a production backend

For marketing:

- **Staging** is the shared review environment for the site
- **Production** is the live marketing site

## How Changes Reach Each Environment

### Staging

Staging is the shared review environment.

To publish agent work to staging:

1. The agent finishes work in its sandbox
2. The agent requests a deploy
3. You approve **Publish to Staging**
4. Staging / preview updates for that target

For app work:

- the staged app can run against the staging backend
- migrations that reach staging follow the staging migration path

### Production

Production is the live environment.

To publish staging to production:

1. Use the workspace **Publish** button, or ask **Cofounder** to publish
2. Cofounder runs the production publish flow for the selected target
3. When publish completes, the live deployment updates

For app work:

- the live app continues running against the production backend
- migrations published to production follow the production migration path

## How They Link Together

For app publishing:

- finished agent work is reviewed into staging after the agent requests a deploy
- staging is the place to confirm the change before customers see it
- the staged app can run against the staging backend

After production publish:

- the live app or website updates
- the live app continues running against the production backend

Marketing publishing follows the same staging-then-production flow, without the managed app backend.

## Next Steps

- [Publishing](https://docs.cofounder.co/publishing/overview)
- [Requesting a deploy](https://docs.cofounder.co/publishing/request-deploy)
- [Managed Services](https://docs.cofounder.co/managed-services/overview)
