3 Used to see which instances block yours.
11 Create role-based user:
14 sudo useradd --home-dir=/opt/fedi-block-api --comment "Fedi Block API" --user-group --create-home fba
15 sudo mkdir -p /opt/fedi-block-api
16 sudo chown -R fba:fba /opt/fedi-block-api
22 # Change to role-based user 'fba'
26 git clone git://git.mxchange.org/fba.git
28 # You MUST create a virtual environment:
31 # Add this to your ~/.bashrc file
32 source "${HOME}/fba/venv/bin/activate"
34 # Install all requirements
35 pip3 install -r requirements.txt
38 cp blocks_empty.db blocks.db
40 # Create configuration file
41 cp config.defaults.json config.json
44 Run commands, they should not fail!
47 # Run commands, they should not fail!
48 ./fba.py fetch_instances --domain=mastodon.social # try a bunch of large servers here
51 ### Alter configuration file
52 You maybe wish to change the configuration file, e.g. log_level is set to "info" which is the default but invates privacy of your users, but your choice:
63 ### Fetch blocklists locally (WIP)
64 To save yourself bandwidth and codeberg, too, you want to clone the blocklists from some folks:
67 git clone https://codeberg.org/oliphant/blocklists.git blocklists/oliphant/
70 WIP notice: This feature is not implemented yet.
72 ### Install the services
75 sudo cp services/* /etc/systemd/system
78 ### start the services
81 systemctl enable --now fetch_blocks
82 systemctl enable --now fedi_block_api
87 https://fba.ryona.agency/ uses an older code than this one. So it doesn't reflect this code here. My FBA sub-domain is currently password-protected as I still need to fix some performance issues with large blocking lists.
91 Run these SQL queries from time to time. They always should return zero.
94 SELECT COUNT(blocked) AS cnt FROM blocks LEFT JOIN instances ON blocks.blocked = instances.domain OR blocks.blocker = instances.domain WHERE domain IS NULL LIMIT 1;
95 SELECT COUNT(domain) AS cnt FROM instances WHERE nodeinfo_url IS NOT NULL AND software IS NULL LIMIT 1;
99 [AGPLv3](https://gnu.org)