Self-Host LibreTranslate: Replace Google Translate and DeepL for Free

Set up your own private translation server in minutes. Keep your text off corporate servers while getting quality translations in 50+ languages.

Every text you paste into Google Translate or DeepL goes through their servers. Google retains that data and uses it to train their models. DeepL’s free tier does the same. If you’re translating contracts, medical documents, or business communications, you’re handing sensitive information to companies with their own agendas.

LibreTranslate runs entirely on your hardware. Your text never leaves your network. It takes about five minutes to set up, and it’s completely free.

What You Need

  • A computer with at least 4GB RAM (8GB recommended for multiple languages)
  • Docker installed, or Python 3.8+
  • About 2GB disk space per language pair

LibreTranslate supports 50+ languages including Arabic, Chinese, French, German, Hindi, Japanese, Korean, Portuguese, Russian, Spanish, and many more.

The Quick Way: Docker

One command gets you running:

docker run -ti --rm -p 5000:5000 libretranslate/libretranslate

Open http://localhost:5000 in your browser. You now have a private translation server.

The first run downloads language models, which takes a few minutes depending on your connection. Subsequent starts are instant.

Keep It Running in Background

For a persistent server:

docker run -d --name libretranslate -p 5000:5000 --restart unless-stopped libretranslate/libretranslate

Load Only Languages You Need

Loading all 50+ languages eats RAM. If you only need a few:

docker run -d --name libretranslate -p 5000:5000 \
  -e LT_LOAD_ONLY=en,es,fr,de \
  libretranslate/libretranslate

This dramatically reduces memory usage. Each language pair takes roughly 200-500MB.

GPU Acceleration

If you have an NVIDIA GPU and want faster translations:

git clone https://github.com/LibreTranslate/LibreTranslate.git
cd LibreTranslate
docker compose -f docker-compose.cuda.yml up -d --build

Without Docker: Python Install

If you prefer pip:

pip install libretranslate
libretranslate --load-only en,es,fr

The server starts at http://localhost:5000.

For production use, run with Gunicorn:

pip install gunicorn
gunicorn --bind 0.0.0.0:5000 'wsgi:app()'

Using It

Web Interface

The web interface at http://localhost:5000 works like Google Translate. Type or paste text, select languages, get translations. Simple.

API Access

LibreTranslate exposes a REST API that’s easy to integrate:

curl -X POST http://localhost:5000/translate \
  -d "q=Hello, how are you?" \
  -d "source=en" \
  -d "target=es"

Response:

{"translatedText": "Hola, ¿cómo estás?"}

Browser Extension Integration

Several browser extensions support custom translation backends. Configure them to use http://localhost:5000/translate as the endpoint.

Practical Configuration

Set Character Limits

Prevent abuse if you’re exposing the server to others:

docker run -d --name libretranslate -p 5000:5000 \
  -e LT_CHAR_LIMIT=5000 \
  -e LT_REQ_LIMIT=100 \
  libretranslate/libretranslate

This limits translations to 5,000 characters and 100 requests per minute per IP.

API Keys

For shared deployments, enable API key authentication:

docker run -d --name libretranslate -p 5000:5000 \
  -e LT_API_KEYS=true \
  libretranslate/libretranslate

Generate keys through the admin interface or API.

Offline Mode

To run completely offline, pre-download all models during the Docker build:

docker build -t libretranslate-offline \
  --build-arg with_models=true .

Now the container works without any internet connection.

Translation Quality

LibreTranslate uses Argos Translate, an open-source neural machine translation library. Quality varies by language pair:

Strong pairs (European languages to/from English): Quality approaches Google Translate for most content. Technical and formal text translates well.

Weaker pairs (less common languages, non-English pairs): May require more editing. LibreTranslate can pivot through intermediate languages when direct translation isn’t available.

For professional documents, LibreTranslate gives you a solid first draft that keeps your text private. Run it, edit as needed, and never worry about who’s reading your contracts.

LTEngine: LLM-Powered Alternative

The LibreTranslate team recently released LTEngine, which uses local LLMs (Gemma 3) for translation. It’s slower but produces higher-quality output:

ModelRAM Required
gemma3-1b1GB
gemma3-4b4GB
gemma3-12b8GB
gemma3-27b16GB

If you have the hardware and prioritize quality over speed, LTEngine is worth exploring.

Privacy Comparison

ServiceText Stored?Used for Training?Self-Hosted?
Google Translate (free)YesYesNo
DeepL (free)TemporarilyYesNo
DeepL ProNoNoNo
LibreTranslateNoNoYes

DeepL Pro costs 25/month. LibreTranslate costs whatever electricity your server uses.

What This Means

Cloud translation services are convenient but come with a hidden cost: your data. Google’s privacy policy explicitly states they use content from services like Translate to improve their AI models. DeepL does the same for free users.

For personal use, this might not matter. For business, legal, or medical documents, it’s a significant risk. A single mistranslated confidentiality clause pasted into Google Translate could constitute a data breach under GDPR.

What You Can Do

  1. Run LibreTranslate locally for any sensitive translations
  2. Set it up on a home server or NAS for household access
  3. Deploy on a VPS if you need remote access (just add authentication)
  4. Integrate with existing tools using the API

The setup takes five minutes. The privacy protection lasts forever.

Translation is one of those daily tasks where cloud services feel indispensable until you realize they’re not. LibreTranslate proves you can have convenience without compromise.