[{"data":1,"prerenderedAt":190},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-libretranslate-vps-translation-api-ma-en":6,"promo-bar-likely":189},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-libretranslate-vps-translation-api-ma-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":27,"featuredImage":29,"bgImage":30,"posterImage":31,"relatedSolution":32,"intro":35,"keyPoints":36,"sections":37,"ctaTitle":125,"ctaBody":126,"ctaButton":127,"ctaUrl":128,"relatedPosts":129},575,"self-host-libretranslate-vps-translation-api",{"fr":12,"en":10,"ar":13,"es":14},"self-host-libretranslate-vps","استضافة-libretranslate-على-vps","autoalojar-libretranslate-vps-api-traduccion","LibreTranslate on a VPS: Your Private Translation API","Install LibreTranslate on a VPS with Docker Compose: an Arabic, French, English and Spanish translation API, mandatory API keys and HTTPS with nginx.",7,0,false,"2026-11-11T00:00:00+00:00","2026-11-11T11:38:05+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[28],{"id":17,"name":23,"slug":24,"color":25,"icon":26},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-libretranslate-vps-poster.svg",{"categorySlug":33,"appSlug":34},"artificial-intelligence","libretranslate","Translating product pages, notifications or support messages through an online API means sending every text to a third party and paying per character. LibreTranslate does the same job on your own server: an open-source machine translation JSON API built on the offline models of Argos Translate. This guide installs it on a VPS with Docker Compose, loads Arabic, French, English and Spanish, locks the instance with API keys, publishes it over HTTPS behind nginx and calls it from an application.",[],[38,42,52,81,84,100,104,107,110,113,116,119,122],{"type":39,"title":40,"body":41},"h2","What LibreTranslate does","LibreTranslate exposes an HTTP API that receives a text, its source language and a target language, and returns the translation. The models are those of Argos Translate, a neural translation engine that works offline: once downloaded, they run on the VPS's CPU, with no GPU and no call to an external service.\n\nThe project is released under the AGPL-3.0 licence. It also provides a web interface to translate a text or a file by hand, language detection, and API key management with a request limit per key. On a VPS, it is the building block that lets a website, a SaaS or an internal tool speak several languages without depending on a vendor.",{"type":43,"title":44,"items":45},"ul","What LibreTranslate brings",[46,47,48,49,50,51],"**A simple API** — `\u002Ftranslate`, `\u002Fdetect` and `\u002Flanguages`, in JSON, callable from any language.","**Arabic and French** — together with English and Spanish, four languages loaded from the start, in every combination.","**Language detection** — an `auto` source for messages whose language you do not know.","**File translation** — txt, docx, odt, pptx, epub, html, srt and pdf.","**API keys** — one per application, each with its own requests-per-minute limit.","**Confidentiality** — texts stay on your server, and nothing is billed per character.",{"type":53,"title":54,"headers":55,"rows":59},"comparison","LibreTranslate versus online APIs",[5,56,57,58],"LibreTranslate","Google Cloud Translation","DeepL API",[60,65,69,73,77],[61,62,63,64],"Hosting","Your VPS","Google cloud","DeepL cloud",[66,67,68,68],"Where texts go","Stay on the server","Sent to the vendor",[70,71,72,72],"Billing","The VPS only","Per character",[74,75,76,76],"Quality","Fair, review advised","Very good",[78,79,80,80],"Source code","Open (AGPL-3.0)","Closed",{"type":39,"title":82,"body":83},"Prerequisites","An Ubuntu 24.04 VPS with **2 GB of RAM and 2 vCPUs** is enough for four languages and modest traffic; plan 4 GB if several applications translate at the same time. Allow about 750 MB of disk for the models of the four languages, then around a hundred megabytes per added pair.\n\nYou need Docker with the Compose plugin, nginx and certbot on the host, and a name (`traduction.example.com` in this guide) pointing to the VPS's IP.",{"type":85,"title":86,"steps":87},"steps","Install LibreTranslate with Docker Compose",[88,91,94,97],{"title":89,"body":90},"Write the docker-compose.yml file","In a dedicated folder (`\u002Fopt\u002Flibretranslate`), create this file. The port is published on the loopback interface only. `LT_API_KEYS` enables the key database, `LT_UNDER_ATTACK` refuses any request without a valid key, web interface included, and `LT_LOAD_ONLY` limits the download to the four useful languages.\n```yaml\nservices:\n  libretranslate:\n    image: libretranslate\u002Flibretranslate:v1.9.6\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:5000:5000\"\n    environment:\n      LT_API_KEYS: \"true\"\n      LT_UNDER_ATTACK: \"true\"\n      LT_LOAD_ONLY: \"en,fr,ar,es\"\n      LT_THREADS: \"2\"\n    volumes:\n      - lt-db:\u002Fapp\u002Fdb\n      - lt-models:\u002Fhome\u002Flibretranslate\u002F.local\n\nvolumes:\n  lt-db:\n  lt-models:\n```",{"title":92,"body":93},"Start and wait for the models","On first start, LibreTranslate downloads the models before opening the port: follow the logs until the `Listening at` line.\n```bash\ndocker compose up -d\ndocker compose logs -f libretranslate\n```",{"title":95,"body":96},"Create your first key","The key database is created at startup. Add a key limited to 120 requests per minute; the command prints it only once.\n```bash\ndocker compose exec libretranslate .\u002Fvenv\u002Fbin\u002Fltmanage keys add 120\n```",{"title":98,"body":99},"Check that the key is required","The first request, without a key, must be refused; the second returns `translatedText`.\n```bash\ncurl -s http:\u002F\u002F127.0.0.1:5000\u002Ftranslate -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"q\":\"Bonjour\",\"source\":\"fr\",\"target\":\"en\"}'\ncurl -s http:\u002F\u002F127.0.0.1:5000\u002Ftranslate -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"q\":\"Bonjour\",\"source\":\"fr\",\"target\":\"en\",\"api_key\":\"YOUR_KEY\"}'\n```",{"type":101,"title":102,"body":103},"tip","Never publish an instance without keys","Without `LT_API_KEYS` and `LT_UNDER_ATTACK`, LibreTranslate translates for anyone who knows the address. An open instance is quickly found and used by bots: your CPU ends up working for them. Keep the port on `127.0.0.1` and let nginx alone face the Internet.",{"type":39,"title":105,"body":106},"Put LibreTranslate behind nginx over HTTPS","Create a server block in `\u002Fetc\u002Fnginx\u002Fsites-available\u002F` and enable it. `client_max_body_size` sets the maximum size of a file sent for translation: without this line, nginx refuses any upload above 1 MB.\n```nginx\nserver {\n    server_name traduction.example.com;\n    client_max_body_size 20m;\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:5000;\n        proxy_set_header Host $host;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        proxy_read_timeout 300s;\n    }\n}\n```\nThen check the configuration and request the certificate:\n```bash\nsudo nginx -t && sudo systemctl reload nginx\nsudo certbot --nginx -d traduction.example.com\n```",{"type":39,"title":108,"body":109},"Call the API from an application","Every request is a JSON POST with the text (`q`), the source language (`source`, or `auto`), the target language (`target`) and the key (`api_key`).\n```bash\ncurl -s https:\u002F\u002Ftraduction.example.com\u002Ftranslate -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"q\":\"Your order has shipped.\",\"source\":\"fr\",\"target\":\"ar\",\"api_key\":\"YOUR_KEY\"}'\n```\nIn Python, the same request takes a few lines:\n```python\nimport requests\n\nr = requests.post(\n    \"https:\u002F\u002Ftraduction.example.com\u002Ftranslate\",\n    json={\"q\": \"Your invoice is ready.\", \"source\": \"auto\", \"target\": \"es\", \"api_key\": \"YOUR_KEY\"},\n    timeout=30,\n)\nprint(r.json()[\"translatedText\"])\n```\n`\u002Flanguages` lists the available pairs, `\u002Fdetect` returns the language of a text with a confidence score, and `\u002Ftranslate_file` translates a file sent as multipart.",{"type":39,"title":111,"body":112},"Manage API keys and limits","Create one key per application or per customer: you can revoke one without touching the others, and each key carries its own requests-per-minute limit. From the application folder:\n```bash\ndocker compose exec libretranslate .\u002Fvenv\u002Fbin\u002Fltmanage keys\ndocker compose exec libretranslate .\u002Fvenv\u002Fbin\u002Fltmanage keys add 60\ndocker compose exec libretranslate .\u002Fvenv\u002Fbin\u002Fltmanage keys remove \u003Ckey>\n```\nAn unknown key receives `Invalid API key`, a request without a key `Please contact the server operator to get an API key`. In the web interface, the key icon (\"Set API Key\") at the top of the page stores the key in the browser.",{"type":39,"title":114,"body":115},"Tune LibreTranslate for a small VPS","Four environment variables are enough to fit the instance to the size of the server. `LT_THREADS` sets the number of translation processes: each one loads the models in memory, hence the value of 2 on a 2 GB VPS; raise it if you have RAM and several applications translating in parallel. `LT_CHAR_LIMIT` caps the length of a text per request, so that a single call cannot hold a process for minutes. `LT_DISABLE_FILES_TRANSLATION` turns off file translation if you do not use it, and `LT_DISABLE_WEB_UI` removes the web interface to keep only the API.\n\nAfter each change in `docker-compose.yml`, restart with `docker compose up -d`: the container is recreated, and the volumes — so the keys and the models — are kept. Watch memory with `docker stats` during a day of real use before settling these values.",{"type":39,"title":117,"body":118},"What to know about quality","Argos Translate models are much smaller than those of commercial services. Translation stays reliable for understanding a message, sorting tickets, producing a first draft or translating everyday content; it is less dependable on idioms, highly specialised vocabulary and long literary texts.\n\nA simple rule: machine-translate what helps you understand, and have a person review what will be published under your name — sales pages, terms and conditions, marketing emails. Also test your own sentences in both directions before plugging in an application: quality varies from one language pair to another, and English often serves as a pivot between two languages that are not English.",{"type":39,"title":120,"body":121},"Add languages, back up and update","To add a language, append its code (`de`, `it`, `pt`, `tr`…) to `LT_LOAD_ONLY` and restart with `docker compose up -d`: the missing models download at startup.\n\nWhat to back up: the `lt-db` volume only, which holds the key database. The models in `lt-models` download again on their own, and LibreTranslate does not keep translated texts. To update, change the image tag in `docker-compose.yml` after reading the release notes, then:\n```bash\ndocker compose pull\ndocker compose up -d\n```",{"type":39,"title":123,"body":124},"One-click install on ServOrbit","On a ServOrbit VPS, LibreTranslate installs from the Marketplace: the script deploys the official image with Arabic, French, English and Spanish, generates your API key, locks the instance against any request without a key and sets up nginx over HTTPS. The address is a subdomain of one of your domains or the VPS's free subdomain, certificate included, and the key is shown in your client area.","Your translation API on a VPS","A ServOrbit Ubuntu 24.04 VPS with 2 GB of RAM is enough for LibreTranslate. One-click install from the Marketplace, HTTPS on your domain or on the VPS's free subdomain, API key generated for you.","Install LibreTranslate","\u002Fapplications\u002Fartificial-intelligence\u002Flibretranslate",[130,154,172],{"id":131,"slug":132,"slugs":133,"title":137,"excerpt":138,"readTime":139,"views":140,"isPinned":19,"noindex":19,"publishedAt":141,"updatedAt":142,"category":143,"categories":149,"featuredImage":29,"bgImage":30,"posterImage":151,"relatedSolution":152},11,"how-to-host-ollama-on-a-vps",{"fr":134,"en":132,"ar":135,"es":136},"heberger-ollama-vps","كيفية-استضافة-ollama-على-خادم-vps","como-alojar-ollama-en-un-vps","Hosting Ollama on a VPS: advanced operational guide","Advanced Ollama VPS setup: model management, nginx reverse proxy, API security, Q4_K_M\u002FQ8 quantization, CVE-2026-45672 Open WebUI and secure coupling.",9,3,"2026-06-09T00:00:00+00:00","2026-11-04T16:30:24+00:00",{"id":144,"name":145,"slug":146,"color":147,"icon":148},1,"Artificial Intelligence","intelligence-artificielle","bg-purple-500\u002F10 text-purple-400","ia",[150],{"id":144,"name":145,"slug":146,"color":147,"icon":148},"\u002Fblog\u002Fcovers\u002Fheberger-ollama-vps-poster.svg",{"categorySlug":33,"appSlug":153},"ollama",{"id":155,"slug":156,"slugs":157,"title":161,"excerpt":162,"readTime":163,"views":164,"isPinned":19,"noindex":19,"publishedAt":165,"updatedAt":142,"category":166,"categories":167,"featuredImage":29,"bgImage":30,"posterImage":169,"relatedSolution":170},21,"how-to-host-whisper-on-a-vps",{"fr":158,"en":156,"ar":159,"es":160},"heberger-whisper-vps","كيفية-استضافة-whisper-على-خادم-vps","como-alojar-whisper-en-un-vps","Whisper on premise on a VPS: complete 2026 guide","Deploy Whisper on premise on your VPS with Docker: model selection, CPU-only Whisper.cpp, n8n integration, benchmarks and security.",6,2,"2026-05-30T00:00:00+00:00",{"id":144,"name":145,"slug":146,"color":147,"icon":148},[168],{"id":144,"name":145,"slug":146,"color":147,"icon":148},"\u002Fblog\u002Fcovers\u002Fheberger-whisper-vps-poster.svg",{"categorySlug":33,"appSlug":171},"whisper",{"id":173,"slug":174,"slugs":175,"title":179,"excerpt":180,"readTime":139,"views":140,"isPinned":19,"noindex":19,"publishedAt":181,"updatedAt":182,"category":183,"categories":184,"featuredImage":29,"bgImage":30,"posterImage":186,"relatedSolution":187},156,"self-host-litellm-on-a-vps-your-private-llm-api-gateway",{"fr":176,"en":174,"ar":177,"es":178},"self-host-litellm-vps","استضف-litellm-ذاتيا-على-vps-بوابة-api-خاصة-لنماذج-llm","alojar-litellm-en-un-vps-pasarela-llm-privada","Self-Host LiteLLM on a VPS: Your Private LLM API Gateway","Deploy LiteLLM on a ServOrbit VPS — a self-hosted, OpenAI-compatible gateway to Ollama, Anthropic, Azure and 100+ LLM providers, with spend tracking and rate limits.","2026-01-21T00:00:00+00:00","2026-11-09T20:55:12+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},[185],{"id":17,"name":23,"slug":24,"color":25,"icon":26},"\u002Fblog\u002Fcovers\u002Fself-host-litellm-vps-poster.svg",{"categorySlug":33,"appSlug":188},"litellm",true,1794785350828]