Skip to content

Installation

DependencyVersionCheck command
Node.js≥ 22.12.0node -v
Package managerpnpm >= 10 recommended; npm or yarn also workpnpm -v, npm -v, or yarn -v
PostgreSQL14+psql --version

If you want to use pnpm and do not have it installed:

Terminal window
npm install -g pnpm@latest

After purchase, you’ll receive a GitHub invite to the private repository. Accept the invite, then clone:

Terminal window
git clone git@github.com:nuxtbase-hq/core-b2b.git my-saas
cd my-saas
Terminal window
pnpm install

This installs all dependencies and runs nuxt prepare automatically via the postinstall script.

NuxtBase needs one PostgreSQL database before you can run migrations.

The example DATABASE_URL in the template .env.example uses the starter’s default naming. In your real project, replace that with your own database name.

postgresql://postgres:postgres@localhost:5432/my_saas

That URL means:

  • username: postgres
  • password: postgres
  • host: localhost
  • port: 5432
  • database name: my_saas

If PostgreSQL is installed locally, you usually get command-line tools such as psql and createdb with it.

This command:

Terminal window
createdb my_saas

creates a database named my_saas on your local PostgreSQL server.

If your local PostgreSQL user is not your current shell user, specify it explicitly:

Terminal window
createdb -U postgres -h localhost my_saas

psql is the PostgreSQL interactive shell.

Connect first:

Terminal window
psql -U postgres -h localhost -p 5432

Then run:

CREATE DATABASE "my_saas";

Useful psql commands:

\l -- list databases
\q -- quit

If you do not want to install PostgreSQL directly on your machine, you can run it in Docker:

Terminal window
docker run --name my-saas-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=my_saas \
-p 5432:5432 \
-d postgres:16

With that container, this DATABASE_URL works as-is:

postgresql://postgres:postgres@localhost:5432/my_saas

After creating the database, you can test the connection with:

Terminal window
psql postgresql://postgres:postgres@localhost:5432/my_saas

If that opens psql without an error, the database is ready.

Your code is installed and your database is ready. Continue to Quick Start to configure environment variables and run the app for the first time.