1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00

Add two systemd unit files in extras/startup:

Use extras/startup/unrealircd.service if you want a system-wide unit
file, which is normally what people tend to use. The benefit of this
is that it allows setting some security options.

Use extras/startup/unrealircd_user.service if you want a user unit
file. This works if you don't have root on the machine.
This commit is contained in:
Bram Matthys
2025-10-29 10:06:30 +01:00
parent 82417d0cd2
commit fea1d2ab8b
2 changed files with 78 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# Systemd service for UnrealIRCd
# To use this:
# 1) Adjust user/group/paths under [Service] if needed.
# 2) Then run the following commands as root:
# cp -av unrealircd.service /etc/systemd/system/
# systemctl daemon-reload
# systemctl enable unrealircd.service
# systemctl start unrealircd.service
[Unit]
Description=UnrealIRCd
Documentation=https://www.unrealircd.org/
Description=UnrealIRCd IRC Server
After=network-online.target
Wants=network-online.target
[Service]
# If needed, change 'ircd' to your unrealircd user and adjust paths:
User=ircd
Group=ircd
ExecStart=/home/ircd/unrealircd/bin/unrealircd -F
# These settings should be fine for everyone
Type=simple
Restart=on-failure
RestartSec=5s
LimitNOFILE=65536
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
NoNewPrivileges=true
PrivateTmp=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictRealtime=true
ProtectSystem=strict
[Install]
WantedBy=default.target
+37
View File
@@ -0,0 +1,37 @@
# Systemd service for UnrealIRCd (user service)
#
# This is the USER service. You can use this if you don't have root
# on the machine (otherwise, people usually use the other
# unrealircd.service system unit instead).
#
# To install:
# 1) Adjust the ExecStart= line below, if your unrealircd isn't
# installed in ~/unrealircd/
# 2) Then run the following commands (as a regular user):
# loginctl enable-linger
# mkdir -p ~/.config/systemd/user
# cp unrealircd_user.service ~/.config/systemd/user/unrealircd.service
# systemctl --user daemon-reload
# systemctl --user enable unrealircd.service
# systemctl --user start unrealircd.service
[Unit]
Description=UnrealIRCd
Documentation=https://www.unrealircd.org/
Description=UnrealIRCd IRC Server (user service)
After=network-online.target
Wants=network-online.target
[Service]
# Adjust this if unrealircd is installed somewhere else:
ExecStart=%h/unrealircd/bin/unrealircd -F
Type=simple
Restart=on-failure
RestartSec=5s
LimitNOFILE=65536
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
[Install]
WantedBy=default.target