Skip to content

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.

  • Node.js 24.
  • Docker Desktop or a compatible Docker Engine.
  • Vite+ vp available in the repo workflow.
  • A checkout of PremierStudio/Agentful.

Install dependencies after pulling:

Terminal window
vp install
Terminal window
vp run dev:docker:build

Services:

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:

Terminal window
vp run dev:docker:logs
vp run dev:docker:status
vp run dev:docker:stop
vp run dev:docker:reset

dev:docker:reset removes local volumes and reseeds the database.

Register a user through the web app, verify that user, then grant the first admin role:

Terminal window
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:7432/shop_dev \
vp run admin:bootstrap -- --email you@example.com

The bootstrap command refuses to run after an admin exists. For break-glass recovery, pass --allow-existing-admin.

Mint a token from an authenticated admin session, then connect your AI client to the local endpoint:

Terminal window
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 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.