For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Podman support is experimental and comes with limited support. It is only tested on RHEL 9+ with rootless Podman, Server Pro Sandboxed Compiles (SIBLING_CONTAINERS_ENABLED=true) and SELinux enforcing. Docker remains the recommended container runtime.

If you have any feedback please reach out to support+serverpro@overleaf.com.

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.

This guide will assume that SELinux is enabled and set to Enforcing mode.

Clean installation

This guide has been tested on a fresh installation, and assumes the host has:

  • No Docker installation. Docker and the podman-docker shim both provide /usr/bin/docker, and the Toolkit treats the host as Podman whenever the podman command 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.

1

Install System Packages

Install all required packages:

What each package is for

Package
Purpose

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

You can suppress the Docker emulation message "Emulate Docker CLI using podman" by running the following command.

2

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:

Socket access for Sandboxed Compiles -- when Overleaf compiles documents, the www-data user inside the sharelatex container connects to the Podman socket to spawn sibling compile containers.

3

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.

4

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:

5

Configure Podman Compose provider

Tell Podman to use the Docker Compose v2 binary we installed, and silence the warning about multiple providers. If containers.conf already exists, append the [engine] section:

Without this, Podman may log warnings about detecting multiple Compose providers, this ensures the official Docker Compose v2 binary is always used.

Check that docker compose now reaches Docker Compose v2 through Podman:

6

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.

This script will not overwrite any existing configuration files. It exits with an error if any of them already exist.

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

On Linux, ports below 1024 are privileged -- binding to them normally requires root. As we're setting up rootless Podman, in this example, we've changed the OVERLEAF_PORT from 80 to 8080.

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.

7

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:

Why two variables?

  • DOCKER_HOST tells the Toolkit scripts where to connect

  • DOCKER_SOCKET_PATH is used as the bind mount source in the sibling containers Compose file.

8

Authenticate with quay.io

The Overleaf Server Pro image is hosted on quay.io behind authentication. To log in you'll need to use the username and password you were provided during onboarding.

9

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:

  1. The socket file — can the container write to the socket?

  2. 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:

Check
Context
Required permission

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.

10

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.

Unlike Docker, Podman interprets the default Seccomp profile as a literal file path rather than a built-in value. For this reason, the SECCOMP_PROFILE environment variable must be set to the path of the Seccomp profile file on the host machine. This is not required when using Docker.

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:

11

Set data directory permissions

MongoDB and Redis data directories must be writable by the mapped container UIDs. The script checks and fixes this automatically using podman unshare:

If you changed any of the *_DATA_PATH settings in config/overleaf.rc, use your paths instead.

12

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.

13

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?