ScanopyScanopy

Managing Daemons

Create, upgrade, and remove daemons.

Requirements

  • Linux: Docker with host networking OR standalone binary
  • macOS: Standalone binary only — Docker Desktop doesn't allow access to host interfaces
  • Windows: Standalone binary only — Docker Desktop doesn't allow access to host interfaces

Creating a Daemon

Go to Discover > Scan > Daemons and click Create Daemon. The wizard walks you through:

  1. Configuration — network, polling mode, and daemon name
  2. Credentials — optionally add SNMP and Docker Proxy credentials with target IPs. These will be auto-assigned to discovered hosts after the first scan. See Credentials for details.
  3. Advanced — Docker mode selection (Disabled, Local Socket, or Proxy) and other options
  4. Install — a ready-to-copy install command with the correct API key, server URL, daemon name, and any --credential-id flags

For help choosing a polling mode and planning where to place daemons, see Planning Daemon Deployment.

Running as a Service

By default the daemon runs in the foreground and stops when you close the terminal. To keep it running across reboots, install it as a background service.

Linux (systemd)

The install script offers to set up a systemd service automatically. If you skipped that step or installed manually, download the systemd service file and install it:

sudo curl -o /etc/systemd/system/scanopy-daemon.service \
  https://raw.githubusercontent.com/scanopy/scanopy/main/scanopy-daemon.service
sudo systemctl daemon-reload
sudo systemctl enable scanopy-daemon
sudo systemctl start scanopy-daemon

Verify it's running:

sudo systemctl status scanopy-daemon

The service logs to the journal — view logs with journalctl -u scanopy-daemon -f.

If you run multiple daemons on one host, see Running Multiple Daemons for the systemd template unit.

macOS (launchd)

Create a launch agent plist:

cat > ~/Library/LaunchAgents/com.scanopy.daemon.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.scanopy.daemon</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/scanopy-daemon</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/tmp/scanopy-daemon.stdout.log</string>
    <key>StandardErrorPath</key>
    <string>/tmp/scanopy-daemon.stderr.log</string>
</dict>
</plist>
EOF

Load and start the service:

launchctl load ~/Library/LaunchAgents/com.scanopy.daemon.plist

Verify it's running:

launchctl list | grep scanopy

To stop and unload:

launchctl unload ~/Library/LaunchAgents/com.scanopy.daemon.plist

Windows (NSSM)

NSSM (Non-Sucking Service Manager) lets you run any executable as a Windows service.

  1. Download and install NSSM

  2. Install the daemon as a service:

nssm install ScanopyDaemon "C:\Path\To\scanopy-daemon.exe"
  1. Configure log output so you can troubleshoot issues:
nssm set ScanopyDaemon AppStdout "C:\ProgramData\scanopy\daemon.log"
nssm set ScanopyDaemon AppStderr "C:\ProgramData\scanopy\daemon.log"
nssm set ScanopyDaemon AppRotateFiles 1
  1. Start the service:
nssm start ScanopyDaemon
  1. Verify it's running:
Get-Service ScanopyDaemon

To stop or remove the service:

nssm stop ScanopyDaemon
nssm remove ScanopyDaemon confirm

Integrated Daemon (Self-Hosted)

Self-hosted Docker Compose deployments include an integrated daemon that runs alongside the server. This daemon is managed as part of your Compose stack — it upgrades when you upgrade the server and doesn't need separate installation or API key setup. For upgrading the integrated daemon along with your server, see Upgrading a Self-Hosted Server.

Upgrading

When an update is available, the daemon card in Discover > Scan > Daemons shows an Update button. Click it to see platform-specific upgrade steps. Configuration is preserved across upgrades.

For upgrading self-hosted server and integrated daemon together, see Upgrading.

Updating Daemon Properties

You can update daemon properties after creation by editing the daemon config file. Restart the daemon for changes to take effect.

The daemon's name is the only property that propagates to the server. All other config properties are local to the daemon.

Each daemon also reports its capabilities to the server: whether it has Docker socket access (for container discovery) and which subnets it has network interfaces on (for default scan targets). To update capabilities after changing the host's network configuration or Docker access, run a SelfReport discovery.

Removing a Daemon

To fully remove a daemon, delete it from the UI and uninstall it from the host.

Delete from the UI: Go to Discover > Scan > Daemons and click the delete icon on the daemon card.

Deleting or uninstalling a daemon does not delete discovered data. Hosts, services, subnets, and topology remain on the server until you explicitly delete them.

Uninstall from the host:

Docker:

docker stop scanopy-daemon
docker rm scanopy-daemon

Linux/macOS binary:

# Stop systemd service (if installed)
sudo systemctl stop scanopy-daemon
sudo systemctl disable scanopy-daemon
sudo rm /etc/systemd/system/scanopy-daemon.service

# Remove binary
sudo rm /usr/local/bin/scanopy-daemon

# Remove configuration
rm -rf ~/.config/scanopy/  # Linux
rm -rf ~/Library/Application\ Support/com.scanopy.daemon/  # macOS

Windows:

  1. Stop the daemon process
  2. Delete the executable
  3. Remove configuration from %APPDATA%\scanopy\daemon\

Can I migrate a daemon?

No. Daemons discover host-specific data (network interfaces, Docker containers, local services) tied to the machine they run on. Moving a daemon's identity to a different host would produce inaccurate data.

If you're replacing a host, create a new daemon on the new machine and delete the old one.

On this page