Installing Hermine

Docker Compose

Hermine provides a Docker Compose configuration with the following services:

Two profiles are available :

  • an https profile where Caddy is configured with automatic HTTPS. It can easily be deployed on a VPS.

  • a localhost profile to use Hermine on a local machine or behind a reverse proxy (not suited for development)

Configuration is made through a .env file which should be placed at the root of the project.

By default, a superadmin user is created with admin / admin credential. You can update these credentials from

In case you need to access the django-admin tool from outside Docker, you should use : docker exec -it hermine_django_1 /opt/hermine/

HTTPS profile

You just need to set HERMINE_SECRET and HERMINE_HOST environment variables before you can start the containers. The easiest way to do so is to write it in a .env file.

# configure secret key
# optional : configure HOST if you use something else than localhost:80
echo "" >> .env
# start the services in background
docker-compose --profile https up -d

Hermine should be accessible at Caddy automatically sets up and renew HTTPS certificates.

To update your instance :

cd hermine/
git switch main && git pull
docker-compose --profile https up -d --build

Localhost profile

You must set PORT insted of HERMINE_HOST variable.

# configure secret key
# configure port
echo "PORT=9000" >> .env
# start the services in background
docker-compose --profile localhost up -d

Manual install

Downloading the source code

You can download latest releases from Hermine releases page or clone latest development version from GitLab:

git clone

You can also use git to clone a specific version :

git clone --branch v0.0.1

Major versions changes mean breaking changes, either in the installation configuration or in the API. You can find more information in

For minor or patch versions, it should be safe to update your instance by pulling the latest tag from the repository or downloading from the release page.

Install python dependencies

You should run Hermine in a Python virtual environnement. Using poetry, you can create the virtual environment and install the dependencies with:

cd hermine/
poetry install

Install and build front modules

npm install
npm run build

Configure your instance

Before the first run, you have to create a file in the hermine/hermine/ directory.

cp hermine/hermine/ hermine/hermine/

Update hermine/hermine/ according to your configuration. Ex: For development purposes, you can set HOST to and DEBUG to True

Update the database structure and create a superuser :

# activate poetry shell
poetry shell

# create database structure
python hermine/ migrate

# create a superuser
python hermine/ createsuperuser

Run the server

How you want to serve Hermine is up to you. You should be familiar with WSGI servers and reverse proxies. You can find more information in Django documentation.

A typical installation is :

  • Gunicorn or another WSGI server (running Hermine’s

  • NGinx to serve static files and proxy other requests to Gunicorn

Hermine is not different from any other Django application. You can find more information in Django documentation.

For development purpose, you can simply run :

# run the server 
python hermine/ runserver

Static files

Static files should be served by your web server. After install, you must run collectstatic to copy static files to the static directory (or any other configured in

python hermine/ collectstatic

You can find more information in Django documentation.


You can use an OAuth2 server as authentication backend by uncommenting and adjusting the OAUTH_CLIENT entry in your file. When using Docker, these elements have to be set in your .env file. Further information can be found in Python Social Auth’s documentation on which Hermine relies.

Users will be created on the fly at authentication by the OAuth server.

Health check

Hermine provides two test endpoints which you can use in your monitoring system.

/ping/ always send a 200 response, and can be used to check server availability.

/ready/ does the same but also tries to connect to Hermine database. It sends a 200 response if it succeeds.