Hi, I'm just starting out with self hosting and I am currently working on a project meant to serve a small town that I live in. What I would like to do is host a small social media site from a Rapsberry Pi 5. I'm not expecting to have a lot of people using it so I'm not pressured about the hardware requirements at this point in time.
I have a few questions before I go any further.
-
Is it possible to set up a PieFed instance as text only? I'm not interested in moderating images or videos. Also, I'm also running this from a residential connection so I don't want to affect my home traffic. All aspects of this project are meant to be as minimal as possible to access more people.
-
My ISP blocks ports. I intend to call them soon and talk to them about unblocking ports. If I am unable to do that, my backup plan to simply run an instance that is unfederated. It will act as a message board for my town. Can I set PieFed to a custom port for traffic? For example using piefed.domainname.com:8080 as the address for people to reach my server.
-
Does the registration for new users require any SSL? I'm not entirely sure if that would be affected the same as federation without SSL.
-
Would mail related services be affected by blocked ports? Would I be able to use another email address not associated with my domain name and PieFed instance?
Thanks for any help or information.
You're right, it was outdated. It seems I got mixed up after a fresh OS install on my Pi. I used APT to download and install docker which is extremely outdated. I now have proper repositories set up for both docker and nginx and everything is up to date. I didn't need to make any changes to the dockerfile with the proper version.
I'm having issues getting nginx, pyfedi.service and celery.service to work.
Below are some snippets from my notes which should lay out all the steps I've taken, hopefully that will explain where I am currently at.
To start, if I load PieFed first, then nginx I get an error like below:
nginx error:
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:
At this point I am stuck and not sure where to go from here.
You seem to have followed the instructions for BOTH the easy way (docker) AND the hard way - you have PieFed running in docker AND you have it installed on the host. Is that it?
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.
Ahh there we go. The first half of 'running piefed in production' is for the hard non-docker way. The second half will need heavily modification to be appropriate for docker.
Sorry to waste your time. I'll split the installation instructions into two files because mashing them up together like this is very confusing.
I've tried just building PieFed in docker with as few things changed as possible and I am still running getting the same message when I try to log in. The CSRF tokens do not match.
The only change I made was in the .env.docker file which was SERVER_NAME='pi.DOMAINNAME.ca:8030'
This is what the reverse proxy in nginx looks like now:
I've tried changing ports, commenting out different parts and it's still the same. I've even checked the port forwarding settings and I still getting the same message. I did notice when I ran
netstat -tunpl
I didn't see any ports from docker for port 5000. If I understand how the reverse proxy works, I should have a connection coming in from the outside on port 8030 and be redirected by nginx to port 5000 on the local machine where PieFed is hosted? If that's right, then nginx isn't sending anything through 5000 locally and just through 8030 I think.No worries, I'm at least learning a lot about network communication and using the terminal in linux more comfortably. In this case I learned how virtual environments work.
Also since it's a Pi, I've been copying and swapping SD cards at certain points as a backup. It's easy to clean up learning mistakes along the way. It's also good practice before I do it all over again on a proper storage device.