WebMail Lite Documentation

Installing on Debian / Ubuntu Linux with Nginx

WebMail Lite can be automatically installed and configured on Ubuntu Linux, Debian Linux or any compatible Linux distribution.

It was tested on: Ubuntu 20.04, Ubuntu 22.04, Debian 10 - 12. It should also work on Linux Mint as well as other compatible flavors of Linux, as long as those provide the following dependencies: Nginx, PHP 7.4 or newer, MySQL 5.7.8 or newer / MariaDB 10.2.7 or newer, with mysqlnd driver.

In case if any components are not detected on the system, they will be automatically deployed from OS repository as dependencies.

Unlike the Apache package, this one provides an installer with command-line interface. You'll be able to select a product, install, upgrade or remove the installation with simple commands.

Configuring repository access

All the commands need to be performed either as root user or as super user. On Debian, you may need to install a few prerequisites first:

apt install curl gnupg

Add the repository to your system as follows:

echo "deb http://apt.afterlogic.com/stable /" > /etc/apt/sources.list.d/afterlogic.list
curl -s http://apt.afterlogic.com/afterlogic.asc | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/afterlogic.gpg --import
chmod 644 /etc/apt/trusted.gpg.d/afterlogic.gpg

Update APT cache with:

apt update

Installing the package

To install the product package, run the following command:

apt install afterlogic-nginx

This will deploy the installer. Now start the installation with:

afterlogic-nginx lite

Once WebMail Lite is installed, it can be accessed at http://ServerIP/afterlogic/ address. Nginx configuration file is automatically placed under /etc/nginx/sites-available/afterlogic.conf, feel free to reconfigure web server to offer access via domain or subdomain. The product itself resides under /usr/share/afterlogic directory.

To configure the installation, you can log into /adminpanel/ as superadmin user, default password is empty.

SSL configuration

In order to enable SSL/https support for the installation, backup /etc/nginx/sites-available/afterlogic.conf file and replace its content with:

server {
    listen 80;
    server_name webmail.somedomain.com;
    return 301 https://$host$request_uri;
}
 
server {
    listen 443 ssl http2;
    server_name webmail.somedomain.com;
 
    location ^~ /afterlogic {
        alias  /usr/share/afterlogic;
        index  index.php;
        try_files $uri $uri/ =404;
    }
 
    location ~ ^(.+\.php)(.*)$ {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        fastcgi_pass   unix:/run/php/php-fpm.sock;
        include        fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME $request_filename;
        fastcgi_param  PATH_INFO $fastcgi_path_info;
    }
 
    location ^~ /afterlogic/data { deny all; }
 
    ssl_certificate /etc/letsencrypt/live/webmail.somedomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/webmail.somedomain.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/webmail.somedomain.com/fullchain.pem;
}

Restart Nginx by running:

service restart nginx

Upgrading the product installation

Run the following command:

afterlogic-nginx upgrade

The installer will check if new version is available - and if it is, it will be downloaded and installed, preserving the product configuration.

Uninstalling the product

To uninstall the product completely, run the following command:

afterlogic-nginx remove

Note that removing the installer package will not delete the product installation itself, just the installer will be removed. After removing the product, you can remove the installer with:

apt purge afterlogic-nginx