2.1 KiB
-
Navigate to the directory
/opt:cd /opt -
Clone the FediFetcher repository from GitHub:
git clone https://github.com/nanos/FediFetcher.git -
Create a Python Virtual Environment named
fedifetcher:python3 -m venv fedifetcher -
Change to the FediFetcher directory:
cd FediFetcher -
Activate the virtual environment:
source /opt/fedifetcher/bin/activate -
Install the required Python packages from the
requirements.txtfile:pip install -r requirements.txt -
Deactivate the virtual environment:
deactivate -
Configure FediFetcher according to the instructions provided at: Configuration Options.
-
Run FediFetcher for the first time:
/opt/fedifetcher/bin/python3 find_posts.py -c=artifacts/config.json -
Create a systemd service file for FediFetcher:
nano /etc/systemd/system/fedifetcher.servicePaste the following content:
[Unit] Description=FediFetcher Service After=network.target [Service] Type=simple User=root WorkingDirectory=/opt/FediFetcher ExecStart=/opt/fedifetcher/bin/python find_posts.py -c=artifacts/config.json [Install] WantedBy=multi-user.target -
Create a systemd timer file for FediFetcher:
nano /etc/systemd/system/fedifetcher.timerPaste the following content:
[Unit] Description=FediFetcher Timer [Timer] OnCalendar=*-*-* *:*:00 Persistent=true [Install] WantedBy=timers.target -
Reload the systemd daemon configuration:
systemctl daemon-reload -
Start the FediFetcher timer and enable it to start at every system boot:
systemctl start --now fedifetcher.timer
With these steps, FediFetcher should be successfully set up on your system and automatically started to fetch posts regularly.