Run Pi 24/7
Pi only works while its machine is awake and its session is open. An EnvHaven workspace is an always-on Linux machine with a persistent session and no prompts to stall it, so Pi works through the night. The setup, and how to do the same on your own server.
Updated November 23, 2026 · Checked against Pi 0.87.1 in EnvHaven v1.9.0
What stops it
- The machine sleeps. Close a laptop and the agent stops with it.
- The terminal closes. Ending an SSH or terminal session sends a hangup to everything started in it.
- A prompt waits for you. An agent that asks before acting stops whenever you look away.
- The provider pauses it. Rate limits and outages stall a run until they pass.
Run Pi 24/7 on EnvHaven
A workspace answers the first two by design: it is a Linux machine that never sleeps, and its terminal session outlives every tab.
- Open your workspace in any browser.
- Tap Launch, choose Pi and tap Sign in: it starts Pi, which asks you to sign in the first time. For an API key, choose Set key instead and paste
ANTHROPIC_API_KEY,OPENAI_API_KEYorGEMINI_API_KEY; the workspace keeps it write-only. - Start it with one tap: signed in, Pi gets a green dot in the Launch menu and an icon in the workspace’s top bar. Support is built in (0.87.1), so there is nothing to install or update.
- Give it a task. Runs unchanged; it never stops to ask.
- Close the tab or the laptop. The workspace has no idle shutdown and its terminal session persists, so the work continues.
- Open the workspace from any device, phone included, to read progress or answer a question.
Keeping it from stalling
- Turn approval prompts off on the machine it runs on (how, for Pi).
- Watch its providers on the Pi status page, and keep a second agent from another provider in the same workspace for the day one is down.
- Ask it to keep a progress file in the repository, so a fresh session can pick up where an old one stopped.
On a server you manage yourself
Without a workspace you assemble the same things yourself: a Linux machine that never sleeps, Pi installed and signed in without a browser, a session that survives disconnects, and no prompts. The Pi on a VPS page walks through it.