Installation

PieFed requires Python 3.9+ and PostgresSQL.

In a directory when you want the PieFed site to run (e.g. /var/www/)

Download the lastest PieFed code:

git clone https://codeberg.org/rimu/pyfedi.git

cd pyfedi

create a virtual environment:

python3 -m venv venv

activate virtual environment:

source venv/bin/activate

install python packages:

pip install wheel
pip install -r requirements.txt

configure basic settings:

cp env.sample .env

edit the new .env file  using any text editor, such as nano:

nano .env

Set SECRET_KEY to a random string. Set server_name to your url (without https and without trailing slash). Use 127.0.0.1:5000 if you are doing local development work rather than running in production.

Create an empty database in PostgreSQL with appropriate credentials and then in .env set DATABASE_URL to:
 

postgresql+psycopg2://user:password@127.0.0.1/database_name

Use https://www.google.com/recaptcha/admin/create to register your site and then put the public and private keys into the .env file.

If your server does not have /dev/shm then change CACHE_DIR to /tmp.

Set up initial database structure

flask db migrate
flask init-db

During init-db you will be asked for login credentials of the admin user. Ensure your firewall is configured to allow port 5000 then run PieFed using a development server to test your setup:

flask run

Then visit <your ip or domain>:5000 and PieFed should display in your browser. See if you can log in.

Exit flask run using Ctrl + C.

For more detailed instructions and edge cases, see INSTALL.md.