# Self-hosting

Deploy the dashboard, API, and durable scheduler on Vercel, with Neon PostgreSQL, private Cloudflare R2 storage, and Vercel Sandbox for agent execution.

## Choose a starting point

| Goal                                         | Guide                                                        |
| -------------------------------------------- | ------------------------------------------------------------ |
| Try the product without provider accounts    | [Local development](https://macrofold-staging.vercel.app/docs/raw/local-development.md) |
| Deploy a hosted service                      | [Deployment walkthrough](https://macrofold-staging.vercel.app/docs/raw/self-hosting/vercel.md)                    |
| Configure runtime settings                   | [Environment reference](https://macrofold-staging.vercel.app/docs/raw/self-hosting/environment.md)               |
| Set up the database                          | [Neon and PostgreSQL](https://macrofold-staging.vercel.app/docs/raw/self-hosting/database.md)                               |
| Register models, apps, GitHub, and billing   | [Provider integrations](https://macrofold-staging.vercel.app/docs/raw/self-hosting/integrations.md)              |
| Understand deployment artifacts and rollback | [Deployment architecture](https://github.com/Macrofold/Macrofold/blob/main/docs/operations/deployment.md)                     |
| Plan capacity and recovery                   | [Hosting](https://github.com/Macrofold/Macrofold/blob/main/docs/operations/hosting.md) and [scaling](https://github.com/Macrofold/Macrofold/blob/main/docs/operations/scaling.md)              |

## Hosting responsibilities

The web application serves customer requests and dashboard streams. PostgreSQL owns state, leases, queues, and accounting. Workflow schedules bounded execution steps. Sandbox isolates native agents. R2 retains encrypted checkpoint content. Resend delivers identity email; Stripe manages paid subscriptions and top-ups when configured.

Keep the database, application, and storage in compatible regions. Set provider spending controls and a conservative execution ceiling before accepting work. The software's concurrency setting does not reserve vendor capacity.

The standalone Node/Docker control plane supports local simulation. Real non-Vercel execution currently requires an additional Sandbox credential adapter; see [portability](https://github.com/Macrofold/Macrofold/blob/main/docs/architecture/portability.md). Vercel is the supported production integration path described here.

Use the [acceptance checklist](https://github.com/Macrofold/Macrofold/blob/main/docs/operations/pre-deployment.md) to verify your deployment before opening access.
