Real machine or virtual?

Okerr is rather big and complex project: web application (apache/uwsgi), database, mailserver, message broker, few okerr systemd daemons. If you run any other software on server, you will need to be accurate to integrate it. So, we strongly recommend to use dedicated (real or virtual) server for okerr. At least when trying to use it for first time. is recommended way to install and it will be described here. There is checklist for [manual install](Manual install) but it’s not recommended unless you’re very familiar with okerr.

Step 1 Prepare LXC container

# host
lxc-create -n okerr -t download -- --dist=debian --release=buster --arch=amd64

Step 2b (alternative way: okerr sources are on host machine)

You may use this method (2b) instead of recommended (2a) but it’s harder and not recommended.

# host machine
mkdir /var/lib/lxc/okerr/rootfs/opt/okerr

Edit /var/lib/lxc/okerr/config, add mount option to config (replace path to okerr-dev repo):

lxc.mount.entry = /home/USERNAME/repo/okerr-dev /var/lib/lxc/okerr/rootfs/opt/okerr none bind 0 0

Continue preparation:

# start and attach
lxc-start -n okerr
lxc-attach -n okerr

# VM
mkdir /opt/okerr
apt install git python3

Step 3: Install

Replace email in command and run:

# inside VM
cd /opt/okerr

# All default values. user: password: okerr_default_password
./ --local --email USER@EMAIL.COM

# Or explicitly
./ --fix --apache --rmq --email USER@EMAIL.COM --pass MyPass

Now, wait a little, it will install lot of debian packages, python modules, configures everything, on my notebook this takes 11 minutes.

Step 4: Post-install configuration

By default, okerr configured to use host, you can set it in /etc/hosts (pointing to IP address of VM) e.g.:

or set/add other hostname in /etc/okerr/local.d/local.conf and /etc/apache2/sites-available/okerr.conf .

Make sure you can send mail from this host. If needed - reconfigure postfix for this (by default it uses hostname ‘okerr’).

myhostname = okerr  #replace to your valid hostname

# inet_protocols = all
inet_protocols = ipv4

Also, you may want to set settings FROM and SERVER_EMAIL in local config (/etc/okerr/okerr.conf). Defaults:

FROM = '"okerr robot" <>'


Log in to it’s fully working.

Enable okerr SMTP server (optional)

make sure okerr-smtpd service is enabled and running

systemctl enable okerr-smtpd
systemctl start okerr-smtpd
systemctl status okerr-smtpd

Configure postfix /etc/postfix/transport:    smtp:localhost:10025

then run: postmap /etc/postfix/transport

in /etc/postfix/ .. code-block:: none

relay_domains = $mydestination,,, transport_maps = hash:/etc/postfix/transport smtp_host_lookup = dns, native # disable ipv6 inet_protocols = ipv4

Hostname (e.g. or should not be mentioned in: myhostname and mydestination but should be in relay_domains (mail to these hosts should be relayed, not local).

format of text email

%%% MyIndicator.status = OK
%%% MyIndicator.details = %HOST% SMTP test
%%% MyIndicator.secret = mySECRET

how to send test email

cat msg | msmtp -f --host=localhost --port=10025