To start, if I load PieFed first, then nginx I get an error like below:
nginx error:
× nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-01-02 17:26:07 EST; 22s ago
Duration: 5min 39.898s
Docs: https://nginx.org/en/docs/
Process: 9406 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
CPU: 6ms
Jan 02 17:26:06 pi nginx[9406]: nginx: [emerg] bind() to 0.0.0.0:5000 failed (98: Address already in use)
Jan 02 17:26:06 pi nginx[9406]: nginx: [emerg] bind() to [::]:5000 failed (98: Address already in use)
Jan 02 17:26:06 pi nginx[9406]: nginx: [emerg] bind() to 0.0.0.0:5000 failed (98: Address already in use)
Jan 02 17:26:06 pi nginx[9406]: nginx: [emerg] bind() to [::]:5000 failed (98: Address already in use)
Jan 02 17:26:07 pi nginx[9406]: nginx: [emerg] bind() to 0.0.0.0:5000 failed (98: Address already in use)
Jan 02 17:26:07 pi nginx[9406]: nginx: [emerg] bind() to [::]:5000 failed (98: Address already in use)
Jan 02 17:26:07 pi nginx[9406]: nginx: [emerg] still could not bind()
Jan 02 17:26:07 pi systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jan 02 17:26:07 pi systemd[1]: nginx.service: Failed with result 'exit-code'.
Jan 02 17:26:07 pi systemd[1]: Failed to start nginx.service - nginx - high performance web server.
If I do the opposite and load nginx before PieFed, PieFed will make a similar complaint about sharing the same port.
The pyfedi.service, celery.service and celeryd files all look similar to the examples from the INSTALL.md except I changed the directory names to match my name in the appropriate places.
Here are the error messages I am getting from systemctl:
pyfedi.service error/celery.service error:
sudo systemctl status celery.service
× pyfedi.service - Gunicorn instance to serve PieFed application
Loaded: loaded (/etc/systemd/system/pyfedi.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-01-02 14:28:27 EST; 4h 42min ago
Duration: 126ms
Process: 6699 ExecStart=/home/USERNAME/pyfedi/venv/bin/gunicorn --config gunicorn.conf.py --preload pyfedi:app (code>
Main PID: 6699 (code=exited, status=1/FAILURE)
CPU: 126ms
Jan 02 14:28:27 pi systemd[1]: pyfedi.service: Scheduled restart job, restart counter is at 5.
Jan 02 14:28:27 pi systemd[1]: Stopped pyfedi.service - Gunicorn instance to serve PieFed application.
Jan 02 14:28:27 pi systemd[1]: pyfedi.service: Start request repeated too quickly.
Jan 02 14:28:27 pi systemd[1]: pyfedi.service: Failed with result 'exit-code'.
Jan 02 14:28:27 pi systemd[1]: Failed to start pyfedi.service - Gunicorn instance to serve PieFed application.
lines 1-13/13 (END)
----------
× celery.service - Celery Service
Loaded: loaded (/etc/systemd/system/celery.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-01-02 14:28:26 EST; 4h 42min ago
Process: 6694 ExecStart=/bin/sh -c ${CELERY_BIN} multi start -A ${CELERY_APP} ${CELERYD_NODES} --pidfile=${CELERY>
CPU: 341ms
Jan 02 14:28:26 pi sh[6695]: File "<frozen importlib._bootstrap_external>", line 940, in exec_module
Jan 02 14:28:26 pi sh[6695]: File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Jan 02 14:28:26 pi sh[6695]: File "/home/USERNAME/pyfedi/celery_worker.py", line 3, in <module>
Jan 02 14:28:26 pi sh[6695]: from app import celery, create_app
Jan 02 14:28:26 pi sh[6695]: File "/home/USERNAME/pyfedi/app/__init__.py", line 7, in <module>
Jan 02 14:28:26 pi sh[6695]: from flask import Flask, request, current_app, session
Jan 02 14:28:26 pi sh[6695]: ModuleNotFoundError: No module named 'flask'
Jan 02 14:28:26 pi systemd[1]: celery.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Jan 02 14:28:26 pi systemd[1]: celery.service: Failed with result 'exit-code'.
Jan 02 14:28:26 pi systemd[1]: Failed to start celery.service - Celery Service.
At this point I am stuck and not sure where to go from here.
There is just one PieFed running in docker on the Pi. My labeling might be a little confusing there.
I followed the easy instructions up until getting PieFed running in the background then skipped down to the Running PieFed in production section. I didn't see any of the files mentioned in that section and thought to continue from there.