Skip to content

Commit c671730

Browse files
committed
chore: update one-api.service
1 parent 97cdb61 commit c671730

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

one-api.service

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
# File path: /etc/systemd/system/one-api.service
2+
# sudo systemctl daemon-reload
3+
# sudo systemctl start one-api
4+
# sudo systemctl enable one-api
5+
# sudo systemctl status one-api
16
[Unit]
27
Description=One API Service
38
After=network.target
49

510
[Service]
6-
User=yourusername # 守护进程用户名
7-
WorkingDirectory=/path/to/One-API # One API运行路径
8-
ExecStart=/path/to/One-API/one-api --port 3000 --log-dir /path/to/One-API/logs # 端口
11+
User=ubuntu # 注意修改用户名
12+
WorkingDirectory=/path/to/one-api # 注意修改路径
13+
ExecStart=/path/to/one-api/one-api --port 3000 --log-dir /path/to/one-api/logs # 注意修改路径和端口号
914
Restart=always
1015
RestartSec=5
1116

0 commit comments

Comments
 (0)