# File path: /etc/systemd/system/heicode.service # sudo systemctl daemon-reload # sudo systemctl start heicode # sudo systemctl enable heicode # sudo systemctl status heicode [Unit] Description=Heicode Manager (gateway) After=network.target [Service] User=ubuntu # 注意修改用户名 WorkingDirectory=/path/to/heicode # 注意修改路径 ExecStart=/path/to/heicode/heicode --port 3000 --log-dir /path/to/heicode/logs # 注意修改路径和端口号 Restart=always RestartSec=5 [Install] WantedBy=multi-user.target