Manual installation


This instructions are not up-to-date!

If you really do not want to use the Docker image, they may nevertheless provide enough guidance.


sudo apt install python3 python3-venv rabbitmq-server uwsgi uwsgi-plugin-python3 git texlive-latex-extra texlive-fonts-recommended texlive-lang-german


The app should run as an own user, so create one. In this manual the app will be placed in /srv/helfertool, adapt this and the username to your needs.

addgroup --system helfertool
adduser --system --home /srv/helfertool --ingroup helfertool --disabled-password helfertool

Python and app

All following commands should be executed under the user that was created in the last step (here helfertool):

sudo -u helfertool bash

First, create the virtual environment and activate it:

pyvenv .
. ./bin/activate

Now get the source code:

git clone --depth 1

Than install the Python dependencies:

pip install -r helfertool/requirements.txt

Depending on your database choice you have to install further packages:

pip install mysqlclient
pip install psycopg2-binary

Basic settings

After the installation of the dependencies it’s time for some basic configuration.

The local configuration has to be places in helfertool/helfertool/, so create this file from the template:

cp helfertool/helfertool/ helfertool/helfertool/

Open the file helfertool/helfertool/ with your favourite editor. These are the most important settings, that should be set now:


For MariaDB use this configuration:

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'helfertool',
        'USER': 'helfertool',
        'PASSWORD': '<PASSWORD>',
        'HOST': '',
        'PORT': '',
        'OPTIONS': {
            "init_command": "SET sql_mode='STRICT_TRANS_TABLES';",

For PostgreSQL use this configration:

    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'helfertool',
        'USER': 'helfertool',
        'PASSWORD': '<PASSWORD>',
        'HOST': '',
        'PORT': '5432',

The connection to RabbitMQ has also to be configured:

CELERY_BROKER_URL = 'amqp://helfertool:<PASSWORD>@localhost:5672/helfertool'
CELERY_RESULT_BACKEND = 'amqp://helfertool:<PASSWORD>@localhost:5672/helfertool'
Secret key

This has to be an unique and secret key.


You can generate one with this command:


Set DEBUG to False, you should never deploy a Django app with enabled debugging!

DEBUG = False
Allowed hosts

When debugging is disabled, we need to set the allowed hostnames under which the application is served:

ALLOWED_HOSTS = ['', '']

Make sure that the file is only readable for the user helfertool since it contains passwords:

chmod 0600 helfertool/helfertool/

Migrations, static files and user creation

To setup the database, the following command has to be executed:

python migrate
python createcachetable

The following command collects all static files in one directory that will be delivered by the webserver later:

python collectstatic

Now we can also create the first user:

python createsuperuser


Finally, we can run the development webserver to validate the installation:

python runserver

Stop the server again with Ctrl + C (it is not suitable for productive deployment).

We can also check the connection to RabbitMQ by starting the some workers:

celery -A helfertool worker -c 2 --loglevel=info


Since the Django part is working now, it’s time to configure the application server uWSGI. The configuration has to be placed in /etc/uwsgi/apps-available, for example in /etc/uwsgi/apps-available/helfertool.ini.

plugin          = python35
set-ph          = basedir=/srv/helfertool
chdir           = %(basedir)/helfertool
pythonpath      = %(basedir)/lib/python3.5/site-packages
wsgi-file       = %(basedir)/helfertool/helfertool/
stats           = %(basedir)/uwsgistats.socket
socket          =
workers         = 6
touch-reload    = %(basedir)/app_reload
vacuum          = True
uid             = helfertool
gid             = helfertool

smart-attach-daemon = %(basedir)/ %(basedir)/bin/celery -A helfertool worker -c 2 --pidfile=%(basedir)/
exec-as-user-atexit = kill -HUP $(cat %(basedir)/

The file is also part of the git repository in stuff/deployment/uwsgi.conf. Adapt the paths, number of workers and if necessary other settings to your needs.

Then create a symlink in the apps-enabled directory and restart the service:

sudo ln -s /etc/uwsgi/apps-available/helfertool.ini /etc/uwsgi/apps-enabled/helfertool.ini
sudo systemctl restat uwsgi

If you want, you can check for errors in /var/log/uwsgi/app/helfertool.log. Otherwise we will notice possible problems soon.

Reverse proxy

The webserver has to work as reverse proxy in front of uWSGI and also serve the static files. The following section describes the setup with Apache and Nginx, but you could also use tools like HAProxy or Varnish.

Place the configuration in /etc/apache2/sites-available/helfertool.conf, the file is also in the git repository under stuff/deployment/apache.conf.

Place the configuration in /etc/nginx/sites-available/helfertool.conf, the file is also in the git repository under stuff/deployment/nginx.conf.

Review and adapt the settings carefully.