1. How to start Chatterbox TTS server automatically on boot (systemd service)
The most reliable and clean way on Linux Mint / Ubuntu-based systems is to create a systemd user service (no need for root privileges if you run it as your own user).
Step-by-step
- Make sure the following works when you run it manually:Bash
cd ~/Chatterbox-TTS-Server source venv/bin/activate export HSA_OVERRIDE_GFX_VERSION=11.0.0 export HIP_VISIBLE_DEVICES=0 python server.py - Create user systemd service fileBash
mkdir -p ~/.config/systemd/user nano ~/.config/systemd/user/chatterbox-tts.servicePaste this content (adjust paths if needed):
ini
[Unit] Description=Chatterbox TTS Server After=network.target [Service] Type=simple WorkingDirectory=/home/rob-roy/Chatterbox-TTS-Server Environment="HSA_OVERRIDE_GFX_VERSION=11.0.0" Environment="HIP_VISIBLE_DEVICES=0" ExecStart=/home/rob-roy/Chatterbox-TTS-Server/venv/bin/python server.py Restart=always RestartSec=10 [Install] WantedBy=default.targetSave and exit.
- Enable and start the serviceBash
# Reload systemd user daemon systemctl --user daemon-reload # Enable so it starts on login/boot systemctl --user enable chatterbox-tts.service # Start it now systemctl --user start chatterbox-tts.service # Check status systemctl --user status chatterbox-tts.service - Check logs when something goes wrongBash
journalctl --user -u chatterbox-tts.service -f
Now the server should start automatically when you log in (and survive crashes/reboots as long as the user session is active).
If you want it to start even without login (system service), it requires a bit more work (system user, WorkingDirectory permissions, etc.). Part 2 is coming soon.
0 Comments