System Boot
Run pm3 processes automatically on system startup.
pm3 can persist your process list and install a system service so your processes start automatically when you boot your machine.
Quick Setup
# 1. Start your processes
pm3 start
# 2. Save the current process list
pm3 save
# 3. Install the boot service
pm3 startupThat's it. Your processes will now start automatically on boot.
How It Works
pm3 save
Saves the current process list (names, config file path) to disk. This is the snapshot that pm3 resurrect will restore.
pm3 saveRun pm3 save again whenever you change your pm3.toml to update the saved state.
pm3 startup
Installs a system service that runs pm3 resurrect on boot.
pm3 startupmacOS
On macOS, pm3 startup creates a LaunchAgent (~/Library/LaunchAgents/). This runs under your user account and starts when you log in.
Linux
On Linux, pm3 startup creates a systemd user service (~/.config/systemd/user/). This runs under your user account and starts on boot (with lingering enabled).
pm3 resurrect
Restores the process list saved by pm3 save and starts all processes.
pm3 resurrectYou can also run this manually to restore your processes without rebooting.
Removing Boot Service
pm3 unstartupThis removes the system service file. Your processes will no longer start on boot.
Verifying It Works
After setting up:
- Run
pm3 saveto save your current state. - Run
pm3 startupto install the service. - Reboot your machine.
- After reboot, run
pm3 listto verify processes are running.
If processes aren't running after reboot:
- Check that
pm3 savewas run after your last config change. - On Linux, ensure systemd lingering is enabled:
loginctl enable-linger $USER. - Try
pm3 resurrectmanually to see if there are errors.
Typical Workflow
# Initial setup
pm3 start
pm3 save
pm3 startup
# After changing pm3.toml
pm3 restart
pm3 save
# To disable auto-start
pm3 unstartup