Self-hosting LibreTranslate the easy way

Self-hosting LibreTranslate the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
6 min

LibreTranslate is a free, open-source machine translation API. Unlike Google Translate or DeepL, it runs entirely on your own infrastructure - no API keys, no rate limits, no data leaving your servers. It supports dozens of languages and offers both a web UI and a REST API you can integrate into any app.

Sliplane makes self-hosting LibreTranslate dead simple. With a one-click preset, you get a running instance in minutes - no Docker setup, no reverse proxy config, no server maintenance.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy LibreTranslate >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's LibreTranslate preset. Here's what it includes:

  • Official libretranslate/libretranslate Docker image (v1.9.5)
  • 5 languages preloaded: English, Spanish, French, German, and Japanese
  • Auto-update models enabled so language packs stay current on restart
  • Persistent storage for both the API key database (/app/db) and downloaded language models (/home/libretranslate/.local)

The first startup takes a few minutes because LibreTranslate downloads the language models. After that, restarts are much faster since models are stored in persistent volumes.

Next steps

Once LibreTranslate is running, access it via the domain Sliplane assigned (e.g. libretranslate-xxxx.sliplane.app). The web UI lets you translate text right in the browser, and the API is available at the same URL.

Using the API

LibreTranslate exposes a REST API you can call from any language. Here's a quick example:

curl -X POST "https://libretranslate-xxxx.sliplane.app/translate" \
  -H "Content-Type: application/json" \
  -d '{"q": "Hello world", "source": "en", "target": "de"}'

Check the full API docs at /docs on your instance.

Customizing languages

By default, the preset loads English, Spanish, French, German, and Japanese. You can change this by editing the LT_LOAD_ONLY environment variable in your service settings. Use comma-separated language codes:

SettingExample
LT_LOAD_ONLYen,es,fr,de,ja,it,pt,zh

Loading more languages uses more RAM and disk space. If you need many languages, consider upgrading to a larger server.

Environment variables

Here are the most useful environment variables you can customize:

VariableDefaultDescription
LT_LOAD_ONLYen,es,fr,de,jaComma-separated list of languages to load
LT_UPDATE_MODELStrueDownload/update language models on startup
LT_SUGGESTIONSfalseEnable translation suggestions
LT_DISABLE_WEB_UIfalseDisable the web interface (API only)
LT_API_KEYSfalseRequire API keys for requests
LT_CHAR_LIMITnoneMax characters per translation request

Updating LibreTranslate

Change the image tag in your service settings and redeploy. Check Docker Hub for the latest stable version.

Cost comparison

You can also self-host LibreTranslate with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

What can I use LibreTranslate for?

LibreTranslate works great for translating user-generated content, building multilingual apps, localizing documents, or adding translation features to internal tools. Since it's self-hosted, your data never leaves your server, which makes it a solid choice for sensitive or regulated content.

How do I add more languages?

Edit the LT_LOAD_ONLY environment variable in your Sliplane service settings and add the language codes you need (e.g. en,es,fr,de,ja,it,pt,zh,ko,ru). Then redeploy the service. LibreTranslate will download the new language models on startup. Keep in mind that each language adds to the memory and disk usage.

How do I update LibreTranslate?

Go to your service settings on Sliplane, change the image tag to the latest version (e.g. v1.9.5 to a newer release), and redeploy. Check Docker Hub for available tags. Your data and models are stored in persistent volumes, so nothing gets lost during updates.

How do I secure my instance with API keys?

Set the LT_API_KEYS environment variable to true in your service settings. Once enabled, you can manage API keys through the /manage endpoint or using the ltmanage CLI inside the container. This is useful if you want to control who can access your translation API.

Is LibreTranslate as good as Google Translate?

LibreTranslate uses the open-source Argos Translate engine. Translation quality is solid for common language pairs like English to Spanish or French, but may not match commercial APIs for less common pairs. The big advantage is privacy, zero cost per translation, and no rate limits. For many use cases, that tradeoff is worth it.

Self-host LibreTranslate now - It's easy!

Sliplane gives you a private translation API in minutes, no server management needed.