Getting started

Your first deployment

Create an app, deploy it, and check the result, step by step.

By the end of this page your site is live at https://<app-name>.ntro.run.

Install the CLI and log in

Install the CLI

curl -fsSL https://nitroship.co/install.sh | bash
ntro login

Already installed? Skip ahead. Full options, PATH setup, and updates: Install the CLI.

Create an app

Move into the project folder you want to deploy and create an app.

cd my-project
ntro apps create hello-site

hello-site becomes the app's slug (the name used in its address), so production lives at https://hello-site.ntro.run. Leave the name out and the CLI suggests the folder name.

Creating an app links the current folder to it. The link is saved in .nitroship/app.json, so commands run in this folder know which app you mean without --app. Add --no-link if you do not want that.

If the name is taken

If an app in your team already uses the name, the CLI offers to link to that app. If someone else uses it or it is reserved, pick another name.

Deploy

Deploy straight from the linked folder. --prod means "deploy to production".

ntro deploy . --prod

Your source goes to the remote builder, which installs dependencies and builds for you. It detects the project type automatically, checking for a Dockerfile, then Next.js, then framework presets, then plain static files. To pick a preset yourself, set build.framework in nitroship.json. It wins even over a root Dockerfile and can't be combined with build.dockerfile.

To upload only an already-built static folder, pass that folder. The app link lives in the current folder, not in subfolders like ./public, so name the app with --app.

ntro deploy ./public --app hello-site --prod

Deploying a server? Pick a region first

The region where your server runs has no default. Choose one under App Settings > Compute in the console, or add {"compute":{"regions":["kr-icn"]}} to nitroship.json at your project root. Static sites do not need this.

Check the result

ntro deploy waits until the build finishes (ready or failed) and then prints two addresses:

  • Production URL hello-site.ntro.run: always shows the current production deployment.
  • Revision URL hello-site-<short-id>.rev.ntro.run: pinned to the deployment you just made.

List your deployments with:

ntro deployments list

From the second deployment on

Change your code and run ntro deploy again: this time it becomes a preview. Only the first deployment goes to production automatically; after that, preview is the default so you never change your live site by accident.

ntro deploy            # deploy a preview to check
ntro deploy --prod     # deploy straight to production

Managing deployments explains how to move a preview to production (promote) and how to go back (roll back).

Running in CI or scripts

Where the CLI cannot ask questions (CI, --yes, --json), always add --app <app-name> when deploying a folder that is not linked. In an interactive terminal the CLI asks you to pick or create an app instead.

Framework guides

Other ways to deploy

On this page