Skip to content

Configure System Service

This chapter covers how to configure the MSST-Net client core as a system service.

What Is a System Service

A system service is a background process mechanism.

Configuring the MSST-Net client core as a system service allows it to run continuously in the background and start automatically on boot.


Why Configure a System Service

Configuring the client core as a system service is recommended for the following reasons:

  • Starts automatically on boot
  • Runs continuously in the background
  • Improved stability
  • Supports automatic recovery

Recommended for devices with long-term MSST-Net connections.


Windows

When using the client installer, the system service (service name msst-net) is created and started automatically — no manual configuration needed.

For manual configuration, use the system service management tool to register the service.

After configuration, start or stop the service using the system service manager.


Linux (systemd)

On Linux, systemd is recommended for managing the client core.

When using the client installer, the systemd unit (msst-net) is created and enabled automatically — no manual configuration needed.

For manual configuration, see below.

Create the Service File

Service file path:

text
/etc/systemd/system/msst-net.service

The following is a hardened example for running the client core as a non-root user (adjust the installation path and username as needed):

ini
[Unit]
Description=MSST-Net Client Core
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=YOUR_USERNAME
ExecStart=/usr/bin/msst-net-client-core
Restart=on-failure
RestartSec=5
RuntimeDirectory=msst-net
RuntimeDirectoryMode=0750
AmbientCapabilities=CAP_NET_ADMIN
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

Replace YOUR_USERNAME with the actual username running the client. If the core is installed at a different path, update ExecStart accordingly.

Reload systemd Configuration

bash
sudo systemctl daemon-reload

Enable Service (Start on Boot)

bash
sudo systemctl enable msst-net

Start Service

bash
sudo systemctl start msst-net

Check Status

bash
sudo systemctl status msst-net

View Logs

bash
sudo journalctl -u msst-net -f

macOS (launchd)

On macOS, launchd is recommended for managing the client core.

Using the Client Installer

When using the client installer, a system-level LaunchDaemon is created automatically — it starts at boot without requiring a user login:

text
/Library/LaunchDaemons/net.msst.client.plist

Management commands:

bash
# Stop
sudo launchctl unload /Library/LaunchDaemons/net.msst.client.plist

# Start
sudo launchctl load -w /Library/LaunchDaemons/net.msst.client.plist

Manual Configuration (User-level LaunchAgent)

To run the client core as the current login user, create a user-level LaunchAgent manually:

text
~/Library/LaunchAgents/net.msst.client.plist

Example configuration file (adjust the installation path as needed):

xml
<?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>net.msst.client</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/msst-net/msst-net-client-core-macos-arm64</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>

Load Service

bash
launchctl load ~/Library/LaunchAgents/net.msst.client.plist

Unload Service

bash
launchctl unload ~/Library/LaunchAgents/net.msst.client.plist

Service Management

Start Service

Start the client core service.

Stop Service

Stop the client core service.

Restart Service

Restart the client core service.

Check Status

View the current service status.

View Logs

Regularly checking the service logs is recommended for troubleshooting.

Notes

The client controller is generally not recommended to be configured as a system service.

To open the controller automatically on login, use your system's built-in startup/login items feature.

Next Steps

After configuring the system service:

  • Complete access authentication
  • Choose a connection mode

See:

Getting Started

Designed by MSST-Net Dev Team, built with Claude Code