Windows Server (advanced)

If you are just testing your app on your personal computer, you can use otree zipserver or otree devserver. You don’t need a full server setup as described below, which is necessary for sharing your app with an audience.

This section is for people who are experienced with setting up web servers. If you would like an easier and quicker way, we recommend using Heroku.

Why do I need to install server software?

oTree’s development setup (devserver) is not designed for running actual studies.

Database (Postgres)

If you want, you can use Postgres as your production database. Install Postgres and psycopg2, create a new database and set the DATABASE_URL env var, for example: to postgres://postgres@localhost/django_db

However, in principle, oTree 3.0+ should do fine with its default SQLite in production, since the server is now is single threaded.


If all the above steps went well, you should be able to run otree resetdb.

Run the production server


otree prodserver 80

See here for full instructions. The steps are essentially the same as on Linux.

Set environment variables


Allow other computers to connect

See instructions here.