cleanserver.py | ||
db-setup.py | ||
LICENSE | ||
README.md | ||
requirements.txt | ||
setup.py |
Cleanserver
Cleanserver get & check if all of the peers of your managed Mastodon server are or are not alive, count their 'downs' and, after seven days (or downs), purge them to remove their data from your Mastodon server's database.
Dependencies
- Python 3
- Postgresql server
- Mastodon server
- Mastodon server admin account
Usage:
-
Clone this repo:
git clone https://gitlab.com/spla/cleanserver.git <target dir>
-
cd into your
<target dir>
and create the Python Virtual Environment:python3.x -m venv .
-
Activate the Python Virtual Environment:
source bin/activate
-
Run
pip install -r requirements.txt
to install needed libraries. -
Run
python db-setup.py
to setup and create new Postgresql database and needed tables. -
Run
python setup.py
to setup your Mastodon hostname and install dir full path. -
Use your favourite scheduling method to set
python cleanserver.py
to run once a day.