LibreTranslate translates text and documents on your own server. Type or paste into its web page, or let scripts and other apps send it text through its API, and nothing you translate ever leaves the house.
On this page
Good to know before you install
Every language costs memory: it idles near 150 MB, but once each pair has been used it holds about 0.6 GB with two languages, 1.1 GB with the default four and 1.8 GB with eight.
At a glance#
- What it is
- Machine Translation AI
- Where it opens
- Web Interface
On its own port at
http://your-server:port, ortranslate.your-domainonce you have a domain - Updates
- Automatic A backup is taken first, and it rolls back if the update fails
- Backups
- Included Part of the daily backup when that's switched on
- Copies
- One per server
- Needs
- memory
What it's good for#
Online translators are handy, but everything you paste into them goes to someone else's servers: letters, messages, work documents. LibreTranslate does the translating on your own machine, using open language models it downloads once. The results are good for getting the gist of something and for everyday text, though not up to a professional translator.
There are two ways to use it. Its web page is a simple two-box translator, with a second tab for translating whole files. Its API lets scripts and other apps ask for translations, which is how it sits behind Mastodon's Translate button, and how it could answer translation searches in SearXNG.
Choosing languages#
The install asks which languages to load, because each one costs memory and a download. The four offered to start with are English, Spanish, French and German, which settles at about 1.1 GB of memory once they've all been used. English and Spanish alone is about 0.6 GB; adding Italian, Portuguese, Dutch and Polish brings it to about 1.8 GB.
On the first start LibreTranslate downloads a model for each pair of languages, roughly 100 MB each, and the install waits for it, showing each download as it goes. On a slow connection that can take several minutes, and LibrePortal gives it up to half an hour before it stops waiting.
To change the list later, edit Languages on the Config tab (for example en,sv for English and Swedish) and press Update Configuration. The codes are the usual two-letter ones, separated by commas, and you need at least two. A new language is downloaded on the next start. A language you take out has its models deleted, so it stops using memory and disk.
Keep English in the list
Most of LibreTranslate's models translate to or from English, and for other pairs it goes through English on the way. Leave en out and some pairs simply won't be there. The install warns you if you do.
Using the web page#
Open it with the Web Interface button. There's no sign-in: anyone who can open the page can translate with it. That's why LibrePortal installs it private, reachable only from your trusted places and your devices on the LibrePortal VPN. Keep it that way unless you mean to run a translator for strangers.
Choose the languages at the top, or let it detect the source language, and type. The files tab takes whole documents, such as text, Word, OpenDocument, PowerPoint, EPUB and HTML files, and gives you back a translated copy in the same format.
With a domain and Traefik, the page is also at translate.<your domain>.
API keys for scripts and other apps#
With Require API Keys on (it is to start with), a script or app is expected to send a key when it uses the API. A key gives each one its own allowance of requests. Keys are made on the app's Tools tab:
- Run Create API Key. Leave Requests per minute empty for 60, or set your own. Characters per request can cap how much text one request may send; empty means no limit.
- Copy the key from the Login Details. Press Welcome on the app's page: the newest key is on the Newest Api Key card, with Show and Copy. The task output names only its first eight characters, because task output is kept in the task log, which is no place for a working key.
- Give it to the script or app that needs it.
The card only ever holds the most recent key, so copy each one before you make the next. List API Keys shows every key by its first eight characters, with its limit, which is enough to tell them apart. Delete API Key takes that start and stops the key working within half a minute; anything still using it can no longer translate. Deleting the newest key takes it off the card too.
A key goes in the body of the request. From a terminal on your network it looks like this, with your own server address, port and key:
curl -s http://192.168.1.50:5210/translate \
-H 'Content-Type: application/json' \
-d '{"q": "Where is the station?", "source": "en", "target": "fr", "api_key": "YOUR-KEY"}'
The answer is a little JSON with translatedText in it. Use "source": "auto" to let it work out the language itself. The same API has /languages, which lists the languages you've loaded, and /detect.
A key is an allowance, not a lock
The web page doesn't need a key, and LibreTranslate recognises it by the Origin header browsers send. A script can send that header too, so a key is a way to give each app its own allowance and to cut one off, not a lock. What actually keeps strangers out is the app being private.
Browser extensions and desktop apps that let you choose a LibreTranslate server can use yours in the same way: give them the address you open it at and, if they ask, a key.
Works with#
LibreTranslate's Works with list shows Mastodon and SearXNG, and whether each one is using this server yet. LibrePortal doesn't connect either for you.
Mastodon has settings for it. On Mastodon's Config tab, set Translation Server to http://libretranslate-service:5000 and Translation API Key to a key from Create API Key, then press Update Configuration. Posts in other languages then get a Translate button. The Mastodon page has the details.
SearXNG can use LibreTranslate for searches like en-fr hello, but there's no setting for it in LibrePortal yet.
To check: document how to point SearXNG's libretranslate engine at LibreTranslate through LibrePortal once there is a supported way that doesn't mean hand-editing its settings.yml
Good to know#
- Memory grows as you use it. It starts near 150 MB and loads each language pair the first time someone translates with it, up to the figures above. Workers (under Advanced) lets it handle more requests at once, but each worker holds its own copy of the models, so memory goes up with it. Leave it at 1 for a household.
- Backups skip the models. They're a download, not your data, so backups keep only the API keys and LibreTranslate fetches the models again after a restore.
- Keys made with 0.4.6 or earlier were printed in full in the task output. If that matters to you, delete them with Delete API Key and make new ones, which go to the card instead.
- Updates are automatic, with a backup first.
- One per server.
What the install asks#
When you install LibreTranslate, LibrePortal asks for a little more than usual before it starts:
- Languages. Each language adds memory once people translate into or out of it. Any other set, such as en,sv, can be typed under Settings later.
Addresses and ports#
LibreTranslate has one port. LibrePortal picks a free port number for each when you install, so yours will differ from anyone else's. The Config tab's Network section shows them, and the app's Open button uses the right one.
| What it is | Who can reach it | With a domain |
|---|---|---|
| Web Interface | Trusted places only | translate.your-domain |
Settings#
These are LibreTranslate's own settings on its Config tab. The settings every app shares, like backups, updates and where its data lives, are explained in App pages and settings.
| Setting | What it does | Starts as |
|---|---|---|
| Languages | Codes to load, like en,es,fr,de. Each one costs memory. | en,es,fr,de |
| Require API Keys | Scripts and other apps need a key; the web page does not. | On |
| Workers Advanced | Requests handled at once. Each holds its own models. | 1 |
In its config file#
A few more aren't on the Config tab yet. They live in the app's config file, described here so you know they exist. How to change them.
| Setting | What it does | Starts as |
|---|---|---|
NameCFG_LIBRETRANSLATE_DISPLAY_NAME |
What this app is called on your dashboards. Leave empty to use its usual name | Empty |
Show on the LibrePortal DashboardCFG_LIBRETRANSLATE_SHOW_ON_DASHBOARD |
Whether this app gets a shortcut on the front page of the LibrePortal WebUI, separate from any Dashy dashboard Choices: true, false |
true |
Detailed logsCFG_LIBRETRANSLATE_VERBOSE_LOGS |
Whether LibreTranslate writes its normal, chattier logs, including who connected, instead of only warnings and errors. Choices: true, false |
false |
Debug logging for 24 hoursCFG_LIBRETRANSLATE_DEBUG_LOGS |
Turn on to see everything LibreTranslate is doing while you look for a problem; it turns itself off after 24 hours. Choices: true, false |
false |
Tools#
LibreTranslate's Tools tab has 3 buttons for jobs you'd otherwise need a terminal for. Each one runs as a task, so you can watch it on the Tasks page and read what it did. More about Tools.
Make a key for a script or another app (Mastodon, SearXNG) to use the translation API. Shown once.
Every key and its request limit, shown by the start of the key only.
Stop a key working. Whatever uses it can no longer reach the API.
Works with#
These are the other apps LibreTranslate knows how to work with. Once it's installed, its page shows the same list with whether each one is connected. How this works.
- Translate button: Powers Mastodon's Translate button on posts. LibrePortal sets this up by itself when both are installed.
- Translation results: Could answer translation searches in SearXNG, such as en-fr hello. There's nothing to switch on; LibrePortal shows whether it can work and lets you check.
- Grafana: Shows dashboards for the apps that have one. works with every app
- Prometheus: Collects metrics from the apps that can export them. works with every app
- Uptime Kuma: Watches your apps and shows when one goes down. works with every app
Privacy and security#
All clear LibreTranslate translates on your server and sends your text nowhere. It downloads language packs from the internet when it first sets up.
What leaves this server#
- Language packs are downloaded once per language from the Argos Translate package index
What LibrePortal turns off#
Nothing needed switching off.
Licence: AGPL-3.0. Audited: 21 October 2026. See the privacy of every app and the Promise.
Sources#
Under the hood#
- It runs this image:
libretranslate/libretranslate:v1.9.6@sha256:1de2d7056bb8ad607a412f4563d9abe324ff632b43b5be9428bcc8e213aebb32. - It can sit behind Authelia's sign-in once Authelia is installed.
- Its own project and documentation: github.com/LibreTranslate/LibreTranslate
Ports, settings, tools and connections on this page are read from LibrePortal v0.10.97's app catalogue each time the guide is built.