Skip to content

Installation

A step-by-step guide to set up a new project from our Payload CMS boilerplate.

Before you begin, ensure you have the following installed and set up:

  • DDEV: Our local development environment.
  • A Code Editor: Such as Visual Studio Code.
  • A GitHub Account: With access to the required organization.
  1. Navigate to our GitHub organization page
  2. Click the “New” button to create a new repository
  3. Enter your project name as the repository name. Do not use dashes or spaces.
  4. In the “Template” section, select Instance-Studio/payloadcmsboilerplate
  5. Click “Create repository”
  1. Clone your new repository to your local machine
  2. Open the .ddev/config.yaml file
  3. Change the name from payloadcmsboilerplate to your new repository’s name
.ddev/config.yaml
name: yourrepositoryname
# ... rest of the file
  1. Open the .env.example file and update the following values:
    • Replace all occurrences of payloadcmsboilerplate (and its variants like “Payloadcms Boilerplate”) with your project’s name
    • Generate and set a new, secure value for PAYLOAD_SECRET. You can use a tool like payloadsecret.io
.env.example
PAYLOAD_SECRET=your-new-generated-secret-here
DATABASE_URI=postgres://db:db@db:5432/db
NEXT_PUBLIC_SERVER_URL=https://your-repository-name.ddev.site
NEXT_PUBLIC_SITE_NAME="Your Project Name"
  1. Duplicate the .env.example file and name the copy .env
  1. Start the Docker-based environment with:
Terminal window
ddev start

The first startup may take a few minutes as it downloads and initializes all the necessary containers.

  1. Once DDEV is running, install the project’s Node.js dependencies:
Terminal window
ddev pnpm install
  1. Start the NextJS development server:
Terminal window
ddev pnpm dev

Your local development site is now running! You can access it in your browser.

  1. Navigate to the /admin route in your browser (e.g., https://your-repository-name.ddev.site/admin)
  2. You will see the “Create First User” screen. Please use the following format for consistency, even in local development:
    • Email: payload@instance.studio
    • Password: A strong, randomly generated 16-character password