summarylogtreecommitdiffstats
path: root/xray.service.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'xray.service.tmpl')
-rw-r--r--xray.service.tmpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/xray.service.tmpl b/xray.service.tmpl
new file mode 100644
index 000000000000..315269d3d967
--- /dev/null
+++ b/xray.service.tmpl
@@ -0,0 +1,14 @@
+[Unit]
+Description=Xray Service
+After=network.target nss-lookup.target
+
+[Service]
+User=xray
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+NoNewPrivileges=true
+ExecStart=/usr/bin/xray run -config ${TMPL_CONFIG_FILE_PATH}
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target