Install a server

This guide installs SimDB with the server components. For running it, see Run a development server and Run behind Nginx and Gunicorn.

Install

Clone SimDB and create a virtual environment:

git clone https://github.com/iterorganization/SimDB.git
cd SimDB
python3 -m venv venv
source venv/bin/activate

Install with the all extra (server, PostgreSQL, and IDS validation):

pip install -e ".[all]"

To install only what you need, combine the relevant extras, for example pip install -e ".[server,postgres]".

Verify:

simdb --version

Create the server configuration

The server reads app.cfg from the application configuration directory. Find it with:

dirname "$(simdb config path)"

On Linux this is typically /home/$USER/.config/simdb; on macOS, /Users/$USER/Library/Application Support/simdb.

Create app.cfg there with the settings for your deployment, and set its permissions to owner-only:

chmod 600 app.cfg

A minimal SQLite configuration:

[flask]
secret_key = CHANGE_ME_TO_A_LONG_RANDOM_STRING

[server]
upload_folder = /var/lib/simdb/simulations
admin_password = CHANGE_ME

[database]
type = sqlite

[authentication]
type = None

See the server configuration reference for every option, including authentication, validation, caching, email, and roles, and for a PostgreSQL example.

Tip

To stand up a complete server (with PostgreSQL and Redis) in one command, use the Docker Compose deployment instead of installing by hand.

Next steps