this post was submitted on 12 Nov 2026
134 points (96.5% liked)

Selfhosted

64018 readers
507 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

This Microsoft outage being the last drop in the bucket, I'm looking to get my email/calendar/contacts somewhere under my control.

As I already self-host a number of things (e.g. my Linux ISO collection), and have services exposed to the internet, it would make sense to run it at home.

After all, it's not heavy lifting. It's not hosting 500+ mailboxes for 100+ people. It's just little old me, with a handful of domains, catch-all receiving and a few dedicated sending addresses.

However email is a bit more mission critical than my smarthome control or self hosted LLMs. Downtime could be critically bad, and I still don't trust my home setup to be truly 99.999999% available.

I don't mind paying for a service but if I do I'd prefer something European, given I'm based in the UK (and otherwise am an EU citizen).

I'm really curious how y'all solve it. I guess I'm interested in some kind of hybrid solution where there's my own server and a hosted service, latter which acts as a backup solution, but still fully synced, so if my internet or power goes out (or my server goes down), I can still get mail sent and delivered.

So I'm not only just interested in the stack you run for email but the entire infrastructure, especially if you've solved this sort of off-site fallback service.

top 50 comments
sorted by: hot top controversial new old
[–] 31ank@ani.social 75 points 1 week ago* (last edited 1 week ago) (4 children)

Mail is something I don't want to touch. I use mailbox which is hosted in germany for some years now. For calendar & contacts I use the built-in Nextcloud apps, they also work pretty well

Edit: I self-host Nextcloud, so contacts & calender are on my private server

[–] Esjott@feddit.org 14 points 1 week ago (3 children)

Same here in terms of don’t want to touch mail. I use migadu, swiss company hosting in france. Works flawlessly. There was a good blogpost some time ago comparing mail services, let me check.. there it is: Blogpost

load more comments (3 replies)
load more comments (3 replies)
[–] tacogoon@lemmy.world 36 points 1 week ago* (last edited 1 week ago) (2 children)

I've self-hosted email for over 20 years but I'm now moving to Fastmail for two reasons: (1) succession, I'm the only one in my house that understands how it works, and (2) email is never fully under your control and the large providers may decide to filter/drop email from your domain. But this is self-hosted, and I did enjoy my years doing it, so go for it if you want. I had good luck with OpenBSD/OpenSMTPD/Dovecot stack. Good luck!

Edit: I forgot to mention you can do a hybrid approach; handle receiving yourself and use a service like smtp2go.com to do delivery.

[–] smorks@lemmy.ca 6 points 1 week ago (1 children)

I've been using smtp2go for the past 2 ish years for outbound email, and it's been great! I have no complaints.

load more comments (1 replies)
load more comments (1 replies)
[–] SHY_TUCKER@lemmy.ml 23 points 1 week ago* (last edited 1 week ago)

I own a business. We hit 9 years in September. When we started we did O365. At that time, a business as small as us had to go with a Microsoft "partner" because MS wasn't going to deal with a business as small as us. We were immediately "man in the middle" hacked. We'd been in business 3 months and someone was grabbing our incoming emails and replying as if they were us. We had no idea. They changed payment terms and re-routed our checks as direct payments to some digital accounts in Miami (USA). I have no doubt that it was our Microsoft "partner" that set us up with O365 and Lync (this was a long time ago). When we pressed Microsoft about it they became totally unresponsive or nasty. We lost about $25,000 dollars right at the very beginning of our business. It was a very dark time for me. But, honestly, that was the best $25K I ever spent. Talk about "attack Surface".!!! Now I do Fastmail, Nextcloud a nd other self hosted services. I am absolutely convinced that losing $25k was an absurd bargain. People on O365/ SharePoint/Teams get hacked every fucking day. But they don't tell you about it.

[–] i_stole_ur_taco@lemmy.ca 19 points 1 week ago (1 children)

Self-hosting email is like making your own butter.

It’s possible, but most people don’t want to take it on themselves.

Calendar and contacts I’d argue are good candidates to self host. If a config is off and you can’t access them for a day or two, does it matter?

But if email is down, you risk missing something important. If you have a trust issue and everything you send is getting flagged as spam? Hard and slow to fix.

If the problem you’re trying to solve is Flaky and Unethical Big Tech, I would look at finding another, smaller provider and paying for it. Rolling it yourself is a great way to learn entirely too much about mail servers and spending way too much of your free time on it.

[–] pHr34kY@lemmy.world 2 points 1 week ago

Servers retry delivery. It needs to be offline for a while before you miss stuff.

Receiving everything is the easy bit. It's sending that's hard. Every recipient is looking for a reason to spambox you.

[–] tatterdemalion@programming.dev 16 points 1 week ago (1 children)
  1. Get cheap Hetzner VPS with redundant volume.
  2. Get a domain name.
  3. Run Stalwart for you mail server.
  4. Run Bulwark for your inbox web app.
  5. Run Kanidm for an identity provider.
  6. Configure these DNS records: MX, SPF, DKIM and DMARC

There are more details, but those are the basics.

[–] Squizzy@lemmy.world 3 points 1 week ago (4 children)

Are there issues with domains not being accepted?

load more comments (4 replies)
[–] Shimitar@downonthestreet.eu 16 points 1 week ago* (last edited 1 week ago)

I host my email, just not at home but on a rented server.

Here I documented it all https://wiki.gardiol.org/4-e-mail-hosting

It works, its been working for decades now. Never had significant issues....

Email is quite resilient. Servers keep trying to send again and again messages for hours before they give up... So a backup server is not even really required.

[–] drkt@scribe.disroot.org 11 points 1 week ago* (last edited 1 week ago) (1 children)

If incoming emails bounce, normal email servers will see that and retry later. Not that I personally deal with email- I outsource it to Disroot.org :)

[–] MuttMutt@lemmy.world 4 points 1 week ago (1 children)

Went to look since I had never heard of it. Found this, lol.

[–] drkt@scribe.disroot.org 2 points 1 week ago

Yes, unfortunate timing on my part, but my inbox has been unaffected because I don't store emails long-term and evidently I'm here, on their instance. It sounds way worse than it is.

[–] smiletolerantly@awful.systems 10 points 1 week ago (1 children)

I'm hosting my own, on a dedicated Hetzner server (used for a bunch of stuff, "dedicated" as in "only me on the hardware"), using nixos-mailserver.

I've a 10/10 score on all the spam tests / deliverability tests I could find. The only deliverability issue I've ever had is t-online, but only because they require you to apply for being allowlisted, lmao. (Was one quick email to do that though, so... fine.)

It's been a couple of years of smooth sailing now, so I'm not super worried anymore; esp. in the beginning though, it was a bit anxiety-inducing (and I did cause some downtime by fucking up my bootloader and needing a KVM from Hetzner at one point, that was a very sweaty evening not least because the email address I had put for contact info was, well, handled by the server that was down. Btw Hetzner email you the link to your KVM. Fun times!).

Anyways: I'm really happy with my setup now, in all aspects. Calendar and contacts self-hosting is also great.

But, just so you know: you will not be able to do this on your residential IP. Doesn't matter how hard you try, it will not work. You'll be able to receive emails no problem, but if you're lucky you'll end up in people's spam folder. More likely, the recipient server will just outright reject or discard your mail.

[–] Gonzako@lemmy.world 4 points 1 week ago (2 children)

How much do you spend on the hetzner service?

[–] smiletolerantly@awful.systems 6 points 1 week ago (1 children)

~46€/month for the server via their server auctions (triple 512GB SSDs in a zpool, 64GB RAM, i7-7700, in their German datacenter with unlimited Gbit internet.... not too shabby!) . Unfortunately, looking at them now, they've shot up in price (wonder why... 🙄).

That's overkill though. As long as you can get something with full root access and a dedicated IP (which includes their VPS offerings, I am pretty sure), you're good.

I know everyone is already glazing Hetzner, but let me just add to the pile... I've been customer at a lot of (mostly web, sometimes vps)-hosters over the years, but I don't think I'll ever switch away from Hetzner again. Even if they raise prices further. They give you full control, don't try to upsell, and more importantly, have excellent support.

As others have mentioned, hosters often block outgoing email ports. This includes Hetzner. Sent them an email, 5min later, ports are open. Need a KVM? Press a button, it'll be ready in a couple of minutes, once a technician has walked over to your machine and plugged it in. Are you as stupid as I am and have no access to the email account receiving the KVM link? Call support, no queue, immediate problem resolution. One of the SSDs looks like it's gonna give out soon? Press a button in the dashboard, a technician will come around in a couple of minutes and swap the drive, free of charge.

IDK it just feels like I'm getting enterprise support for consumer prices.

Also I just now realize you only asked for a price, so everything beyond the first sentence is just me rambling.

[–] tatterdemalion@programming.dev 3 points 1 week ago (1 children)

I sure hope you're using that for a lot more than email.

[–] smiletolerantly@awful.systems 4 points 1 week ago

Yes, I am 😄

Though I originally did get this for email. Wanted a dedicated server with triple SSDs for redundancy, and the i7+64G was the cheapest option!

Ah, different times.

But yes, I'm regularly maxing out CPU + RAM for hours on end.

load more comments (1 replies)
[–] tburkhol@lemmy.world 9 points 1 week ago (1 children)

My domain's mail is hosted at https://purelymail.com/ $10/year. They seem to run on AWS hardware, so it's not free of US big tech. It's dirt cheap, but I've never had any problems, either receiving or sending. They have very clear instructions for getting your domain's mail set up.

load more comments (1 replies)
[–] eksb@programming.dev 9 points 1 week ago

I have run my own mail server for 20+ years. I set up everything correctly, including DKIM and DMARC. I have had the same IPs for 10 years. I send <100 emails a month. A few years ago Google started putting most of my emails in spam, and Microsoft started silently deleting them. They will not fix it. I had to start paying for a relay for outgoing messages.

Use migadu.com.

[–] manwichmakesameal@lemmy.world 8 points 1 week ago (1 children)

I repeatedly see people saying "don't host your own mailserver". So what are we supposed to do? Just give up and let megacorps own all of our mail? I get it, it goes to those servers anyways. F-that. I'm not giving up yet another service to them. Personally, I have a VPS with racknerd and use docker mail server. Been using it for a couple years now and no issues so far. Just make sure your DKIM/SPF records are good.

load more comments (1 replies)
[–] lntl@lemmy.ml 7 points 1 week ago

Email/calendar/contacts on EU server: posteo.de

They support IMAP and DAV

[–] BeigeAgenda@lemmy.ca 6 points 1 week ago

One thing you should know, the SMTP protocol is designed to work with intermittent network connections like modem, each email has several days of grace period, with many retries, so you don't need 99.999% uptime.

[–] dihutenosa@piefed.social 6 points 1 week ago (2 children)

I self-host it with https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.

  • I had to set it up with all these SPF and DKIM and DMARC stuff. Wasn't too hard, just follow the guide. Test with GMail - the message details view says exactly what you have, what you haven't, and what's wrong.
  • Every now and then I have to jump through some hoops to get my IP allowlisted in some weird provider or antispam system.

Email is a very old protocol, it originates from the time when computers were connected only occasionally. It is very much possible to come an agreement to power up the antennas at something o'clock every day to exchange emails, and the rest of the time they just sit in the queue.

Practically speaking, if your home lab is down for something like 12h, it should not impact email delivery much at all - the sending servers would just keep retrying. Usually for 48h. From https://www.rfc-editor.org/rfc/rfc5321#section-4.5.4.1

mail that cannot be transmitted immediately MUST be queued and periodically retried by the sender.

The sender MUST delay retrying a particular destination after one attempt has failed.

Retries continue until the message is transmitted or the sender gives up; the give-up time generally needs to be at least 4-5 days.

Microsoft documents this: https://learn.microsoft.com/en-us/defender-office-365/mail-flow-about#mail-flow-delivery-faq

Deferred messages remain in our queues for one day.

I guess technically they're RFC-compliant, but 1 day is not as much as I'd like...

load more comments (2 replies)
[–] Brewchin@lemmy.world 5 points 1 week ago

I self-host a metric fuck tonne of services and (with my extensive email background) I choose to outsource my email services.

You CAN do it today. But should you? Given DMARC, SPF, etc... No.

Since I left Gmail's free GAFYD feature, I moved to Fastmail (Australian) years ago. Does it cost money? Yes. Does it do everything I want? Yes. Does it have features Google would never provide? Yes.

Do I have any reservations or regrets? No.

[–] Ooops@feddit.org 5 points 1 week ago

I use Radicale for my calendars and contacts as basically every program, app or device can handle caldav/carddav.

Self-hosting email however is too painful. Not that it isn't easy on principle... but because the basics are simple all the big mail providers have developed a lot of ways to automatically filter out all those quickly put up mail servers mainly used to distribute spam. So having your own mail server while also constantly jumping through all the hoops so your mails are actually received is barely worth it.

[–] Blackmist@feddit.uk 5 points 1 week ago

Iirc hosting your own mailboxes is easy. Making sure others can actually get your sent emails is a pain in the arse. It's a cartel.

[–] gedaliyah@lemmy.world 5 points 1 week ago* (last edited 1 week ago)

Best I can figure, choose a company that has well established general hosting services and get email through them.

It's going ro be really interesting to see if Thunderbird is able to make a good alternative. I really like the direction they are going, but time will tell if is sustainable for them and users alike.

Personally, I'm using Hostinger, which is reasonable and reliable.

Some people are relying on specialty private email providers like Proton or Tuta, but I have a big dose of skepticism. Lots of people are canceling their Proton subscriptions, and Tuta depends on using their clients because of the secure way it's built.

I would not be interested in attempting to self-host email. The service itself is trivial for an experienced network person (which I'm not), but the big picture is impossibly complex. There is a complicated and somewhat opaque reputation system that will arbitrarily block a lot of self-hosted email services. Some people have found ways to make it work, but it always seems pretty tenuous to me.

As far as email archiving, I highly recommend self-hosted Bichon, which I have run for a while and love it. I keep a few months of email locally, and the rest is on my server backup. It's straightforward to setup and use, fast searches, easy automations, etc.

As others have said, radicale is excellent for hosting calendar and contacts through CalDAV and CardDAV. I've used it exclusively for a while and never had an issue. The formats are pretty standard, so you more or less get your choice of client on any system.

[–] DrunkAnRoot@sh.itjust.works 5 points 1 week ago

I use mailbox.org but if you have your heart set on self hosting id say stalwart is a good selfhostable email service

[–] lsjw96kxs@sh.itjust.works 4 points 1 week ago

Mail is a piece of software I won't bother self-hosting. I already tried, put in it a lot of time, trying to get my IP address considered safe because it was banned 15 years before I had it, to only have a third of my mail sent successfully received. It is not worth the effort and I switched to proton and recently to infomaniak.

[–] ApocolypticGopher@infosec.pub 4 points 1 week ago

Not selfhosted but I've been a happy MxRoute user for a few years.

[–] Decronym@lemmy.decronym.xyz 4 points 1 week ago* (last edited 1 week ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
IMAP Internet Message Access Protocol for email
ISP Internet Service Provider
NAS Network-Attached Storage
SMTP Simple Mail Transfer Protocol
SSD Solid State Drive mass storage
TLS Transport Layer Security, supersedes SSL
VPS Virtual Private Server (opposed to shared hosting)

[Thread #167 for this comm, first seen 12th Nov 2026, 22:40] [FAQ] [Full list] [Contact] [Source code]

[–] TheMightyCat@ani.social 4 points 1 week ago (2 children)

I host my email on a hetzner VPS using dovecot+postfix and thus far no issues.

I don't really understand why people are so against it, for me it took an evening to set up and haven't touched its configuration since.

[–] IsoKiero@sopuli.xyz 2 points 1 week ago

I do excactly this too. My personal domain has been around since 2008 and my setup has a few domains from friends too. I'm running ispconfig to manage the whole mess and it's really not that difficult. Getting your server removed from blocklists every now and then is annoying but at least my emails aren't feeding some marketing machine and, at least for the last 24 hours, my service availability is better than Microsoft can do.

load more comments (1 replies)
[–] Nomad@infosec.pub 3 points 1 week ago

I built a system to solve all that. Completely Foss. I'm self employed and needed it for my work. Davx for carddav, caldav, tasks etc. Email via postfix/dovecot and sogo for web interface and syncing. All working seamlessly for any custom domain. I give these out to my bigger customers usually as a free addon. But it's realiable and safe and hosted in Germany (not at home) with offsite backup in the Netherlands. How much space are you looking for?

[–] irotsoma@piefed.blahaj.zone 3 points 1 week ago* (last edited 1 week ago)

I host a mailcow instance. Had some issues getting the IP address the VPS assigned me removed from some blacklists, and some companies whitelist email domains and only let you get their emails if you use outlook, gmail, etc., but those are few. Unfortunately it's often medical stuff that thinks they're being "secure" by only sending mail to systems that steal your private data for profit, but not much you can do. And that happens with any email software if you use your own domain as your email address.

[–] tremble5218@programming.dev 3 points 1 week ago* (last edited 1 week ago) (2 children)

Instead of hosting your own mail server, use a service like SimpleLogin. It allows you to configure custom domains on the paid plan and it simply redirects any email sent to an email alias to your actual inbox. So you never share your actual email address. Secondly, if tomorrow you change email providers, all you have to do is change the destination behind those aliases for the custom domains. It also does catch-all aliases so you can make them up on the fly.

load more comments (2 replies)
[–] comrademiao@piefed.social 3 points 1 week ago

Thank you for posting this as I was not being able to access my work email was some internal issue. I would never have know as I cannot receive an update email!

[–] 0x0@infosec.pub 3 points 1 week ago

I picked mailbox.org, configured it once and havent thought much about it since then, almost 2 years ago now

This post was a great reminder, i should probably reup my subscription soon..

I moved away for self hosting email, but my advice would be to look at anti spam providers. Most can act as both an incoming and outgoing filter for your emails, and will hold on to email if your mailbox host is down. It also means for outgoing you don't need to warm up an IP to have your messages accepted.

Of course you still need to setup SPF/dmarc/etc but it takes out some of the fuzzier parts of email deliverablity..

[–] cadekat@pawb.social 3 points 1 week ago (4 children)

Receiving email isn't too bad. Get a domain, set up dovecot and postfix, maybe a web frontend if you care. They're in basically every distribution's repos. I'm sure there's a mess of containers for it too, if that's your thing. Just have to make sure your ISP doesn't block port 25.

Sending email, however, is a different beast. You need to have a stable, clean, IP address. Then setup all the extra stuff on top (DKIM, SPF, etc.)

Your dynamic IP from your home ISP isn't going to cut it. If you can get a static IP, it might work, otherwise you need a tunnel or to host everything in the cloud, somewhat defeating the point.

Once you have a stable IP, and have the proper DNS records/certs set up, you begin the battle of getting your IP allowlisted. If you're lucky, the IP will be clean-ish and not flagged. If it's flagged, you're basically screwed and need to get another IP. Then you have to test sending email to all the big providers and contact the ones that don't allow your messages through. It's a long process. It's possible, but tedious.

I ran my own mail server for three years. It was fun, but also a lot.

[–] crandall@lemmy.today 2 points 1 week ago* (last edited 1 week ago)

Than you for this detailed explanation! Been trying to wrap my head around all this and this made it much clearer.

Makes me think twice. I have a "static" IP from my ISP but I have no real guarantee that won't change at any time AFAIK. Making sure each provider accepts it and troubleshooting that sounds like more then I'd want to take on for now. I think for me the key is to switch to a custom domain so I can change providers or decide to self host later without changing my address.

load more comments (3 replies)

I don't think they're European, but I pay NameCheap for email service. Local clients access via IMAP.

Spam filtering is mostly done via Thunderbird on my laptop.

Calander and contacts I do though Nextcloud.

[–] lemmyvore@feddit.nl 2 points 1 week ago* (last edited 1 week ago)

TLDR: "How do you self-host email" – that's the thing, I don't. I don't host email sending and receiving myself, just the archive.

Here's a starting point for EU-based providers. If you give more details about your needs (how many mailboxes etc.) we can advise or recommend.

My main criteria is access through regular IMAP/SMTP without any made-up hurdles (cough Proton "email bridge").

Based on your need for email + calendar + contacts I'd say mailbox.org is a likely candidate. Please note that you pay separately for each mailbox (distinct login) but you can establish a "family" relation between accounts for sharing data.

What I do personally:

  • Self-host a CalDAV/CardDAV server (Radicale) for calendar/contacts.
  • Use a regular email provider (Migadu) with my own custom domains.
  • I access the live mailboxes via IMAP from various email clients (desktop, phone etc.)
  • Same for sending, use the provider's SMTP.
  • I use mbsync aka isync to fetch a copy of all email to my server and delete messages older than 30 days from the live mailboxes.
  • I self-host a private IMAP server and webmail mainly for browsing and searching this mail archive. I don't send from this webmail (although I could connect it to the live SMTP if I ever wanted).

If I ever need to switch providers I can do it as fast as I can sign up / pay with someone else and all it takes is updating the IMAP/SMTP server address on the various clients, and the DNS records for my email domains. Nothing else changes about the setup.

Why Migadu: they have a pricing model where you pay for storage and emails sent/received but can otherwise have unlimited domains, aliases, mailboxes, logins etc. It can become price-efficient very rapidly if you use it for 2+ people and/or have multiple email domains because this is exactly where regular providers corner you – they tax per mailbox, per domain, if you want more than a handful of aliases etc.

[–] gopher@programming.dev 2 points 1 week ago* (last edited 1 week ago) (2 children)

I run mailcow on a vps on a smaller, reputable, European host. I started out with Hetzner but there I had problems with delivery due to a bad neighbourhood. It really helps with a host that cares and take abuse seriously.

After moving it's mostly been good. I don't have any issues with outgoing mail, all seems to land fine on both gmail/outlook etc. It's pretty low effort, just need to stay on top of upgrades since there are internet exposed services.

Here is also a good post about best practice for smaller servers: https://bridge.grumpy-troll.org/2020/07/small-mailserver-bcp/

I have a filter that encrypts all incoming mail with my pgp public key, for added security (this is not bullet proof as it has to sit after rspamd but should make it harder to read any mails in case of any kinds of breaches).

load more comments (2 replies)
load more comments
view more: next ›