LibreTranslate logo

LibreTranslate

Free and open source machine translation API, self-hosted and offline capable

Alternative to: google translate, deepl, microsoft translator


LibreTranslate is a free and open source machine translation API that runs entirely self-hosted, with no reliance on proprietary services like Google or Azure. Translations are powered by the open source Argos Translate library, so text never has to leave your server. It ships with both a web UI and a JSON API, offering a privacy-respecting alternative to cloud translation services.

LibreTranslate Docker Compose example

Self-host LibreTranslate on your own server, homelab, or VPS starting from this Docker Compose example. It runs LibreTranslate in Docker containers using the official libretranslate/libretranslate:latest image, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  libretranslate:
    image: libretranslate/libretranslate:latest
    restart: unless-stopped
    environment:
      # Comma-separated language codes to load (e.g. "en,fr,es"). Empty loads every
      # bundled language — faster startup and lower memory when narrowed down.
      LT_LOAD_ONLY: ""
      # Disable the built-in web translator UI and serve the JSON API only.
      LT_DISABLE_WEB_UI: "false"
    healthcheck:
      test: ["CMD-SHELL", "./venv/bin/python scripts/healthcheck.py"]
      interval: 10s
      timeout: 4s
      retries: 4
      start_period: 5s

Prefer a managed setup? WinterFlow installs, configures, and updates LibreTranslate for you using this same Docker Compose configuration.