cheatsheets devlog projects

ttyd-service.md

ttyd Service

2022-11-08 1

My notes on daemonizing ttyd.

This is the ttyd.service file I created. I placed this in /etc/systemd/system/.

[Unit]
Description=ttyd Daemon
After=network.target

[Service]
ExecStart=/usr/bin/ttyd -p 7201 -u 1030 -g 1030 bash
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Then you can use systemctl to manage the service and to start it up. I also enabled it to run on boot.