2026-09-07 19:50:34 +00:00
|
|
|
[Unit]
|
|
|
|
|
Description=Xray-core Service
|
|
|
|
|
Documentation=https://github.com/xtls/xray-core
|
|
|
|
|
After=network.target network-online.target nftables.service
|
|
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
2026-09-20 22:14:56 +00:00
|
|
|
User=xray-core
|
|
|
|
|
Group=xray-core
|
2026-09-07 19:50:34 +00:00
|
|
|
WorkingDirectory=/opt/xray-core
|
|
|
|
|
ExecStart=/opt/xray-core/xray -confdir /opt/xray-core/config
|
|
|
|
|
Restart=on-failure
|
|
|
|
|
RestartSec=3s
|
|
|
|
|
LimitNOFILE=65535
|
2026-09-20 22:14:56 +00:00
|
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_ADMIN
|
|
|
|
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_NET_ADMIN
|
|
|
|
|
NoNewPrivileges=true
|
2026-09-07 19:50:34 +00:00
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|