Skip to content
Upstate Docs
Log in Open Upstate

Start here

Set up with upstate init

upstate init is one guided command for an existing Kamal repository. It ends at four things: a merge to main deploys, the deploy is verified, deploy messages can reach your chat, and you see what is and is not watched. Whether fault alerts are routed to that chat is not checked yet; review it in your notification destinations.

upstate init needs CLI v0.2.20 or later. Everything runs on your machine, and only after you confirm. Nothing new runs on your servers from the Upstate service. Secrets travel from your machine to GitHub only through your own gh login (via kamal-autodeploy). Upstate never stores them.

cd my-existing-kamal-app
upstate init --dry-run
upstate init

The steps

Each step shows what it will change, then asks. Answer n to skip it.

StepName for --skipWhat happens
ConnectconnectRuns upstate connect for this repository, and again if this machine has no deployment credential for a saved connection. It also offers to connect servers in your Kamal config (including a destination file) that are not linked yet, and adds a first HTTP check when a public URL is known.
ObserverobserverRuns the observer install from upstate connect, with its own server-by-server confirmations. With --yes, pass --observer-mode; otherwise the step is skipped and prints the command to run.
Deploy on merge to mainautodeployRuns kamal-autodeploy plan, init, provision and doctor, showing the files and the GitHub changes first. Release builds of the CLI pin their own version in CI so deploys report receipts; a development build warns and leaves the pin out. Automatic deploys are switched on only after a separate question.
First HTTP checkhttpIf a check is missing, opens the page where you add it.
Deploy notificationsnotificationsIf no destination sends deploy messages, opens the page where you add one. Alert routing is not checked yet.
BackupsbackupsOptional. Offers the page to set up backup check-ins.
Failure excerptsexcerptsRecommended. Offers to turn on redacted failure excerpts for the account (owners and admins, Pro and Team) after explaining the tradeoff. Off by default.

If kamal-autodeploy is not on your PATH, that step is skipped with install instructions. It is not a failure, and the other steps do not depend on it.

Kamal Autodeploy works without the Upstate GitHub App. In the next CLI release, upstate init proposes deployment-unit links from the Git origin and the published .kamal-autodeploy.yml and workflow. Receipt setup is checked separately, so ambiguous receipt configuration does not block the link chooser. It shows the repository, unit, branch and Upstate environment. If several units match, choose one in the terminal. After your approval it opens the project's Auto-deploy page with those values filled in. Review and confirm the form; GitHub App authorization remains separate from your local gh login.

If GitHub is not connected, use Connect GitHub there. The proposed values survive the authorization return, including a failed or interrupted attempt that returns to Upstate. You can also rerun upstate init. An identical link is Already linked; a conflicting mapping requires deliberate unlinking in the web UI before replacement. Manual editing stays available.

--dry-run opens no browser and changes no mapping or credentials. --yes prints the review URL and never grants GitHub App access, chooses among ambiguous units, or replaces an existing link. A verified deployment receipt does not imply that this optional GitHub App mapping is configured.

If the optional GitHub review page cannot open, upstate init prints a warning and keeps its review URL available for manual use. Receipt validation, remaining monitoring steps and the final coverage summary still run.

For the last three steps the CLI cannot create the item itself. It opens the link, waits for you to press Enter, then reads your coverage again and reports the new state.

Running it again

Run upstate init as often as you like. Each step checks real state, not a saved progress file:

  • Connect is done when this repository has a valid saved connection and this machine holds its deployment credential.
  • Observer is done when every linked server in this repository's connection is reporting now or accepted as not needed, checked against your account's servers so a new server that never reported keeps the step open (a restored server awaiting observer reconnection does not count).
  • Deploy on merge is done when .github/workflows/kamal-autodeploy.yml and .kamal-autodeploy.yml exist, activation is automatic, kamal-autodeploy doctor passes without skipped or unknown GitHub checks, the Upstate CLI is pinned in the config (also for development builds), the unit for this destination reports receipts to this Upstate environment, and both files match origin/<branch>, so a local-only edit such as switching activation is not done until it is committed and pushed. Manual activation or unverified GitHub setup keeps the step open. kamal-autodeploy init is safe to repeat, so it runs each time.
  • The last three are done when Upstate reports no open gap for that signal (or you marked it as not needed). A gap with nothing to do yet, such as a new check waiting for its first run, is shown as pending and is not an error.

Finished steps print "Already done" with the evidence, and nothing is created twice.

Flags

FlagMeaning
--dry-runPrint each step's state and what it would do. Changes nothing, including saved connection files.
--yesAccept every confirmation. Required without a terminal. With --yes the CLI never opens a browser; it prints the link instead.
--skip STEPSkip a step. Repeat for several.
-d, --destination NAMEThe Kamal destination to set up.
--host ADDRESS=host_…, --new-host ADDRESSLink or create servers, as in upstate connect. Repeatable. Needed with --yes for an unknown server address.
--observer-mode MODEsystemd, kamal or manual, as in upstate connect --observer.
-h, --helpShow help.

--yes never starts a browser login: sign in first with upstate auth login.

Without a terminal and without --yes, upstate init stops with a message instead of waiting for input.

The summary

The command ends by printing your coverage: what Upstate is watching and which gaps remain, each with its next action. upstate status shows the same view later.

See also Getting started, Deploying with Kamal and CLI command reference.

First-report and first-deploy monitoring

A linked server with no accepted observer report is Waiting for first report, not protected. It does not open a “Server stopped reporting” incident. Once a server has reported, the normal five-minute silence alert and recovery apply; reconnecting does not erase that history. Fleet and MCP expose the waiting state.

For a new app that has not been deployed yet, the next CLI release accepts upstate init --http-await-first-success (also available on upstate connect). This explicit choice applies only when creating the first HTTP check; reconnecting never rearms an existing monitor. Failures remain recorded and coverage stays unknown until the first successful check. That success permanently arms normal outage alerting. Ordinary monitors and connections without this option retain normal failure alerts from the start, including already-down production URLs.

A reporting host does not prove application containers exist. If setup times out, check upstate observer status; when hosts report but app containers are missing, run your deployment. A host without /var/run/docker.sock needs Kamal/Docker setup under your own approval before observer installation. Upstate does not install Docker.

Legacy stopped-reporting incidents for never-observed servers close quietly as corrections, with a reason recorded in alert history. This does not announce a recovery: the server still needs its first report and remains unprotected.