# Web server for printing from the site (see README "Printing from the website"). # # Install as a user unit on the machine the printer is cabled to: # cp deploy/receipt-web.service ~/.config/systemd/user/ # systemctl --user daemon-reload && systemctl --user enable --now receipt-web # sudo loginctl enable-linger "$USER" # start at boot, without logging in # # ~/.config/receipt-web.env holds RECEIPT_WEB_TOKEN= (chmod 600); the # site's nginx sends the same value. RECEIPT_WEB_LISTEN overrides the default # bind address (this machine's Tailscale IP). [Unit] Description=Receipt printer web server After=network-online.target Wants=network-online.target [Service] EnvironmentFile=%h/.config/receipt-web.env ExecStart=%h/Coding/receipt_maker/.venv/bin/python %h/Coding/receipt_maker/receipt.py serve # Binding fails until Tailscale has brought its address up; just retry. Restart=always RestartSec=5 [Install] WantedBy=default.target