Skip to content

Installing Znuny on Ubuntu with Docker

This guide installs Docker and Docker Compose on Ubuntu so you can run Znuny using the Docker Compose installation.

  • Ubuntu 20.04 LTS
  • Ubuntu 22.04 LTS
  • Ubuntu 24.04 LTS

Newer releases generally work if a current Docker version is available.

ComponentMinimumRecommended
CPU2 cores4+ cores
RAM4 GB8 GB or more
Disk20 GB free40 GB+ (SSD)
Docker20.10latest
Docker Composev2latest
Git2.17latest

Step 1: Install Docker, Docker Compose, and Git

Section titled “Step 1: Install Docker, Docker Compose, and Git”

Update package sources and install:

Terminal window
sudo apt update
sudo apt install -y docker.io docker-compose-v2 git

[!NOTE] The docker-compose-v2 package is available from Ubuntu 22.04 onwards. On older versions, install the official Docker repository or use the legacy docker-compose package.

Enable and start Docker:

Terminal window
sudo systemctl enable --now docker

Optional — run Docker without sudo (log out and back in afterwards):

Terminal window
sudo usermod -aG docker $USER

Verify:

Terminal window
docker --version
docker compose version

Continue with the full stack setup:

Installing Znuny with Docker Compose

That guide clones a community compose project, configures MariaDB, runs the web installer at /znuny/installer.pl, and covers volumes, updates, and troubleshooting.

For production on bare metal, follow the official Znuny installation guide for Apache, MariaDB, and Perl modules on Ubuntu.

Get Znuny professionally installed

Avoid trial and error in production: Softoft handles turnkey Znuny deployment, Docker or bare-metal setup, security hardening, and baseline configuration.

Frequently asked questions

Which Ubuntu versions are officially supported for installing Znuny with Docker?

The guide officially supports Ubuntu 20.04 LTS, 22.04 LTS, and 24.04 LTS for installing Znuny with Docker. While newer releases may work, compatibility is generally ensured if a current and stable Docker version is available for that specific Ubuntu release. It's always recommended to use Long Term Support (LTS) versions for production environments due to their extended support and stability, offering a predictable update cycle and long-term maintenance. This ensures a more reliable and secure foundation for your Znuny instance.

What is the recommended method to install Docker and Docker Compose on Ubuntu for Znuny?

To install Docker and Docker Compose on Ubuntu, you should first update your package sources using sudo apt update. Then, install the necessary packages with sudo apt install -y docker.io docker-compose-v2 git. The docker-compose-v2 package is recommended and available from Ubuntu 22.04 onwards. For Ubuntu 20.04 or older versions, you might need to install the official Docker repository or use the legacy docker-compose package. After installation, enable and start the Docker service using sudo systemctl enable --now docker to ensure it runs automatically on boot and is active.

What are the minimum and recommended system requirements for running Znuny with Docker on Ubuntu?

For running Znuny with Docker on Ubuntu, the minimum system requirements include a 2-core CPU, 4 GB of RAM, and 20 GB of free disk space. It's also essential to have Docker version 20.10 or newer, Docker Compose v2, and Git 2.17 or newer. For optimal performance, especially in production or high-load environments, the recommended specifications are a 4+ core CPU, 8 GB or more of RAM, and 40 GB+ of SSD disk space. Using the latest stable versions of Docker, Docker Compose, and Git is always advised for the best experience, security, and access to the newest features.

After installing Docker and Docker Compose on Ubuntu, what are the next steps to deploy Znuny?

Once Docker, Docker Compose, and Git are successfully installed and verified on your Ubuntu system, the next step is to proceed with the full Znuny stack setup using Docker Compose. This involves cloning a community Docker Compose project, which provides the necessary configuration files for Znuny and its dependencies. You will then configure the MariaDB database, and subsequently run the Znuny web installer, typically accessible at /znuny/installer.pl through your web browser. The comprehensive guide for this process also covers important aspects like managing Docker volumes for data persistence, updating your Znuny instance, and troubleshooting common issues that may arise during deployment.

How can I run Docker commands without using `sudo` on Ubuntu?

By default, Docker commands require sudo privileges for security reasons, as they interact directly with the Docker daemon. To run Docker commands as a non-root user without sudo, you need to add your user to the docker group. This can be done by executing the command sudo usermod -aG docker $USER. After running this command, it is crucial to log out of your current session and log back in for the changes to take effect. This action grants your user the necessary permissions to interact with the Docker daemon directly, improving convenience for development and administrative tasks, but also requires careful consideration of security implications.

When should I consider a traditional (non-Docker) installation of Znuny on Ubuntu, and what does it involve?

A traditional installation of Znuny, without Docker, is typically considered for production environments on bare metal servers where you might prefer direct control over the underlying system components, have specific integration requirements, or need to adhere to existing infrastructure standards that don't involve containerization. This method involves following the official Znuny installation guide, which details the manual setup of prerequisites such as a web server (like Apache), a database (MariaDB 10.3+ or MySQL 8.0+), and various Perl modules. This approach offers fine-grained control but generally requires more manual configuration, dependency management, and ongoing maintenance compared to a Dockerized deployment.