Configuration
Each setting comes from a flag, then the environment, then the file libretranslate mcp config saved, then the
default.
| Variable | What for | Default |
|---|---|---|
LIBRETRANSLATE_URL | The instance URL | http://localhost:5000 |
LIBRETRANSLATE_API_KEY | The API key, for instances that issue keys | none |
PORT | The HTTP port | 3768 |
LIBRETRANSLATE_CONFIG | Where the saved configuration lives (also --config) | see below |
LIBRETRANSLATE_MCP_URL | For the CLI: a running libretranslate-mcp to use (--url) | in-process server |
A self-hosted instance usually needs no key. A hosted one, such as libretranslate.com, does: without it every
translation answers 400. libretranslate status tells which.
Where it is saved
~/.config/libretranslate/.envon Linux;~/Library/Application Support/libretranslate/.envon macOS;%APPDATA%\libretranslate\.envon Windows;- or wherever
LIBRETRANSLATE_CONFIG/--configpoints.
The file is written with mode 0600 (on Windows the folder's ACL protects it).
The API key never shows up in errors, logs, --help or the configuration form.