Get NextJet

Deploy to Sherpa.sh

Learn how to deploy your apps to Sherpa.sh.

Introduction

Sherpa.sh provides NextJS hosting solution that's 80% more affordable than Vercel and Netlify. Sherpa.sh provides a powerful, cost-effective alternative.

Sherpa.sh is an official partner of NextJet. This bootstrapped company was founded by developers who understand the challenges of scaling SaaS applications, and the founder is actively available in the NextJet Discord channel to provide personalized support. Just message zach @ sherpa.sh.

Video Tutorial

Below you will find a video tutorial that will guide you through the process of deploying the Nextjet Next.js SaaS boilerplate to sherpa.sh. You can also skip ahead and follow the written steps below.

Text Tutorial

Getting Started with Sherpa.sh

  1. Visit Sherpa.sh and click "Sign up for free"
  2. Link the github account/organization that contains your Nextjet project repo.
  3. Import your Nextjet project repo.

Deploying the Marketing Site

Configure Build Settings

Be sure to enter the project settings exactly. They are crucial for the project to deploy correctly.

Sherpa build settings for marketing site

As you can see in the image, please make sure to:

  1. use Next.js as the framework preset
  2. use pnpm for the install and build commands
  3. keep the default output directory .next
  4. set the root directory to apps/marketing

Configure Environment Variables

Add the following environment variables:

# --------------- APP ---------------
NEXT_PUBLIC_APP_ENV = The environment of the app, set it to `production`.
NEXT_PUBLIC_APP_URL = The URL of the marketing site, set it to `https://your-domain.com`.

# --------------- ANALYTICS ---------------
NEXT_PUBLIC_TINYBIRD_SRC
NEXT_PUBLIC_TINYBIRD_DATA_HOST
NEXT_PUBLIC_TINYBIRD_ANALYTICS_MARKETING_TRACKER_TOKEN

# --------------- MISC ---------------
NEXT_PUBLIC_CRISP_WEBSITE_ID = OPTIONAL, if you want to enable the support chat widget on the marketing site.

Deploy

Click Save & Deploy and wait for the build to complete. You will be able to see the live site by clicking View Live.

Custom Domains

To add custom domains follow the documentation here.

Deploying the Dashboard Site

Configure Build Settings

Be sure to enter the project settings exactly. They are crucial for the project to deploy correctly.

Just like the marketing site, please make sure to:

  1. use Next.js as the framework preset
  2. use pnpm for the install and build commands
  3. keep the default output directory .next
  4. set the root directory to apps/dashboard (this is the only build setting that is different from the marketing site)

Configure Environment Variables

Add the following environment variables:

# --------------- APP ---------------
NEXT_PUBLIC_APP_ENV = The environment of the app, set it to `production`.
NEXT_PUBLIC_APP_URL = The URL of the dashboard site, set it to `https:/app.your-domain.com`.

# --------------- ANALYTICS ---------------
NEXT_PUBLIC_TINYBIRD_SRC
NEXT_PUBLIC_TINYBIRD_DATA_HOST
NEXT_PUBLIC_TINYBIRD_ANALYTICS_DASHBOARD_TRACKER_TOKEN
    
# --------------- EMAIL ---------------
RESEND_KEY = The Resend API key.
RESEND_EMAIL_DOMAIN = Choose a professional email sending domain, for example, "info@your-domain.com"

# --------------- AUTHENTICATION ---------------
NEXTAUTH_URL = The URL of the dashboard site, set it to "https:/app.your-domain.com".
NEXTAUTH_SECRET = You can generate a secret by running "openssl rand -base64 32".
GITHUB_CLIENT_ID = OPTIONAL, if you want to enable GitHub login.
GITHUB_CLIENT_SECRET = OPTIONAL, if you want to enable GitHub login.
GOOGLE_CLIENT_ID = OPTIONAL, if you want to enable Google login.
GOOGLE_CLIENT_SECRET = OPTIONAL, if you want to enable Google login.

# --------------- DATABASE ---------------
DATABASE_URL = The production database URL. We obtained this from the previous steps.

# --------------- PAYMENTS ---------------
# Use these if you are using Stripe
STRIPE_SECRET_KEY = Make sure you use the production secret key.
STRIPE_PUBLISHABLE_KEY = Make sure you use the production publishable key.
STRIPE_WEBHOOKS_SECRET = Make sure you use the production webhooks signing secret.

# Use these if you are using Lemon Squeezy:
LEMONSQUEEZY_API_KEY = Make sure you use the production api key.
LEMONSQUEEZY_STORE_ID = Make sure you use the production Store ID.
LEMONSQUEEZY_WEBHOOK_SECRET = Make sure you use the production webhooks signing secret.

# --------------- MISC ---------------
NEXT_PUBLIC_CRISP_WEBSITE_ID = OPTIONAL, if you want to enable the support chat widget.
NEXT_PUBLIC_CANNY_BOARD_TOKEN = OPTIONAL, if you want to enable the feedback board.
CANNY_PRIVATE_KEY = OPTIONAL, if you want to enable the feedback board.

Deploy

Click Save & Deploy and wait for the build to complete. You will be able to see the live site by clicking View Live.

Custom Domains

To add custom domains follow the documentation here.

Continuous Deployment

One of the best features of Sherpa.sh is automatic continuous deployment:

  • Every push to your main branch will trigger a new build and deployment
  • Pull requests automatically create staging environments for testing
  • Database schema migrations can be handled through GitHub Actions workflows
  • Zero-downtime deployments ensure your users never experience interruptions

You can read more about sherpa.sh app hosting on their website.

Community Support

As a bootstrapped company built by developers for developers, Sherpa.sh provides exceptional community support. The founder is actively involved in the NextJet Discord channel, where you can ask questions, get personalized help, and connect with other NextJet users.

This direct access to the founder and the Sherpa.sh team ensures you'll never be stuck during deployment, and you'll always have expert guidance available when needed.


Last updated on