Help center › Setting up your Mac

Keep jobs running after you disconnect

tmux, nohup and launchd for long builds and servers.

Anything started in an SSH session stops when the session ends, unless you detach it.

tmux (easiest)

brew install tmux
tmux new -s work      # start; press Ctrl-b then d to detach
tmux attach -t work   # come back later

One-off command

nohup ./long-build.sh > build.log 2>&1 &

For something that must start by itself after a reboot, use launchd: a LaunchDaemon in /Library/LaunchDaemons starts at boot, while a LaunchAgent starts only when dev is logged in to the desktop. Apple explains both in Creating Launch Daemons and Agents. The Mac is set never to sleep.

Related

Install Homebrew and common toolsInstall Homebrew on Apple silicon and the usual developer tools.Copy files to and from your Macscp, rsync and sftp with your custom port.Reach a web server or other port on your MacForward a port over SSH, or ask us to open one.

Still stuck?

Signed-in customers can message us from the portal; we reply within 24 hours on business days (AEST).