Deploy LanguageTool

Self-hosted grammar, style and spell checker API for 25+ languages

Deploy LanguageTool

Just deployed

/ngrams

Deploy and Host LanguageTool on Railway

LanguageTool is an open-source grammar, style and spell checker for more than 25 languages, including English, German, French, Spanish, Dutch and Portuguese. Its HTTP server offers the same /v2/check API that the LanguageTool browser add-on, LibreOffice and many editors use, so you can check text on your own server instead of a third-party cloud.

About Hosting LanguageTool

This template runs LanguageTool 6.8 as one service, built from a public GitHub repo that pins the image by version and digest. Railway gives it a public HTTPS domain and checks /v2/languages before it routes traffic. Nothing needs to be filled in to deploy. The wrapper caps the Java heap at 2 GB (one language in use needs about 700 MB). It also sets safe defaults for a public API: 120 requests per client per minute, 50,000 characters per check and 60 seconds per check. A volume at /ngrams holds LanguageTool's optional n-gram data, which catches confused words such as their/there. Set LT_NGRAM_LANGUAGES to download it once.

Common Use Cases

  • A private grammar and spell checker for the LanguageTool browser add-on, LibreOffice, Obsidian or other editors
  • Proofreading inside your own apps, CMS or support tools through the /v2/check HTTP API
  • Checking documents in many languages without sending text to a third-party service

Dependencies for LanguageTool Hosting

  • A Railway volume at /ngrams for the optional n-gram data
  • About 1 GB of memory for one language, more for several languages or n-grams

Deployment Dependencies

Implementation Details

After the deploy, open https://YOUR-DOMAIN/v2/languages to see the supported languages, and try a check:

curl -d "language=en-US" -d "text=This are a test." https://YOUR-DOMAIN/v2/check

In the LanguageTool browser add-on, open Settings, then Advanced settings, choose "Other server" and enter https://YOUR-DOMAIN/v2.

Optional service variables:

  • LT_NGRAM_LANGUAGES: for example en,de. Downloads LanguageTool's official n-gram data (en 15.4 GB, de, fr, es 3.3 to 3.4 GB each, nl 2.5 GB unpacked) onto the volume once, in the background. Grow the volume first. N-grams switch on after a restart, once both en and de are present, because LanguageTool 6.8 drops its English and German spell checkers when n-grams are on without them. With en and de n-grams on, expect about 5 GB of memory use.
  • Java_Xmx: the Java heap limit (default 2g). Raise it for many languages or n-grams.
  • langtool_SETTING: any LanguageTool server setting, for example langtool_requestLimit=0 to switch off the rate limit.

The open-source server has no user accounts, so anyone with the URL can send text to it, within the rate limit. For private use, remove the public domain and call it from your other services at http://${{LanguageTool.RAILWAY_PRIVATE_DOMAIN}}:8010/v2.

Updates: the service builds from the template repo. When a new LanguageTool version is pinned there, Railway shows an "update available" notice on your project, and you choose when to apply it. The n-gram data on the volume is kept.

Why Deploy 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 are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0