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 # uncomment this line to enable production mode

Quit nano by using Ctrl-X, Y and Enter and disconnect from the server by typing:


Then you can reconnect and (after restarting your oTree server) the changes are in effect.