LibreTranslate: A Self-Hosted Machine Translation API

LibreTranslate: A Self-Hosted Machine Translation API

LibreTranslate is a machine translation service you run yourself: a web page for translating text and files, and an HTTP API that other apps can call. It uses open source Argos Translate models and works completely offline once the models are downloaded.

Why self-host translation

Commercial translation APIs see every sentence you send them, and charge per character. LibreTranslate keeps text on your server, costs nothing per request, and works without internet access. That matters for private documents, for internal tools, and for apps that need translation without a paid API key.

Several self-hosted apps can use it as their translation backend, including forums and chat platforms, and browser extensions can point at your instance.

Features

  • Translation between dozens of languages, with automatic language detection
  • File translation for common document formats
  • A REST API with optional API keys and rate limits
  • A simple web interface
  • CUDA support for GPU acceleration

Deployment

docker run -d -p 127.0.0.1:5000:5000 libretranslate/libretranslate

The first start downloads the language models, which takes a while and several gigabytes of disk. You can limit which languages load to save memory and startup time; check the documentation for the --load-only option. A CUDA image and Kubernetes manifests are also provided.

Quality expectations

LibreTranslate’s models are smaller than the large commercial systems. Translations are generally good for understanding a text and fine for many practical uses, but less polished for nuanced or literary writing, and quality varies by language pair. For higher quality on capable hardware, large language models running locally through Ollama are an alternative, at a much higher compute cost per request.

License

AGPL-3.0.