Self-host locally
The fastest self-host path is the local Docker stack. It runs Postgres, the NestJS API, the React storefront, Mailpit, and MinIO for product image storage.
Prerequisites
Section titled “Prerequisites”- Node.js 24.
- Docker Desktop or a compatible Docker Engine.
- Vite+
vpavailable in the repo workflow. - A checkout of
PremierStudio/Agentful.
Install dependencies after pulling:
vp installStart The Stack
Section titled “Start The Stack”vp run dev:docker:buildServices:
| Service | URL | Purpose |
|---|---|---|
| Web | http://localhost:7173 |
Storefront and account UI |
| API | http://localhost:7300/api |
NestJS API and MCP endpoint |
| Postgres | postgresql://localhost:7432/shop_dev |
Local database |
| S3 | http://localhost:7900 |
MinIO product image bucket |
| S3 UI | http://localhost:7901 |
MinIO console |
Useful commands:
vp run dev:docker:logsvp run dev:docker:statusvp run dev:docker:stopvp run dev:docker:resetdev:docker:reset removes local volumes and reseeds the database.
Create The First Admin
Section titled “Create The First Admin”Register a user through the web app, verify that user, then grant the first admin role:
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:7432/shop_dev \ vp run admin:bootstrap -- --email you@example.comThe bootstrap command refuses to run after an admin exists. For break-glass
recovery, pass --allow-existing-admin.
Connect An MCP Client
Section titled “Connect An MCP Client”Mint a token from an authenticated admin session, then connect your AI client to the local endpoint:
claude mcp add --transport http agentful-admin http://localhost:7300/api/mcp \ --header "Authorization: Bearer shop_mcp_..."Keep token scopes narrow. A product-management agent should not receive user, payment, plugin, or event-management permissions unless it needs them.
Production Shape
Section titled “Production Shape”Production self-hosting should run pinned API and web images, a real Postgres instance, durable object storage, a public storefront origin, and a configured payment provider. Use the safe updater rather than editing containers in place.
See Docker runtime and Updates.