Download new-api.service from AZILS/new-api: direct link, hf CLI and curl.
- Browser
- Download file 514 Bytes
-
https://huggingface.co/spaces/AZILS/new-api/resolve/main/new-api.service
- Command line
-
hf download hf://spaces/AZILS/new-api/new-api.service
-
curl -L -o new-api.service https://huggingface.co/spaces/AZILS/new-api/resolve/main/new-api.service
514 Bytes
| # File path: /etc/systemd/system/new-api.service | |
| # sudo systemctl daemon-reload | |
| # sudo systemctl start new-api | |
| # sudo systemctl enable new-api | |
| # sudo systemctl status new-api | |
| [Unit] | |
| Description=One API Service | |
| After=network.target | |
| [Service] | |
| User=ubuntu # 注意修改用户名 | |
| WorkingDirectory=/path/to/new-api # 注意修改路径 | |
| ExecStart=/path/to/new-api/new-api --port 3000 --log-dir /path/to/new-api/logs # 注意修改路径和端口号 | |
| Restart=always | |
| RestartSec=5 | |
| [Install] | |
| WantedBy=multi-user.target | |