
Deploy LanguageTool: Self-Hosted Grammar & Spell Check API
Check grammar, spelling and style in 30+ languages over a private API.
LanguageTool
Just deployed
Deploy and Host LanguageTool on Railway

LanguageTool is an open source grammar, spelling and style checker that supports more than 30 languages, including English, German, Spanish, French, Dutch, Portuguese and Ukrainian. This template runs the LanguageTool HTTP server on Railway so your apps, editors, CI pipelines and browser extensions can send text to the /v2/check endpoint and get back a list of issues with suggested fixes, without sending documents to a third-party cloud. LanguageTool is LGPL-2.1 licensed with about 15,300 GitHub stars, and this template runs version 6.8 through the widely used erikvl87 Docker image, pinned by digest. Grammarly Pro costs about $12 per month billed yearly or $30 billed monthly per person. LanguageTool on Railway costs about $5–15/month for a private server your whole team can share.
What This Template Deploys
| Service | Purpose |
|---|---|
| LanguageTool | erikvl87/languagetool:6.8, pinned by digest, with a public domain on port 8010. The HTTP API at /v2/check, /v2/languages and related endpoints. |
The service has no database. An optional volume at /ngrams can hold extra n-gram data for better detection of commonly confused words.
About Hosting LanguageTool
Writing tools are everywhere, but most of them send every sentence to a vendor's servers and bill per seat. LanguageTool's open source engine runs on your own server with the same rule-based checks the public service uses, so private documents, support tickets and code comments stay inside your infrastructure.
Grammar and spelling. Thousands of rules catch agreement errors, wrong words, punctuation, capitalization and typos, with suggestions for each match.
Style. Flag wordiness, repeated words, passive voice and other style issues, and turn individual rules on or off per request.
Many languages. Check text in more than 30 languages and variants such as en-US, en-GB, de-DE and pt-BR, or let the server detect the language.
Simple HTTP API. Post text and a language code to /v2/check and read the JSON matches array, with offsets, messages and replacements.
Rate limits. Per-IP request limits and a maximum text length protect the server when it is exposed to the internet.
N-gram data. Optional n-gram files for English, German, Spanish, French and Dutch improve detection of confused words such as their and there.
Deploy LanguageTool in Under 5 Minutes
- Click Deploy on Railway. No inputs are needed.
- Wait about a minute until
GET /v2/languagesreturns HTTP 200 while the language models load. - Test it:
curl -s -d language=en-US --data-urlencode "text=This are a test." https://your-domain/v2/check. - Point your editor plugin, browser extension or app at your Railway URL as a custom LanguageTool server.
- Adjust request limits and memory for your traffic.
Common Use Cases
- Private writing checks: check contracts, medical notes or internal documents without a third-party cloud.
- Docs in CI: fail a build when documentation or release notes contain grammar errors.
- Content platforms: add spell and grammar suggestions to a CMS, forum or support desk.
- Browser and editor plugins: connect LanguageTool extensions and editor add-ons to your own server.
- Multilingual teams: check text in many languages with one service.
- Education tools: give students writing feedback inside a learning app.
- Data cleaning: flag low-quality text before it reaches a search index or training set.
- Support replies: catch mistakes in customer support answers before they are sent.
- Localization review: check translated app strings in each target language.
- Email drafting tools: add grammar suggestions to an internal email or CRM composer.
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | Required | 8010 | Port LanguageTool listens on |
Java_Xms | Optional | 256m | Initial Java heap |
Java_Xmx | Optional | 1g | Maximum Java heap; raise for many languages or heavy traffic |
langtool_requestLimit | Optional | 120 | Checks per client IP per period; 0 is unlimited |
langtool_requestLimitPeriodInSeconds | Optional | 60 | Length of the rate-limit window |
langtool_maxTextLength | Optional | 100000 | Longest text accepted per check |
langtool_maxCheckTimeMillis | Optional | 60000 | Time limit for one check |
langtool_cacheSize | Optional | 1000 | Sentence results kept in memory |
langtool_pipelineCaching | Optional | true | Reuses checking pipelines between requests |
langtool_trustXForwardForHeader | Optional | true | Uses the real client IP for rate limits |
NGRAM_LANGUAGES | Optional | none | N-gram data to download: en, de, es, fr, nl |
Memory. A 1 GB heap handles English and a few other languages well. Raise Java_Xmx to 2g or more and give the service matching memory if you check many languages or long texts.
N-gram data. Add a volume at /ngrams, then set NGRAM_LANGUAGES, such as en,de. The start command downloads each set once; English alone is several gigabytes, so size the volume accordingly.
Access control. The API has no login. Per-IP limits stop casual abuse, but for a private server keep the URL unpublished, put an authenticating proxy in front, or remove the public domain and call it over Railway's private network.
Editor plugins. Many LanguageTool add-ons have an advanced setting for a custom server URL; enter your Railway domain there.
Rule control. Every match includes a rule ID. Pass disabledRules or enabledRules with a request to silence noisy rules or turn on optional ones, and use disabledCategories to drop whole groups such as typography.
Language detection. Send language=auto and LanguageTool picks the language for you, or add preferredVariants such as en-GB to steer the choice.
Personal words. Product names and jargon can trigger spelling matches. Keep a list in your client and filter those matches, or disable the spelling rule for specific requests.
Throughput. Most checks of a paragraph finish in well under a second. For batch jobs, send texts in parallel and raise langtool_requestLimit for the caller's IP, or call the service over Railway's private network, where the limits apply per internal client.
Health checks. GET /v2/languages returns the supported languages and is a cheap way to confirm the server is ready.
Client libraries. Community clients exist for Python, JavaScript, Java and other languages, and any HTTP client works because the API is plain form posts returning JSON.
Start-up time. Each restart reloads the language models, which takes about a minute, so plan redeploys outside busy periods.
LanguageTool vs. Alternatives
| Feature | LanguageTool on Railway | Grammarly Pro | LanguageTool Premium | Harper |
|---|---|---|---|---|
| Hosting | Self-hosted | Hosted SaaS | Hosted SaaS | Runs locally |
| License | LGPL-2.1 | Proprietary | Proprietary service | Apache-2.0 |
| HTTP API | ✅ | ❌ | ✅ | ❌ |
| Languages | 30+ | English | 30+ | English |
| Text stays on your server | ✅ | ❌ | ❌ | ✅ |
| AI rewriting | ❌ | ✅ | ✅ | ❌ |
| Price | About $5–15/month for the team | About $12–30/user/month | Subscription | Free |
Grammarly and LanguageTool Premium add AI rewriting and extra premium rules. Harper is a fast local English checker. Self-hosted LanguageTool gives a private multilingual API for your own apps.
Dependencies for LanguageTool Hosting
- A Railway account.
- Optional: a volume for n-gram data.
Deployment Dependencies
- LanguageTool on GitHub: source code and rules
- LanguageTool HTTP API: endpoint reference
- erikvl87/docker-languagetool: the Docker image used here
Implementation Details
The image is pinned by digest, so redeploys never change versions. The start command optionally prepares the n-gram volume as root, then runs LanguageTool as an unprivileged user with the configured heap.
Frequently Asked Questions
What is LanguageTool? An LGPL-2.1 open source grammar, spelling and style checker for more than 30 languages.
How much does it cost to host LanguageTool? About $5–15/month on Railway, depending on memory and traffic.
How do I check text?
Post language and text to /v2/check and read the matches array in the JSON response.
Is it the same as LanguageTool Premium? It uses the open source rules. Premium-only rules and AI rewriting are not included.
Can I use my browser extension with it? Yes, where the extension or add-on supports a custom server URL.
Is my server private? The API has no login, so restrict access with a proxy or Railway's private network for sensitive use.
Why Deploy and Host LanguageTool on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying LanguageTool on Railway, you get a private multilingual grammar and spelling API for your apps and team, without per-seat fees or sending text to a third party.
Template Content
LanguageTool
erikvl87/languagetool:6.8