Set up backend

Create environment variable file

cd /srv/server/glitchtip
nano env

Don't forget to set the SECRET_KEY to a secret random string. This example assumes you have an SMTP server running on localhost and want to use Redis table 13.

Check for more information about these options.

I know that always having to load the env file is not ideal, but I can't think of another way without code changes to glitchtip.

Database migration

All of the following commands assume they are run as glitchtip user, using the python binary from the virtualenv (/path/to/new/virtual/environment/bin/python) and have the above environment variables loaded.

One way to do this is to run

sudo -u glitchtip bash
export $(cat ../env | xargs) # repeat after editing env
/srv/venv/glitchtip/bin/python THECOMMAND`

For the database migration run

python migrate

If you get any connection errors, check the DATABASE_URL above and if your PostgreSQL user exists.