e61a320499
Self-contained HTTP service with engine, data, start script, systemd unit, and documentation. Runs independently of the Discord bot on its fixed port.
49 lines
1.1 KiB
Markdown
49 lines
1.1 KiB
Markdown
# Installing the Morshu TTS Server as a system service
|
|
|
|
These steps install the server as a systemd service that starts on boot and
|
|
restarts automatically if it crashes. Commands that need root are shown with
|
|
`sudo`; run them in your own terminal.
|
|
|
|
## 1. Install prerequisites
|
|
|
|
```bash
|
|
sudo apt install python3 python3-venv
|
|
```
|
|
|
|
## 2. Create the virtual environment
|
|
|
|
The first run of `start.sh` creates a local venv and installs the Python
|
|
dependencies from requirements.txt. You can prime it now:
|
|
|
|
```bash
|
|
cd /home/owen/morshu-tts-server
|
|
./start.sh
|
|
```
|
|
|
|
Stop it with Ctrl+C once you see the ready message, then install the unit.
|
|
|
|
## 3. Install the systemd unit
|
|
|
|
```bash
|
|
sudo cp /home/owen/morshu-tts-server/morshu-tts-server.service /etc/systemd/system/
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl enable --now morshu-tts-server
|
|
```
|
|
|
|
## 4. Verify
|
|
|
|
```bash
|
|
systemctl status morshu-tts-server
|
|
curl -s http://127.0.0.1:33002/health
|
|
```
|
|
|
|
The health endpoint should return `ok`.
|
|
|
|
## Managing the service
|
|
|
|
```bash
|
|
sudo systemctl restart morshu-tts-server
|
|
sudo systemctl stop morshu-tts-server
|
|
journalctl -u morshu-tts-server -f
|
|
```
|