Running Payblocks locally in under 5 minutes

Three terminal commands. Two environment variables. One full-stack site with 100+ blocks, role-based access, and a working admin panel.

Installation

Three commands to a running site

Clone, install, and start โ€” then set your two required env vars.

Step 1 โ€” Clone and install

  • git clone https://github.com/trieb-work/payblocks my-site

  • cd my-site && pnpm install

Step 2 โ€” Configure env

  • cp .env.example .env.local

  • Set MONGODB_URI, PAYLOAD_SECRET, NEXT_PUBLIC_SERVER_URL

Step 3 โ€” Start

  • pnpm dev โ€” open http://localhost:3000/admin

What is running after pnpm dev

A full-stack site with the Payload admin panel, Next.js frontend, 100+ blocks, and all the infrastructure wired together.

Payload Admin at /admin

Create your first user on first login. All collections and globals available.

Frontend at /

The catch-all route renders pages by slug from the database. Create a page in Payload, publish it โ€” it appears on the frontend.

Admin API at /next/admin/cli

Set ADMIN_CLI_SECRET in .env.local. Full CRUD + schema introspection over all collections.

Common questions

Frequently asked questions

Do I need a paid Payload license?

No. Payload CMS is MIT licensed. Payblocks is also open source. No license fees.

    Can I use local MongoDB?

    Yes. Set MONGODB_URI=mongodb://localhost:27017/payblocks. Use Docker if needed.

      How do I add a new block?

      Create src/blocks/BlockName/config.ts and Component.tsx. Register in payload.config.ts. Run pnpm generate:types.

        Is Vercel required?

        No. A Dockerfile is included for self-hosted deployments. Vercel is recommended for the Blob storage integration.