Skip to content

tori always-on

keep a service app running when idle, or let it sleep

npx tori.host always-on status [app]

If the control plane does not offer always-on, the command says so and changes nothing. A service app scales to zero when nobody visits, and the next request waits a few seconds for it to start. on keeps one instance running instead, so that request does not wait; off lets it sleep again; status, or no word at all, prints the state. The word comes first and the app after it, so an app named on or off is never taken for the switch. Your plan includes a number of always-on apps, and switching on one more is refused. After a move to a plan that includes fewer, the apps asked for first keep their places and the others are asked for but not held, as is an app that is not being served; each is kept running without asking again once that changes. The zone follows a change within about a minute, as a new revision of the same image and environment, and status says "kept running" only once it serves that revision. Static sites have no instance and cannot be always-on.

  • [on|off|status] — Keep one instance running when idle, let the app sleep, or show the state (the default).
  • [app] — App slug. Defaults to the app in ./tori.json.
  • --json — print the API's answer instead of the lines
  • --no-browser — do not open a browser; sign in only with a code typed on another device (chosen automatically over SSH or with no DISPLAY)
Terminal window
npx tori.host always-on on
Terminal window
npx tori.host always-on off crimson-finch

This reference matches tori.host@0.22.9.

Download this page as Markdown.