[Unit] Description=Translation server and API for Apertium Documentation=https://wiki.apertium.org/wiki/Apertium-apy After=network.target [Service] # Change this to your username and edit to how you start apy: User=apertium WorkingDirectory=/usr/share/apertium-apy/tools ExecStart=/usr/bin/python3 servlet.py --fasttext-model /usr/share/apertium-apy/lid.release.ftz /usr/share/apertium/modes Environment=LC_ALL=C.UTF-8 # By default, if it restarts >10 times within 5 secs, it marks it as failed and gives up: Restart=always # Restart the service if it doesn't do a watchdog ping within 10 seconds: WatchdogSec=10s # No reason to have access to shared tmp files: PrivateTmp=yes [Install] WantedBy=multi-user.target