Start

Getting started

From an invitation to a running app with a database, a custom domain, and a coding agent that can deploy safely.

1. Install the CLI

On macOS and Linux. It checks the download’s checksum and installs into ~/.local/bin; no sudo.

Terminal
curl -fsSL https://console.apprail.io/api/cli/install.sh | sh

On Windows, download apprail-windows-amd64.exe from https://console.apprail.io/api/cli/. Then create a token in the console under Settings → API tokens (Used by: Me, Access: Full access) and sign in:

Terminal
apprail login
apprail whoami

2. Deploy something

Every project starts with production and staging environments.

Terminal
apprail projects create "Shop" --slug shop
apprail services create shop web --port 80
apprail deploy shop/web --image nginx:1.27

The deploy waits until the new release passes its health check, then prints its address. The previous release keeps serving until then, and a release that never becomes healthy is rolled back automatically.

To deploy from your repository instead, open the service in the console, Connect GitHub, and pick the repository and branch. It deploys right away and on every push; Rebuild now deploys without a push. No Dockerfile? Common frameworks are detected.

3. Add a database

Terminal
apprail databases create shop main

When it is ready, every service in the environment receives DATABASE_URL (and APPRAIL_DATABASE_MAIN_*) and restarts with it. If your app needs its schema created first, set a pre-deploy command such as npx prisma migrate deploy.

Terminal
apprail variables shop --values
apprail databases connect shop main

4. Use your domain

Terminal
apprail domains add shop/web www.example.com

It prints the DNS records to add at your DNS provider. HTTPS is issued automatically once they resolve. More in Domains & HTTPS.

5. Let your agent deploy

Create a token with Used by: Coding agent and Access: Deploy, give it to the agent as APPRAIL_TOKEN, and turn on Require approval for production. See Agents & MCP.

When something goes wrong, apprail diagnose shop/web explains it in plain words — out of memory, wrong port, a failing health check — and what to do.

Next