Run LanguageTool locally on Windows (no cloud, no Docker)

Run LanguageTool locally on Windows (no cloud, no Docker)

LanguageTool can check grammar, style, and spelling on your own PC. The project publishes a small Java server for this. Once it is running, the browser extension talks to your computer instead of the public website, and your text stays local.

The steps below set up that server on Windows. You will install Java, unpack the official archive, start the server when you sign in, and point the extension at it. An extra English data pack is optional and comes last.

Overview

The standalone archive is the checker. It includes spelling, grammar patterns, punctuation, and many everyday word confusions for the languages LanguageTool supports. The server simply loads that archive and waits for the extension to send text.

This is the rule-based checker from the zip. It is enough for ordinary writing. Anything that exists only on LanguageTool's hosted service is a separate product.

1. Environment

Install a 64-bit Java runtime first. LanguageTool 6.6 and later work with Java 17 or newer. Oracle JDK 21 LTS or 25 LTS is a good choice. Eclipse Temurin from Adoptium is the same kind of runtime if you prefer that installer.

When the installer finishes, open a new PowerShell or Command Prompt window and run:

java -version

You should see an LTS version and the words 64-Bit. If the window was already open during setup, close it and open another so Windows can pick up the new path. Skip the download button on java.com. That page still offers Java 8, which is too old for this server.

2. Directories and archive

Download LanguageTool-stable.zip and unpack it to C:\Tools\LanguageTool. That folder is only a convenient place to keep everything together. After version 6.6 the project stopped issuing new numbered zips, so the stable archive is the one to use.

You want these three files in that folder:

C:\Tools\LanguageTool\languagetool-server.jar
C:\Tools\LanguageTool\server.properties
C:\Tools\LanguageTool\start-lt.vbs

Create server.properties in Notepad with this line:

maxTextLength=500000

The server reads that file when it starts. The setting lets you send longer pieces of text in one request.

3. Start at logon

You can have LanguageTool start by itself when you sign in to Windows. A short VBScript launches the server quietly in the background.

Save this as C:\Tools\LanguageTool\start-lt.vbs:

Set sh = CreateObject("WScript.Shell")
sh.CurrentDirectory = "C:\Tools\LanguageTool"
sh.Run "java -Xms256m -Xmx1g -cp languagetool-server.jar org.languagetool.server.HTTPServer --config server.properties --port 8081 --allow-origin", 0, True

The 0 at the end hides the window. True keeps the script running while the server is up.

Next, open Task Scheduler and choose Create Task (the full dialog, not Create Basic Task):

  • General: name it LanguageTool Server. Choose Run only when the user is logged on. Set Configure for to Windows 10. Leave Run with highest privileges off.
  • Triggers: add At log on for your account.
  • Actions: start wscript.exe, with arguments "C:\Tools\LanguageTool\start-lt.vbs", and start in C:\Tools\LanguageTool.
  • Settings: allow the task to run on demand, and turn off the option that stops the task after a time limit.

Windows 11 still lists Windows 10 in that Configure for list, and that is the right choice. After you create the task, use Run once from the Task Scheduler list so the server is available right away. Keep only one copy running so port 8081 stays free. Leaving out the public flag keeps the server on this computer only.

4. Browser extension

With the server running, point the LanguageTool add-on at your PC.

Click the LanguageTool icon on the browser toolbar, then open settings with the gear. Scroll down and expand Advanced settings (only for professional users). Under LanguageTool server you will see three choices:

  • Cloud server (languagetool.org)
  • Local server (localhost)
  • Other server

Select Local server (localhost). That is the usual choice while the Java server is running on this PC. If the add-on does not pick it up, select Other server and enter:

http://127.0.0.1:8081/v2

Save the settings. The allow-origin option in the start script lets the extension on this PC talk to the server. The Microsoft Store app is a different program and will keep using LanguageTool's own service.

5. Bonus: English n-grams

Once the basic server feels comfortable, you can add an English n-gram index. It is a large table of short word sequences that helps LanguageTool with some extra mix-ups on top of the rules already in the zip. You can skip this section and come back to it later.

Download ngrams-en-20150817.zip (about 8.3 GB) and unpack it so the folders look like this:

C:\Tools\LanguageTool\ngrams\en\1grams
C:\Tools\LanguageTool\ngrams\en\2grams
C:\Tools\LanguageTool\ngrams\en\3grams

LanguageTool needs the folder that contains en, which is C:\Tools\LanguageTool\ngrams. A solid-state drive keeps this index pleasant to use.

Add one line to server.properties. Double the backslashes as shown:

maxTextLength=500000
languageModel=C:\\Tools\\LanguageTool\\ngrams

Give Java a little more memory in start-lt.vbs:

Set sh = CreateObject("WScript.Shell")
sh.CurrentDirectory = "C:\Tools\LanguageTool"
sh.Run "java -Xms512m -Xmx2g -cp languagetool-server.jar org.languagetool.server.HTTPServer --config server.properties --port 8081 --allow-origin", 0, True

If the old server is still running, end that Java process in Task Manager first, then run the scheduled task again.

Keeping it on this PC

The server listens on 127.0.0.1, so only programs on this computer can reach it. That is what you want for a personal checker. There is no need to forward port 8081 or to run the task as SYSTEM.