Contact Us

Installing Angie from Packages and in Docker

This article covers the basic steps for installing the Angie web server on various Linux distributions, either as packages or as a Docker container.

Video version

A video version of this article is available on YouTube.

Introduction

Installing Nginx does not require a detailed guide, because the packages are usually included in the distribution itself. Installation typically comes down to running one of these commands:

apt-get  install nginx
dnf install nginx

However, the version you get will most likely be outdated. If you need the latest release (stable or mainline), or want to use a Docker container, extra steps are required.

To install Angie from packages, the first task is setting up the repository we will pull them from. You can simply download the packages and install them manually, but in that case the package manager will not deliver updates.

Repository setup and installing Angie OSS

Setting up the Angie repository in Linux depends on the specific distribution. We will look at the two most popular package managers using AlmaLinux 9.5 and Ubuntu 24.04 as examples. Packages in the Angie repositories are built for a wide variety of Linux distributions, as well as FreeBSD. Instructions for your distribution can be found on this page.

Let's start with the repository setup on Ubuntu.

Adding the repository on Ubuntu

First, refresh the package list and install the dependencies:

sudo apt update
sudo apt install -y ca-certificates curl

Next, download the Angie repository key, which is needed to verify package authenticity when downloading:

sudo curl -o /etc/apt/trusted.gpg.d/angie-signing.gpg \
            https://angie.software/keys/angie-signing.gpg

Finally, create the Angie repository entry in the package manager configuration. The commands below fill in the distribution name (version) automatically; the configuration file will be located at /etc/apt/sources.list.d/angie.list. If you ever need to remove the repository, just delete this file.

echo "deb https://download.angie.software/angie/$(. /etc/os-release && echo "$ID/$VERSION_ID $VERSION_CODENAME") main" \
    | sudo tee /etc/apt/sources.list.d/angie.list > /dev/null

Refresh the package list with the new repository included.

sudo apt update

Check that the command completed successfully. If there are errors, go back and re-check the previous steps.

If the package update went through, install Angie:

sudo apt install -y angie

The Angie web server is installed. You can now install extra packages with modules; their names can be found on this page.

For example, you can install the modules for compression with brotli and zstd:

sudo apt install -y angie-module-zstd angie-module-brotli

That completes the installation.

Adding the repository on AlmaLinux

First, add the repository entry to the file /etc/yum.repos.d/angie.repo, like this:

sudo nano /etc/yum.repos.d/angie.repo

The file contents are as follows:

[angie]
name=Angie repo
baseurl=https://download.angie.software/angie/almalinux/$releasever/
gpgcheck=1
enabled=1
gpgkey=https://angie.software/keys/angie-signing.gpg.asc

After that, install the Angie package:

sudo yum install -y angie

You can also install the extra modules:

sudo yum install -y angie-module-zstd angie-module-brotli

On RPM distributions the service does not start automatically after the package is installed, so start Angie:

sudo systemctl start angie

And enable the service so it starts on system boot:

sudo systemctl enable angie

That completes the installation.

Repository setup and installing Angie PRO

If you have become a happy owner of an Angie PRO license, the repository setup differs slightly from the standard one. Let's walk through it using Ubuntu as the example. Access to the Angie PRO repository requires two files: a certificate and a private key. You should receive them from the support team ([email protected]).

First, create a directory to store the certificate (angie-repo.crt) and the key (angie-repo.key).

sudo mkdir -p /etc/ssl/angie/

Copy the certificate and key files into /etc/ssl/angie/ and restrict access to those files:

sudo chown -R _apt:nogroup /etc/ssl/angie/

Also remember to put the license file in /etc/angie; it lifts the limits on the number of worker processes and connections. Install the packages needed for the repository to work:

sudo apt update
sudo apt install -y apt-transport-https lsb-release \
 ca-certificates curl gnupg2

Download the Angie PRO repository public key to verify package authenticity:

sudo curl -o /etc/apt/trusted.gpg.d/angie-signing.gpg \
 https://angie.software/keys/angie-signing.gpg

Enable the Angie PRO repository itself:

echo "deb https://download.angie.software/angie-pro/$(. /etc/os-release && echo "$ID/$VERSION_ID $VERSION_CODENAME") main" \
    | sudo tee /etc/apt/sources.list.d/angie.list > /dev/null

Next, configure repository access using the key and certificate files placed in /etc/ssl/angie/ earlier:

Acquire::https::download.angie.software::Verify-Peer "true";
Acquire::https::download.angie.software::Verify-Host "true";
Acquire::https::download.angie.software::SslCert     "/etc/ssl/angie/angie-repo.crt";
Acquire::https::download.angie.software::SslKey      "/etc/ssl/angie/angie-repo.key";

The repository is configured. Now refresh the package list and make sure there are no errors:

sudo apt update

Install the Angie PRO package:

sudo apt install -y angie-pro

Next, install the extra module packages. Keep in mind that the module package names in the PRO version differ from the package names for OSS:

sudo apt install -y angie-pro-module-zstd angie-pro-module-brotli

Verifying that the PRO version is installed is also easy (ps afx | grep angie):

  1101 ?        Ss     0:00 angie: master process v1.8.2 PRO #1 [/usr/sbin/angie -c /etc/angie/angie.conf]

You can also check the version with angie -V:

Angie version: Angie/1.8.2 (PRO)

That completes the installation.

Running Angie in a Docker container

Angie has a Docker image registry with images built on various Linux distributions. The images are also split into minimal ones (the -minimal suffix or the :minimal tag) and full ones (with extra modules installed). The list of installed modules can be found on the documentation page.

There is also a templated image (the -templated suffix), which lets you configure Angie with environment variables.

To run Angie in Docker we will use the standard image based on the Alpine distribution; the host system is Ubuntu 24.04.

First, install Docker from the standard repository:

sudo apt install docker.io

Next, create and start the Angie container:

sudo docker run --name angie -v \
/var/www/html:/usr/share/angie/html:ro -p 8800:80 -d \
 docker.angie.software/angie:latest

In this command we mounted part of the host filesystem into the container: the /var/www/html directory on the host becomes the default root for the Angie configuration, and inside the container it has the path /usr/share/angie/html. The command also maps a port: host 8080, container 80. Keep in mind that the image is specified as angie with the latest tag, which suits learning tasks; in production use an exact version.

If there is no port conflict, the container will start, and you can check that it is reachable:

curl localhost:8080

Our container has a directory for the site files and is reachable on port 8080, but we have no convenient way to edit its configuration. Of course, we can get a shell inside the container and edit the configs there, but there is a better path. First, copy the Angie config directory to a host directory:

sudo docker cp angie:/etc/angie/ /root/angie

Next, remove the container we just created and create a new one, attaching the Angie configuration directory from the host system:

sudo docker rm -f angie
docker run --name angie -v /var/www/html:/usr/share/angie/html:ro \
 -v /root/angie:/etc/angie:ro -p 8800:80  -d \
 docker.angie.software/angie:latest

All Angie configs are now editable on the host (/root/angie), while the directories are mounted read-only (:ro). After updating the configuration, remember to reload Angie in the container:

docker kill -s HUP angie

At this point we have a container reachable on port 8080 that uses the host directory /var/www/html as /usr/share/angie/html inside the container, with its configuration stored in the host directory /root/angie.

Another way to customize the container is to build your own image based on one of the variants available in the Angie registry.

Summary

We covered several ways to install Angie from package repositories and walked through installing Angie PRO. Then we looked at the Angie image variants in the registry and the process of starting a container with a custom configuration.

Out of scope for this article: building Angie from source and building your own Docker images.