Running a local LanguageTool server with Podman Quadlet
Since I'm already running LanguageTool locally on some other machines, today I also installed it on my Bazzite machine at home. Since installing the binary from the Fedora repos would have been an additional hassle, I decided to use a container images started via systemd with Podman Quadlet. This how-to should be pretty portable to other distributions, so feel free to remix the instructions as you see fit.
I'm using the docker-languagetool container image for this tutorial, since it seems to provide the broadest feature set of the container images I found.
If you have no experience with Podman Quadlet, it might be beneficial to read the Bazzite introduction first: https://docs.bazzite.gg/Installing_and_Managing_Software/Quadlet/
All I had to do on my machine is create the ~/.config/containers/systemd directory and create the languagetool.container file in it with the following content:
[Container]
Image=docker.io/meyay/languagetool:latest
AutoUpdate=registry
Volume=%h/volumes/languagetool/fasttext:/fasttext:Z
Volume=%h/volumes/languagetool/ngrams:/ngrams:Z
PublishPort=127.0.0.1:8081:8081
Environment=download_ngrams_for_langs=de,en
[Service]
Restart=always
[Install]
WantedBy=default.target
Before starting the container you have to create the two directories mapped to the container as volumes: mkdir -p ~/volumes/languagetool/{fasttext,ngrams}
Now all that is left is to reload systemd so that it knows about the new service and start the container
systemctl --user daemon-reload
systemctl --user start languagetool.service
Since I've configured my instance to download ngrams for English and German the first start took a while, because it had to download the huge ngram files.
Once the first startup finished you can go to the settings of the LanguageTool browser plugin and in "Advanced settings (only for professional users)" you can switch to "Local server (localhost)" to start using your local server.
To keep the LanguageTool container updated it might also make sense to enable the podman-auto-update.timer, so that podman will automatically update the image whenever it sees a new version on the registry: systemctl --user enable --now podman-auto-update.service