Service Installation

CortexPrism can be installed as a system service for automatic startup on all platforms.

Installation Commands

cortex service install                  # Install daemon + server as system services
cortex service uninstall                # Remove system services
cortex service install --daemon-only    # Install daemon only
cortex service install --server-only    # Install server only

Linux (systemd)

User-level systemd unit installed at ~/.config/systemd/user/cortex-daemon.service:

systemctl --user enable cortex-daemon
systemctl --user start cortex-daemon
systemctl --user status cortex-daemon

macOS (launchd)

LaunchAgent installed at ~/Library/LaunchAgents/com.cortexprism.daemon.plist:

launchctl load ~/Library/LaunchAgents/com.cortexprism.daemon.plist
launchctl unload ~/Library/LaunchAgents/com.cortexprism.daemon.plist

Windows

Options: NSSM (Non-Sucking Service Manager) or Task Scheduler with system startup trigger.

.\deploy\install-service.bat
.\deploy\install-service.bat --daemon-only
.\deploy\install-service.bat --server-only

Deployment Configs

Pre-built configs in deploy/:

FileDescription
cortex-daemon.servicesystemd user unit
cortex-server.servicesystemd server-only unit
cortex-node.servicesystemd node service unit
com.cortexprism.daemon.plistmacOS launchd agent
com.cortexprism.server.plistmacOS server launchd agent
install-service.batWindows batch installer

Docker Deployment

CortexPrism includes a multi-stage Dockerfile and docker-compose configuration:

docker-compose up -d

This starts:

  • CortexPrism web server (port 3000)
  • Nginx reverse proxy (port 80/443)

See Also