Podman
A step-by-step guide to running Overleaf Server Pro with rootless Podman on a clean RHEL-based installation (CentOS Stream, Rocky Linux, AlmaLinux, RHEL). SELinux remains enforcing throughout.
In this guide we'll go through a manual setup instead of running bin/podman-setup (docs). Every Podman-specific step below matches a check or fix that the script performs.
Overview
The bin/podman-setup script validates and auto-fixes a RHEL-based system for use with Overleaf Server Pro using rootless Podman, Sandboxed Compiles, and SELinux enforcing. Running bin/podman-setup (dry-run) checks for issues; running bin/podman-setup --apply fixes them automatically.
This guide walks through those same steps manually.
Prerequisites
Supported Operating Systems
We only officially support RHEL (Red Hat Enterprise Linux) 9 and later, but this guide should work with other RHEL-based distributions such as CentOS Stream, Rocky Linux and AlmaLinux.
Clean installation
This guide has been tested on a fresh installation, and assumes the host has:
No Docker installation. Docker and the
podman-dockershim both provide/usr/bin/docker, and the Toolkit treats the host as Podman whenever thepodmancommand is available.No existing Podman configuration in
~/.config/containers/.No existing Toolkit installation or Overleaf data. Moving an existing Docker-based instance to Podman is not covered.
No custom SELinux policy for containers.
If your host differs, review each step before you apply it, and run bin/podman-setup to check the result.
Run every step as the non-root user that will own the rootless Podman setup. bin/podman-setup refuses to run as root.
Install System Packages
Install all required packages:
What each package is for
podman
Rootless container runtime
podman-docker
Provides /usr/bin/docker shim → Podman
git
Clone the Overleaf Toolkit
curl
Download Docker Compose binary and socket tests
checkpolicy + policycoreutils
Build and load SELinux policy
Configure Rootless Podman
Rootless Podman lets you run containers as a non-root user -- more secure, no privilege escalation needed.
Enable user lingering
This keeps the user's systemd session alive after logout, so Podman services keep running:
Start and enable the Podman socket
The Podman socket provides the Docker-compatible API that the Overleaf toolkit uses:
Verify it's running:
Then check the socket responds. This should print OK:
Install Docker Compose v2
The Overleaf Toolkit uses docker compose internally. Podman emulates the docker CLI via podman-docker, but we need the real Docker Compose v2 binary.
sha256sum should print OK. If it reports a mismatch, the binary is not installed; download it again.
Verify everyings installed correctly using:
If you get command not found, you can try adding ~/.local/bin to your PATH.
Configure Podman registries
The Toolkit's Compose files use short image names like mongo instead of docker.io/library/mongo. Podman's short-name mode prompts on a TTY by default -- but there's no TTY inside Compose, so the pull fails. To work around this we'll create an alias for the affected images:
Clone and initialise the Toolkit
The bin/init command initializes three configuration files overleaf.rc, variables.env and version. These are the main server configuration files that allow you to customize how your server operates and how your users interact with your instance.
Run the remaining commands in this guide from the Toolkit directory.
Then update the configuration for Server Pro, edit the config/overleaf.rc file and set
Next, edit the config/variables.env file, uncomment TEX_LIVE_DOCKER_IMAGE and ALL_TEX_LIVE_DOCKER_IMAGES, and set them to the TeX Live images you want to use, for example:
bin/up exits with an error if ALL_TEX_LIVE_DOCKER_IMAGES is not set. You can find more information about configuring TeX Live images here.
Configure Toolkit for Podman
The Toolkit needs to know where the Podman socket is. These variables belong in config/overleaf.rc (the Toolkit config/ directory), not in config/variables.env (the container environment).
If DOCKER_HOST leaks into the container environment, sharelatex gets confused about which socket to use and the sibling containers will fail to create.
The socket path is computed from your user's UID. config/overleaf.rc already contains a DOCKER_SOCKET_PATH line, so replace it rather than adding a second one:
Create the SELinux policy
When the www-data user inside the sharelatex container connects to the Podman socket to spawn sibling containers, SELinux checks two things:
The socket file — can the container write to the socket?
The socket process — can the container connect through the socket?
The default container type, container_t, is allowed neither. The Toolkit's policy module defines a sharelatex_t type for the sharelatex container, and grants only that type access to the socket.
The socket file and the socket process have different SELinux contexts:
Socket file at /run/user/<uid>/podman/podman.sock
user_tmp_t (tmpfs)
container_t → user_tmp_t:sock_file write
container_t → user_tmp_t:sock_file getattr
Socket process (podman.socket service)
container_runtime_t
sharelatex_t → container_runtime_t:unix_stream_socket connectto
sharelatex_t → container_runtime_t:fifo_file setattr
The sharelatex container also needs sharelatex_t → self:netlink_audit_socket nlmsg_relay.
The Toolkit ships a policy module at lib/podman_socket_clsi.te. Copy it and install it:
Verify it's loaded:
The policy module podman_socket_clsi contains three allow rules:
Loading the module doesn't change anything on its own. Set SELINUX_MODE=managed in config/overleaf.rc so the Toolkit starts the sharelatex container with the sharelatex_t type:
SELINUX_MODE accepts these values:
SELINUX_MODE
Effect on the sharelatex container
managed
Runs as sharelatex_t, from the podman_socket_clsi module. Recommended.
custom
Runs as the type set in SELINUX_LABEL. The type must exist in the loaded policy and include the rules above.
disable (default)
Runs with SELinux confinement disabled (label=disable). Compiles work without the policy module, but SELinux no longer confines the container.
none
No SELinux option is set, so the container runs as container_t and can't reach the Podman socket.
Load the module before setting SELINUX_MODE=managed. If sharelatex_t doesn't exist in the loaded policy, the container starts without the label and compiles fail.
Install the Seccomp profile
The Seccomp (Secure Computing) profile controls what syscalls spawned sibling containers can use. It ships inside the Server Pro image at /overleaf/services/clsi/seccomp/clsi-profile.json.
bin/up and bin/upgrade do this automatically. If the profile for the current version is missing, they extract it from the Server Pro image to config/seccomp/<version>/clsi-profile.json and set SECCOMP_PROFILE in config/variables.env to that path. If SECCOMP_PROFILE points anywhere else, bin/up replaces it.
To extract the profile manually instead:
Verify the settings
Even though you've manually applied the settings, it's still possible (and recommended) to run the bin/podman-setup script to verify that the above changes have been applied correctly. If you've missed a step or made a typo the script should pick it up and log it as a warning/failure.
If you run bin/podman-setup before starting your instance for the first time, it reports the warning container → socket skipped (sharelatex not running) and exits with code 1. This is expected: the script can only test the socket from inside the sharelatex container once it's running.
Start your instance
Once you've verified the required changes, you can run the bin/up -d script to start your instance for the first time. During this process you'll see the MongoDB, Redis, Server Pro and TeX Live images pulled in turn.
Once it's running, run bin/podman-setup and bin/doctor again. Both should report container → socket: OK, which confirms the sharelatex container can reach the Podman socket.
When complete, please resume the setup by performing the post-installation tasks to create your first account.
Last updated
Was this helpful?