How to set environment variables

It is highly recommended to use environment variables for certain things, for example to set production mode, the oTree password, the auth level, ... .

To do so log into the server using your credentials.

Then type:

nano ~/.bashrc

Here, add the environment variables you want to set to the end of the file, e.g.

export OTREE_ADMIN_PASSWORD=my_password
export OTREE_PRODUCTION=1 # comment this line to disable production mode

Quit nano by using Ctrl-X, Y and Enter, then reload the file by typing:

source ~/.bashrc

Start (or stop and restart) your the oTree server: the changes are in effect.