Documentation
supastarter for Next.jsDeployment

Coolify

Learn how to deploy your supastarter application with Coolify.

This guide will show you how to deploy your supastarter application with Coolify to your own server.

Setup Coolify

Before you can deploy your supastarter application with Coolify, you need to have a server and a Coolify account.

Follow the Coolify setup guide to get started.

Deploy your supastarter application

Create a new project

First create a new project in Coolify.

Coolify new project

Add a new resource

Select the Production environment and click Add a new resource.

Choose Private Repository (with Github App):

Coolify new resource

Connect your Github repository (with Github App)

If you haven't already created a Github App that connects your Coolify instance to your Github repository, you will be asked to create one.

Coolify create github app

Follow the instructions to create a Github App and connect it to your Coolify instance.

Create a new application

After you have connected your Github repository, you can create a new application by selecting the Github App connection you just created and then selecting the repository you want to deploy:

Coolify create application

Make sure to select the branch you want to deploy, like main.

Configure the application

You will be redirected to the application configuration page. Here you need to configure the build settings for your application.

Coolify application configuration

Set the following values:

  • Install Command: pnpm install
  • Build Command: corepack enable; pnpm install --frozen-lockfile; pnpm build
  • Start Directory: pnpm --filter web start

Add environment variables

Before we we deploy the application, we need to add the environment variables in the Environment Variables tab.

Add all the envs from the .env.local file in your project root and make sure to use the production environment variables here.

Coolify add environment variables

Deploy the application

Now you can click the Deploy button to deploy your application. This will start the build process and deploy your application to your server.

Coolify deploy application

After the build process is finished, your application will be deployed to your server.

You probably want to assign a custom domain to your application. You can do this by setting it in the Domain field on the configuration page.

Coolify application domain

Lastly, set the defined domain as the NEXT_PUBLIC_URL environment variable in the Environment Variables tab and redeploy the application by clicking the Redeploy button in the top right corner.

Now you have a fully working supastarter application deployed to your own server.

On this page