POST to a subpath; stop, start, and restart take no body, update takes an optional template version, and resize takes the new size. They acknowledge the new state only, returning { id, status } (update adds nullable image_ref, image_digest, and template_revision; resize adds resources); GET the instance for its full representation. start and resize answer 202 instead of 200 when they moved the instance to another host and the move is still finishing (status still starting/updating); poll GET until it reads running.
The whole disk persists, like a VM. Files anywhere on the filesystem, installed packages, edited config, connected accounts: all of it survives stop, start, restart, and resize, and rides along if the platform ever moves the instance between hosts. The one exception is update, which resets the operating system layer to the fresh image while keeping your data (/home/node and /home/linuxbrew); a boot hook can put back what it resets. Writes outside those two directories share a 10 GB operating-system layer separate from the instance’s billed disk. In-memory state is lost whenever the container is recreated; anything that must outlive a restart belongs in a file.
Boot hooks
Two scripts in the instance’s home run on their own as it boots, so you can put back what anupdate resets or a recreate loses. Every system template except agent37-n8n has them, and so does an image built on our base images that keeps the base ENTRYPOINT. The first boot creates both, holding only comments, so they do nothing until you add commands.
Both run as the image’s default user (
node on system templates), not root, with the instance’s env vars; when both run, post-image-update.sh goes first. Their output lands in the instance’s logs. The chat API is already up while they run, so a turn can arrive before a hook finishes. Saving a script does not run it: do the install once now over exec, and the hook repeats it after every image change. Anything that needs root, such as apt-get, cannot go in a hook; rerun it over exec as root after the update.
An update of a running instance that keeps the same image still resets everything outside /home/node and /home/linuxbrew, but it is not an image change, so post-image-update.sh does not run. To keep something in place across every update, put a guarded line in post-restart.sh that checks on each boot and reinstalls only what is missing. For example, a Python package in Hermes’s own environment:
curl