Back to Documentation

Installation

Step-by-step guide to install Piler on your server, including system requirements and dependencies.

System Requirements

2+ CPU cores

2+ GB memory

200+ GB disk

Install Dependencies

Required packages and dependencies

apt-get update

apt-get -y --no-install-recommends install sysstat wget openssl sysstat php-cli php-cgi php-mysql \

   make gcc libssl-dev libtre-dev libzip-dev libmariadb-dev libcurl4-openssl-dev \

   php-fpm php-zip php-ldap php-gd php-curl php-xml php-memcached catdoc unrtf poppler-utils \

   nginx tnef sudo libzip4t64 libtre5 cron mariadb-server mariadb-client-core python3 python3-mysqldb \

   ca-certificates curl rsyslog gnupg

wget https://repo.manticoresearch.com/manticore-repo.noarch.deb

dpkg -i manticore-repo.noarch.deb

apt-get update && apt-get install -y manticore manticore-columnar-lib manticore-extra

rm -f manticore-repo.noarch.deb

systemctl stop manticore

systemctl disable manticore

Install Piler from a deb package

Get the deb package (Ubuntu 24.04 compatible) from the releases page, and install it with dpkg

dpkg -i piler_1.4.8-noble-e885d9b_arm64.deb

Or install Piler from source code

Get the source code from the releases page.

Create a dedicated and non-privileged user to run piler

groupadd piler

useradd -g piler -m -s /bin/bash -d /var/piler piler

usermod -L piler

chmod 755 /var/piler

Unpack and compile piler

tar zxvf piler-x.y.z.tar.gz

cd piler-x.y.z

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-database=mysql

make

sudo make install

ldconfig

Postinstall tasks

Piler requires bootstrapping the database, creating cron entries, etc.

/usr/libexec/piler/postinstall.sh

Setup systemd services

pushd /etc/systemd/system

ln -sf /usr/local/libexec/piler/piler.service

ln -sf /usr/local/libexec/piler/piler-smtp.service

ln -sf /usr/local/libexec/piler/pilersearch.service

systemctl daemon-reload

systemctl enable --now piler

systemctl enable --now piler-smtp

systemctl enable --now pilersearch

popd

Configure your mail server

Configure your mail server to pass a copy of each received email to the archive over smtp

Configure the web UI

Create a virtualhost dedicated to piler, and enable rewriting rules. Example webserver configurations are available in the contrib/webserver/ directory.

Log in as administrator using the following account:

admin@local:pilerrocks

Add your own domains that piler will receive emails for in the Administration/Domain menu.

Review Administering piler / Retention rules, and set the appropriate retention rules, if needed. Otherwise piler will retain everything for ‘default_retention_days’ set in piler.conf

Setup email restore

The default email restore method is via SMTP

$config['SMARTHOST'] = 'mail.example.com';
$config['SMARTHOST_PORT'] = '25';
// Set the user and password if you need authentication
$config['SMARTHOST_USER'] = '';
$config['SMARTHOST_PASSWORD'] = '';
		  

Or you can restore via IMAP. To use this, you must enable IMAP authentication.

$config['RESTORE_OVER_IMAP'] = 1;
$config['IMAP_RESTORE_FOLDER_INBOX'] = 'INBOX';
$config['IMAP_RESTORE_FOLDER_SENT'] = 'Sent';
                  

Note that only regular users (not auditors nor admins) are allowed to restore their emails via IMAP.

Apache specific settings

Add the following to the virtual host config

SetEnvIf Request_URI "^(.*)$" DOCUMENT_URI=$1
                  

Additional Resources