Skip to content

Instantly share code, notes, and snippets.

@zouppen
Last active January 1, 2025 23:25
Show Gist options
  • Save zouppen/3d1198a17669a715c199a4a4a07b7675 to your computer and use it in GitHub Desktop.
Save zouppen/3d1198a17669a715c199a4a4a07b7675 to your computer and use it in GitHub Desktop.
Podman rootless container for Gomuks

How to run Gomuks Web in a container

I'm using Podman on Linux. Podman 4.4 or newer is required for Quadlet support. Check it with podman -v before continuing.

For some reason, Gomuks wants to ask your user name and password interactively on first run. Therefore you need to invoke the container first on command-line:

podman run --rm -it -v gomuks:/data dock.mau.dev/tulir/gomuks

Enter your username, then enter, then your password (not your Matrix password, it's only for Gomuks) and press enter again. The container starts. Terminate the container with ctrl+c.

It has generated the initial config file to the volume. Edit ~/.local/share/containers/storage/volumes/gomuks/_data/config/config.yaml and change localhost to 0.0.0.0. This allows access from outside of the container which we restrict in the quadlet by doing a local forward only. See config.yaml in this gist.

Then place Quadlet file gomuks.container under ~/.config/containers/systemd/

Then:

systemctl --user daemon-reload
systemctl --user start gomuks

Navigate your browser to http://127.0.0.1:29325/ and enjoy.

The container will start automatically on your user login and shut down on logout by default. If you have invoked loginctl enable-linger $USER, the container will stay on from boot to shutdown.

# This file is located in `podman volume mount gomuks`/config/config.yaml
web:
listen_address: 0.0.0.0:29325
# Other options may stay default
# Place this file in ~/.config/containers/systemd/gomuks.container
[Unit]
Description=Gomuks container
After=network.target
[Container]
Image=dock.mau.dev/tulir/gomuks
Volume=gomuks:/data
PublishPort=127.0.0.1:29325:29325/tcp
AutoUpdate=registry
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment