How to run LT on Ubuntu 22 as service

I want to use LT internally on my Ubuntu 22 server, so I don`t want to expose it to internet. So, I don’t need any integration with my NGINX server or so. I installed LT as described in READ.ME

pip install libretranslate

Now, I can run it from the command line, where I get message

Running on

which is great. But I need LT to run as a service automatically when the system starts up. Is there a way, how to do it?

You could probably follow this guide to setup a systemd service for LT:

I have a script for configuring LibreTranslate for SystemD here:

If you want LibreTranslate to only be available on your local PC you can configure your firewall to block port 5000.

1 Like