Overview
Discover what makes LibreTranslate powerful
LibreTranslate is a self‑hosted, open‑source machine translation service that exposes a RESTful API and a lightweight web UI. Its core translation engine is powered by **Argos‑Translate**, an efficient, offline‑capable neural machine translation library written in Python. The project bundles the Argos engine with a minimal Flask (or FastAPI) backend, enabling developers to spin up a fully functional translation service on any machine that supports Python 3.8+. The entire stack is container‑friendly, with an official Docker image that can be pulled from GitHub Container Registry and run behind any reverse proxy or load balancer.
Offline‑first
Open‑source licensing
Language support
Webhooks & callbacks
Overview
LibreTranslate is a self‑hosted, open‑source machine translation service that exposes a RESTful API and a lightweight web UI. Its core translation engine is powered by Argos‑Translate, an efficient, offline‑capable neural machine translation library written in Python. The project bundles the Argos engine with a minimal Flask (or FastAPI) backend, enabling developers to spin up a fully functional translation service on any machine that supports Python 3.8+. The entire stack is container‑friendly, with an official Docker image that can be pulled from GitHub Container Registry and run behind any reverse proxy or load balancer.
Key Features
- Offline‑first: All models are downloaded locally; no external API calls or internet dependency after installation.
- Open‑source licensing: AGPL‑3.0 ensures that any derivative work must remain open, which aligns with privacy‑focused or regulatory environments.
- Language support: Over 50 language pairs are available via Argos‑Translate, and additional models can be added by downloading the corresponding
.tar.gzpackage from the Argos model hub. - Webhooks & callbacks: The API supports optional
callbackURLs for asynchronous translation jobs, useful in high‑throughput or batch scenarios. - Rate limiting & authentication: Built‑in support for API keys and per‑IP throttling, which can be extended with custom middleware.
Technical Stack
| Layer | Technology | Rationale |
|---|---|---|
| API | Flask/FastAPI (Python 3.8+) | Lightweight, async support, easy to extend with middleware. |
| Translation Engine | Argos‑Translate (PyTorch backend) | Open‑source NMT, GPU/CPU fallback, minimal dependencies. |
| Containerization | Docker (official image) | Simplifies deployment; supports multi‑arch builds. |
| Data Persistence | Optional SQLite / Redis (for job queues) | Default runs are stateless; persistence can be added for audit logs or caching. |
| CI/CD | GitHub Actions | Automated tests, Docker image build/publish, package release. |
The backend exposes endpoints such as /translate, /languages, and /models. Each request is a JSON payload containing q (text), source, target, and optional flags like format. The service returns a JSON object with the translated text, detected language, and source‑target pair. For file translation, the API accepts multipart uploads, streams them through Argos, and returns a downloadable ZIP.
Deployment & Infrastructure
Running LibreTranslate is straightforward: pull the Docker image, expose port 5000, and optionally mount a volume for persistent models (/app/models). For production, it is recommended to front the service with Nginx or Traefik, enabling TLS termination and HTTP/2. Scaling can be achieved horizontally by running multiple containers behind a load balancer; the stateless nature of the API means no session affinity is required. When GPU acceleration is desired, the Docker image can be built with CUDA support and a compatible NVIDIA driver on the host.
The project’s docker-compose.yml (available in the repo) demonstrates a typical stack: LibreTranslate, Redis for job queuing, and Nginx. Developers can also integrate the service into Kubernetes by creating a Deployment with replicas > 1 and an Ingress resource for secure access.
Integration & Extensibility
LibreTranslate is designed to be a drop‑in replacement for commercial translation APIs. Its OpenAPI spec (auto‑generated from the Flask/FastAPI routes) allows instant generation of SDKs in multiple languages. The plugin system is minimal but extensible: developers can hook into the request/response cycle via middleware to add custom authentication, logging, or caching layers. For advanced use cases, the underlying Argos library can be replaced with another NMT framework (e.g., Marian or OpenNMT) by swapping the import in translate.py and updating the model loading logic.
Webhooks are optional; by providing a callback_url in the request body, LibreTranslate will POST the result to that URL once processing completes. This is ideal for batch translation pipelines or integrating with CI/CD workflows.
Developer Experience
The documentation is well‑structured, with clear sections for API usage, model installation, and deployment. The source code is heavily commented, making it approachable for contributors. Community support comes from the GitHub issues tracker and a dedicated forum where developers discuss model training, performance tuning, and integration patterns. The open‑source nature also means contributors can add new language models or improve the Argos engine without waiting for vendor releases.
Use Cases
- Enterprise Localization: Self‑hosted translation for internal documentation, with full control over data privacy.
- Content Management Systems: Embed the API into CMS plugins to provide real‑time translation of user‑generated content.
- Chatbots & Virtual Assistants: Use the async translation flow to translate user messages on‑the‑fly without external dependencies.
- Educational Platforms: Offer students a privacy‑respectful translation tool for language learning projects.
- Compliance‑heavy Industries: Deploy in airgapped environments where data must never leave the corporate network.
Advantages
- Privacy‑first: All data stays on premises; no third‑party traffic.
- Cost‑effective: No per‑request billing; only the cost
Open SourceReady to get started?
Join the community and start self-hosting LibreTranslate today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Newspipe
Personal web news aggregator with multi‑user support and feed management
Bracket
Manage tournaments effortlessly
Revive Adserver
Open‑source ad serving for publishers and networks
Langfuse
Open-source observability for LLM applications and agents
Red Eclipse 2
Self-hosted other
RSS2EMail
Self-hosted other