Clone this repository, create a new environment using miniconda or micromamba and install the dependencies
conda create -n streamlit
conda activate streamlit
conda install python=3.12 streamlit munch pyyaml -c conda-forge
python -m pip install streamlit_survey pyrolific- Copy
sample_config.ymlto e.g.config.ymland change the values as required - Create an api token on prolific and save it to
api_token.txtor whatever you configured it to inconfig.yml - Create a new empty database for your study with
python init_db.py config.yml
Run the study server using streamlit run main.py config.yml
-
Open a TCP port using
uberspace port addand remember the port number it gives you. You can retrieve it later though using the commanduberspace port list. NB it might take a few minutes for the updated firewall rules to take effect and the port actually being available from the outside. More info here https://manual.uberspace.de/basics-ports/ -
Run the server specifying the port you opened and the Let's Encrypt-certificates that uberspace provided you with (https://manual.uberspace.de/web-https/) so the connection to your server is encrypted. Replace
${PORT}with the port number uberspace opened for you and${ASTEROID}with the name you picked for your uberspace:
streamlit run --server.port ${PORT} --server.sslCertFile ~/etc/certificates/${ASTEROID}.uber.space.crt --server.sslKeyFile ~/etc/certificates/${ASTEROID}.uber.space.key main.py config.yml