Documentation

Quickstart — 60 seconds to live.

You'll install the CLI, link a repo, and deploy your first commit. If it takes longer than a minute, we owe you a coffee.

v4.0 · updated Jul 2026
1

Install the Portal CLI

The CLI is a single binary. It works on macOS, Linux, and Windows (WSL).

curl -fsSL https://portal.dev/install | sh

Verify the install:

$ portal --version
portal 4.0.2 (2026-07-01, darwin-arm64)
2

Link a repository

From inside any Git repo, run portal link. We'll autodetect the framework and create a project.

$ cd ~/apps/acme-web
$ portal link

? What team should this belong to?  › acme
? Project name?                     › acme-web
? Framework detected: next.js@15.2  › use detected
? Production branch?                › main

 Linked to acme/acme-web
 Wrote portal.config.ts
 Added .portal/ to .gitignore
3

Add environment variables

Secrets are scoped per environment (production, preview, development). They're encrypted at rest and injected at build & runtime.

# add a secret to production only
$ portal env add DATABASE_URL --prod

# add to production + preview
$ portal env add STRIPE_SECRET --prod --preview

# pull secrets into a local .env
$ portal env pull .env.local
4

Deploy

You have two options: push to your production branch, or run portal deploy directly.

$ git push origin main

portalbuild ▓▓▓▓▓▓▓▓▓▓ 6.4s
portalupload 214 assets
portaldeploy to 42 regions

   https://acme-web.portal.app  (production)
  Total: 8.3s
5

Ship a preview

Any non-production branch gets its own URL, automatically. Open a PR to see the Portal bot post a link.

$ git checkout -b fix/hydration
$ git commit -am "fix: hydration mismatch"
$ git push -u origin fix/hydration

   https://acme-web-git-fix-hydration.portal.app
   Comment posted on github.com/acme/web/pull/482
You're done

That's the whole quickstart.

Read the CLI reference, or jump straight into your first project.