LibreTranslate

stack Tools / AI

Machine translation server with a page for translating text and documents, plus a JSON API for other apps to call. Runs its own models, so nothing you translate leaves the box.

Install LibreTranslate

It isn't in the main Portainer Templates list yet, so use this one. Portainer takes one URL at a time, so it swaps out whatever list you had before.

In Portainer, head to Settings --> App Templates, paste this in as the URL and save.

https://raw.githubusercontent.com/NotAFlightRisk/portainer-templates-extras/main/templates.json
  1. Open App Templates and pick LibreTranslate.
  2. The form works as it comes, so change only what you want to.
  3. Hit Deploy the stack, then open http://<your-server>:5100 in a browser.

Before you start

Open http://<your-host>:5100 (or whichever port you picked). The first start downloads models for the languages you listed, about 900 MB for the default four, so give it a minute or two before the page answers. There are no accounts, so anyone who can reach it can use it and its API (reference at /docs). Keep it on your LAN, or see the docs for API keys and rate limits. To add languages later, change the list and update the stack, and the new ones download on the next start. Each start also checks for model updates. The models live in the libretranslate-models volume. Codes: supported languages. Docs: docs.libretranslate.com

Settings

What the Portainer form asks for. With compose they go in the .env file instead.

VariableWhat it's forDefault
LIBRETRANSLATE_LANGUAGESLanguages Two-letter codes, comma separated, like en,es,fr,de,it,ja. Each one is a couple of hundred MB of models to download. en,es,fr,de
LIBRETRANSLATE_PORTHost port for the web UI 5100

Services

The containers this stack runs, with ports as they come out of the box.

ServiceImagePorts
libretranslatelibretranslate/libretranslate:latest5100:5000

More apps