Run nexy as systemd service.
System user
useradd -m nexy - create new system user with its home directory
passwd nexy - provide strong password
su nexy - login as nexy
cd - navigate to the home folder
mkdir /home/nexy/public - create location for the public fies
Service configuration
Create new file /etc/systemd/system/nexy.service with following settings:
[Unit]
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=nexy
Group=nexy
ExecStartPre=/bin/sleep 10
ExecStart=/usr/local/bin/nexy -p /home/nexy/public -b 0.0.0.0:1900
StandardOutput=file:/home/nexy/debug.log
StandardError=file:/home/nexy/error.log
[Install]
WantedBy=multi-user.target
- replace
0.0.0.0:1900 with your address, use [300:xxxx:xxxx:xxxx::1]:1900 notation for IPv6
- bind (
-b) as many interfaces as desired
- to disable errors output, set
StandardError as null
Manage
sudo systemctl daemon-reload - apply new configuration
sudo systemctl enable nexy - autostart on system startup
sudo systemctl restart nexy - start the service