Home > Creating a user systemd unit

Creating a user systemd unit

To setup a systemd user unit for eg. a static website for development

cat  ~/.config/systemd/user/python-www.service

[Unit]
Description=Local Http Server

[Service]
Type=simple
ExecStart=python3 -m http.server -d /home/tujv/www 8000

Then simply:

systemctl --user start python-www

systemctl --user status python-www

systemctl --user start python-www