Expiring sessions
Auto-close a session after a duration or after the first viewer leaves.
By default a session lives until you stop it. For shares you would rather not leave open, Porthole can close itself automatically.
After a duration
porthole host --expire 30mThe session shuts down after the given duration whether or not anyone is
connected. Durations accept Go-style units — 90s, 30m, 2h.
After the first viewer leaves
porthole host --onceThe session closes as soon as the first viewer disconnects — ideal for a one-time "look at this and we're done" share.
--expire and --once combine: whichever condition is met first ends the
session.
Without --once, a disconnect is not the end
This is worth being clear about, because the default surprises people.
A viewer leaving does not end the session — your shell keeps running and Porthole goes back to waiting, so the same link works if they come back. That is deliberate: killing the shell on every network blip would destroy your working directory, your scrollback, and anything running, and a dropped connection is indistinguishable from someone closing a tab.
If you want the stricter behaviour, that is exactly what --once is for.
Ending it yourself
You are always in control regardless of these flags:
- Ctrl+] q — end the session
exitor Ctrl+D — exit the shared shell
Ctrl+C does not end the session. While hosting it belongs to the shared shell, as it does over SSH. See Host controls.