I am thinking about hosting my own Mastodon server from home on a Raspberry Pi (Pi4 8GB)?
- Are there good tutorials out there?
- What’s the annual cost just to host yourself?
If it’s a personal server for yourself and maybe some friends and family, I would rather use GoToSocial, as it is much more lightweight and is less complex to set up and maintain.
I ran my own Mastodon for a while. While it does work, it takes up a ton of storage (every image and video you see is cached by your own server). It also doesn’t work great for viewing stuff like replies and older posts, since backfilling is still not a thing. I ended up just browsing on remote servers instead. A great blog post about this: https://jvns.ca/blog/2023/08/11/some-notes-on-mastodon/
every image and video you see is cached by your own server
Even videos and images you never see get cached. I barely use Mastodon and my server still uses around 50GB space.
Don’t do it with an SD card. It will corrupt and crash after a few months.
With an SSD, yeah it would totally work well. :)
Check out https://masto.host/ for managed hosting.
You can migrate away from them if you ever want to.
If you self host instead, make sure your server is on its own vlan. Servers are a target for exploitation, and you don’t want the rest of your home devices exposed if your server is compromised.
Note: A Pi probably has the CPU power, but the caching from the server may be more space than an SD card will hold.
SD card is a hard no. Need to cram an NVMe hat on it or an external SSD or HDD. They need diskio and a fair bit of quickly recyclable space.
A VLAN is not a security feature. Be sure that your firewalls and routers are configured properly and kept up to date.
Yeah, I meant: isolated vlan
Pretty sure that’d rip your microsd in half really quick.
Have you looked into nostr? It offers most of the same features of Mastodon except that:
- Your identity is not tied to your instance. If your instance closes up shop, you keep all your followers, followees, DMs, etc
- You can send encrypted DMs, so your instance admin can’t read them
- Cool tipping functionality so you can tip people if you like their posts. Or don’t use it. It’s optional.
- Most nostr clients have some built-in filtering functionality to block out things that are NSFW, crypto-related, etc. Different relays have different moderation policies, much like mastodon instances.
You can run your own relay of course.
I tried reading up on Nostr the other day, and came away finding it unpalatable, mainly because my understanding was that upvotes are tied to crypto.
The way I read it, you need some sort of crypto currency to pay for upvoting a post, from which I inferred that the only reasonable gauge for a posts popularity (upvotes) was intrinsically tied to money (and crypto-money, at that).
Is this a reasonable assessment, or did I misunderstand something?
EDIT: I was wrong, and stand corrected 👍
Your understanding is not correct. You do not need to use crypto at all to use the platform. There is an optional tipping mechanism where you can tip people via BTC lightning if you like their tweets. It’s pretty fun to use, it’s fun to receive tips from others when they like your post. But you don’t have to.
You can still post, like, re-tweet, reply, DM, etc with no crypto whatsoever. Crypto is not tied to upvotes/visibility unless you specifically set it to filter that way in your client.
One benefit of having crypto integration built-in is that it can provide a sustainable funding mechanisms for relays. You can use “pools” when you send tips. So when you send 10c in a tip for somebody’s post, you can elect to have 1% go to the relay maintainer, nostr development, or any other destination you choose. This problem of subsidizing hosting is a problem ActivityPub doesn’t has any real solution for.
On Activity Pub, instances may choose to run ads, issue badges, or otherwise pay for hosting, but if AP is going to scale to the level it needs to get to, we can’t rely on the altruism of instances to just host everything for free. If we do, we will end up in a centralized social media mess like we’re trying to get away from in the first place.
There are many ways to solve this problem of needing to pay for the network infrastructure, but nostr is the only one currently that has a workable solution.
Thank you for the clarification! I’ve clearly misunderstood the function of the crypto and/or read a poor description of Nostr 👌
In this case, the crypto (in itself still an unpalatable, energy wasting pyramid scheme, IMO) makes a lot more sense, and doesn’t detract from the platform (other than facilitating the platform’s tacit promotion of crypto).
Nice to have a cordial discussion/disagreement on here. If you’re interested in reading some (IMO) good arguments for why it’s not a energy wasting pyramid scheme, check my comment history :).
Thank you! It’s going to be hard to change my mind on that one, but I’ll give it a go 😊👍
Your identity is not tied to your instance. If your instance closes up shop, you keep all your followers, followees, DMs, etc
This is one of the major advantages Bluesky’s protocol (AT Protocol) has over ActivityPub. ActivityPub doesn’t have anything built-in to support this. On Bluesky, you can use your own domain name as your username, and freely move from one server to another while keeping the same username (once they open up federation). It’s configured through a DNS TXT record.
Still doesn’t beat nostr imo.
Bluesky:
- Identity not tied to instance
- You have to buy and administer a domain name, which is technically complex and costs $10.
- DNS is also subject to censorship by firewalls
Nostr:
- Identity is not tied to an instance
- Your private keys (identity) are generated by your app. No purchase or administration required
- Censorship is much more difficult
Can it federate with fediverse?
No, but some functionality could be bolted onto it for that purpose. But it is a federated network, just within it’s own protocol. Fediverse (Mastodon, Lemmy, Kbin, etc) run on an underlying protocol: ActivityPub, so they can all federate with each other within ActivityPub.
Nostr runs on an underlying protocol also confusingly called nostr. Nostr’s main “interface” is a twitter clone, but the underlying protocol supports things like video streaming sites etc and some interfaces have been built for that purpose.
I’d run it with Docker. The official documentation looks sufficient to get it up and running. I’d add a database backup to the stack as well, and save those backups to a separate machine.
A Pi 4 draws maybe 5W of electricity most of the time. 24/7 operation at 5W will be your cost (approx 44 kWh per year), not including cost of the Pi, your internet connection, and any time you spend on maintenance.
I’m not sure if its true for Mastodon as well, but I read that self hosting a Lemmy instance was actually more work for the other servers to federate unless you had many users on your instance. Just something to keep in mind.
I would not suggest mastodon for such low powered hardware, its also overkill for a personal instance. Akkoma or GotoSocial would work much better on a Pi. The annual cost is pretty much just 3-15$/year for the domain name.
Following along with interest.
Going for Yunohost on your Pi4 can make things easier, just follow the Yunohost documentation, and later you can ask help in the Yunohost forum if needed : https://yunohost.org/en/install/hardware:rpi34 Instead of Mastodon you can install sometimes more light weight and simple, like GoToSocial : https://apps.yunohost.org/catalog?category=social_media
-
Not that I know of, but most likely. If you’re new to hosting, maybe look for automated tools that does the heavy lifting for you - Like how Lemmy can be installed by copying and pasting a single command.
-
Beyond power/internet, you can host for free. Subdomains can be free, I assume you have the hardware and pay for power and internet anyways.
-
A raspberry pi isn’t fit for hosting public services. Your likely looking for a VPS.
Maybe not high traffic services, if it’s being self hosted the limiting factor is probably the upload bandwidth anyway. I’m not sure how resource intensive Mastodon is to host though.
I have a Pi4 running a mastodon branch, the “dreaded capacity hog” synapse and much more. Never had any issues with capacity. I know people who set up Pi’s as CDN relief servers for PeerTube video transfers.
I suppose people have different experiences.