Skip to content

How-ToGPU

How to Translate Text Offline on Your PC with LibreTranslate

How to run LibreTranslate, a free and open-source translation service, on your own PC: install it with pip, load only the languages you need, translate in the browser or through its API, keep it local and add optional CUDA acceleration.

By , Systems & Technical Editor

3 min read

How to Translate Text Offline on Your PC with LibreTranslate

Online translators are convenient, but your text is processed on someone else's servers. LibreTranslate is a free and open-source machine translation service you can run on your own PC instead. Its translation engine is powered by the open-source Argos Translate library rather than Google or Azure, and the project describes it as self-hosted and offline capable. This guide follows LibreTranslate's official installation documentation.

What you need

  • A Windows, macOS or Linux PC.

  • Python 3.8 or newer, which LibreTranslate's docs list as the requirement for the Python install. On Windows, you can install Python with winget; see our winget guide.

  • An internet connection during setup, to install LibreTranslate and its language support.

  • Optional: an NVIDIA GPU with Docker, if you want to try GPU acceleration (see below).

Step 1: install LibreTranslate

Open a terminal (PowerShell or Windows Terminal on Windows) and run:

pip install libretranslate

Step 2: start the server

Run:

libretranslate

By default, LibreTranslate installs support for all available languages, which takes time and disk space. To load only the languages you need and reduce startup time, use the --load-only argument with language codes. For English, French and Spanish:

libretranslate --load-only en,fr,es

Step 3: translate in your browser

Once the server is running, open http://localhost:5000 in a web browser. That opens LibreTranslate's web interface. LibreTranslate's API reference also lists a /translate_file endpoint for translating files.

Step 4: use the API from scripts and apps

LibreTranslate is built as an API, so other tools can use it. The project's quickstart shows a request like this, which translates "Hello" from English to Spanish:

curl -X POST http://localhost:5000/translate -d q="Hello" -d source=en -d target=es

The API reference also lists /detect for detecting a language and /languages for listing the languages your server supports.

Keep it on your own PC

By default, LibreTranslate binds to 127.0.0.1 on port 5000, so only your own PC can reach it. You can change these with the --host and --port arguments. Only open it to other devices if you understand the security implications, and look at LibreTranslate's API key options first.

GPU acceleration

LibreTranslate's docs say you can use hardware acceleration on a machine with CUDA 12.4.1 and nvidia-docker installed, using its CUDA Docker Compose file:

docker compose -f docker-compose.cuda.yml up -d --build

That's run from a copy of the LibreTranslate repository. The standard Python install doesn't need a GPU.

Docker and production use

The docs also offer a Docker setup: clone the repository, then run run.bat on Windows or ./run.sh on Linux and macOS. LibreTranslate recommends running it with Gunicorn or Docker in production to avoid memory leaks, which is worth doing if you leave it running all the time.

How it compares with other local AI tools

LibreTranslate is a dedicated translation engine rather than a chatbot. If you want subtitles for live audio, Windows 11 has its own feature; see how to use Live Captions and translation. For a wider look at what you can run on your own PC, see our best free local AI apps and our local AI vs cloud AI comparison.

Our verdict

LibreTranslate is a simple way to keep translation on your own PC: install it with pip, start it with --load-only to limit the languages, and use the browser page at localhost:5000 or the API. It's free and open source, needs no GPU, and stays local by default. Check the results on your own text, especially for anything important, because we haven't tested its accuracy.

The bottom line

LibreTranslate is a simple way to keep translation on your own PC: install it with pip, start it with `--load-only` to limit the languages, and use the browser page at localhost:5000 or the API. It's free and open source, needs no GPU, and stays local by default. Check the results on your own text, especially for anything important, because we haven't tested its accuracy.

Sources

  1. 01LibreTranslate, Documentation and quickstart
  2. 02LibreTranslate, Installation guide
  3. 03LibreTranslate, GitHub repository

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Fix a Mouse That Double-Clicks When You Click Once

How-To

How to Fix a Mouse That Double-Clicks When You Click Once

How to fix a mouse that double-clicks when you click once: check Windows' click and double-click speed settings, test in other apps, change USB port, clean the button and test on another PC, plus what to do if the mouse is faulty.

Marcus Thorne3 min

How to Use the Windows Backup App in Windows 11

How-To

How to Use the Windows Backup App in Windows 11

How to use the Windows Backup app in Windows 11 to save your folders to OneDrive and your apps, settings and Wi-Fi details to your Microsoft account, restore them on a new PC, change what's backed up and understand its limits.

Marcus Thorne3 min

How to Remove or Turn Off Copilot in Windows 11

How-To

How to Remove or Turn Off Copilot in Windows 11

How to remove or turn off Microsoft Copilot in Windows 11: uninstall the Copilot app in Settings or with PowerShell, change what the Copilot key does, and the AppLocker option Microsoft recommends for IT admins.

Marcus Thorne3 min