Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Service Management

Moltis can be installed as an OS service so it starts automatically on boot and restarts after crashes.

Install

moltis service install

This creates a service definition and starts it immediately:

PlatformService fileInit system
macOS~/Library/LaunchAgents/org.moltis.gateway.plistlaunchd (user agent)
Linux~/.config/systemd/user/moltis.servicesystemd (user unit)

Both configurations:

  • Start on boot (RunAtLoad / WantedBy=default.target)
  • Restart on failure with a 10-second cooldown
  • Log to ~/.moltis/moltis.log

Options

You can pass --bind, --port, and --log-level to bake them into the service definition:

moltis service install --bind 0.0.0.0 --port 8080 --log-level debug

These flags are written into the service file. The service reads the rest of its configuration from ~/.moltis/moltis.toml as usual.

Manage

moltis service status     # Show running/stopped/not-installed and PID
moltis service stop       # Stop the service
moltis service restart    # Restart the service
moltis service logs       # Print the log file path

To tail the logs:

tail -f $(moltis service logs)

Uninstall

moltis service uninstall

This stops the service, removes the service file, and cleans up.

CLI Reference

CommandDescription
moltis service installInstall and start the service
moltis service uninstallStop and remove the service
moltis service statusShow service status and PID
moltis service stopStop the service
moltis service restartRestart the service
moltis service logsPrint log file path

How It Differs from moltis node add

moltis service install manages the gateway — the main Moltis server that hosts the web UI, chat sessions, and API.

moltis node add registers a headless node — a client process on a remote machine that connects back to a gateway for command execution. See Multi-Node for details.

moltis servicemoltis node
What it runsThe gateway serverA node client
Needs --host/--tokenNoYes
Config source~/.moltis/moltis.toml~/.moltis/node.json
launchd labelorg.moltis.gatewayorg.moltis.node
systemd unitmoltis.servicemoltis-node.service