WARNING: Do Not Use in Production
This README provides instructions for setting up a local development environment with PSONO. It is important to note that all configuration files provided here are intended for development purposes only and should not be used in a production environment.
The official documentation about PSONO CE you can find more options about running PSONO, especially in a production environment.
- Generate credentials and update the
server-settings.yaml
:
docker run --rm -ti psono/psono-combo:latest python3 ./psono/manage.py
649E
generateserverkeys
# Copy paste this content into your settings.yml and replace existing occurrences
#
# WARNING: Do this only for a fresh installation!
# Changing those variables afterwards will break the program e.g.:
# Activation links will not work, Server will not be able to read user emails, ...
SECRET_KEY: 'SOME SUPER SECRET KEY THAT SHOULD BE RANDOM AND 32 OR MORE DIGITS LONG'
ACTIVATION_LINK_SECRET: 'SOME SUPER SECRET ACTIVATION LINK SECRET THAT SHOULD BE RANDOM AND 32 OR MORE DIGITS LONG'
DB_SECRET: 'SOME SUPER SECRET DB SECRET THAT SHOULD BE RANDOM AND 32 OR MORE DIGITS LONG'
EMAIL_SECRET_SALT: '$2b$12$XUG.sKxC2jmkUvWQjg53.e'
PRIVATE_KEY: '02...0b'
PUBLIC_KEY: '02...0b'
- Start by running the following command to bring up the PSONO services using Docker Compose:
docker compose up -d
- Once the services are up, open your browser and navigate to http://localhost:10200/server/info/ to access the PSONO server information.
- Create an admin user:
docker container exec -it psono-combo python3 ./psono/manage.py createuser admin@example.com admin admin@example.com
Make sure Docker Compose is up and running
- Follow this guideline to create an API key.
- Update the information in the
main.py
:
# Replace the values of the variables below with the details of your unrestricted API key:
api_key_id = 'f8..8f'
api_key_private_key = '66...3b'
api_key_secret_key = '0a...52'
server_url = 'https://example.com/server'
server_public_key = '02...0b'
server_signature = '4c...d1'
- Create a python environment:
python3 -m venv .env
- Install the requirements:
pip install -r requirements.txt
- Run the
read.py
to read/test the API:
python3 read.py
- Run the
write.py
to write a new secret:
python3 write.py