
Self-hosting LibreTranslate the easy way
Yulei ChenLibreTranslate 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.
- Click the deploy button above
- Select a project
- Select a server (If you just signed up you get a 48-hour free trial server)
- Click Deploy!
About the preset
The one-click deploy above uses Sliplane's LibreTranslate preset. Here's what it includes:
- Official
libretranslate/libretranslateDocker 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:
| Setting | Example |
|---|---|
LT_LOAD_ONLY | en,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:
| Variable | Default | Description |
|---|---|---|
LT_LOAD_ONLY | en,es,fr,de,ja | Comma-separated list of languages to load |
LT_UPDATE_MODELS | true | Download/update language models on startup |
LT_SUGGESTIONS | false | Enable translation suggestions |
LT_DISABLE_WEB_UI | false | Disable the web interface (API only) |
LT_API_KEYS | false | Require API keys for requests |
LT_CHAR_LIMIT | none | Max 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:
| Provider | vCPU | RAM | Disk | Monthly Cost | Note |
|---|---|---|---|---|---|
| Sliplane | 2 | 2 GB | 40 GB | €9 (~$10.65) | Flat rate, 1 TB bandwidth, SSL included |
| Fly.io | 2 | 2 GB | 40 GB | ~$18 | Disk and bandwidth billed separately |
| Render | 1 | 2 GB | 40 GB | ~$35 | 100 GB bandwidth, Disk billed separately |
| Railway | 2 | 2 GB | 40 GB | ~$67 + $20 plan | Pro 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-2x2 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.