Skip to content

Get up and running with the Nhost CLI

Start developing locally with Nhost. Install the CLI, initialize your project, and spin up a local PostgreSQL database, GraphQL engine, Auth, and Storage.

CLI quickstart local development Nhost CLI setup install

The Nhost CLI is the recommended way to start building your application. It sets up a full local development environment including PostgreSQL, Hasura (GraphQL), Authentication, and Storage, tracking all migrations and metadata.

Docker is required to run the local environment.

Choose your preferred installation method:

macOS / Linux (Homebrew)

Terminal window
brew install nhost/tap/nhost

macOS / Linux (cURL script)

Terminal window
curl -sSL https://raw.githubusercontent.com/nhost/nhost/main/cli/get.sh | bash

Nix

Terminal window
nix profile install github:nhost/nhost#cli

Login to your Nhost account. This is required if you want to pull configuration from an existing Nhost Cloud project (step 3) or deploy later. You can skip it if you only want to develop locally.

Terminal window
nhost login

Initialize a new Nhost project in your current directory.

Terminal window
nhost init

If you already have a project on Nhost Cloud and want to pull down its configuration:

Terminal window
nhost init --remote

Start the full Nhost stack locally. This uses Docker to spin up all the necessary services.

Terminal window
nhost up

Once running, the CLI prints the URLs for your local services:


ServiceURLs
Dashboard:https://local.dashboard.local.nhost.run
GraphQL:https://local.graphql.local.nhost.run
Auth:https://local.auth.local.nhost.run
Storage:https://local.storage.local.nhost.run
Postgres:postgres://postgres:postgres@localhost:5432/local
Functions:https://local.functions.local.nhost.run
Mailhog:https://local.mailhog.local.nhost.run

The local.nhost.run domain resolves to your machine, so these URLs work over HTTPS out of the box.

To stop the environment run nhost down, and to follow the logs run nhost logs.

Now that your local backend is running, you can connect your frontend application to it. Choose a framework quickstart from the sidebar to continue.