Degoogling: moving personal gmail to self-hosted open source email

I have been spending some time seeing how it feels to move from google to self-hosted open source. If degoogling yourself or your organization is on your radar, I’d love to help. Please reach out!

The tl;dr[1] is that degoogling is a project. It’s important to do, fully possible, and you can get started on it right away. The good news is that open source tools have improved massively since the last time I self-hosted my email 20 years ago. The bad news is that if you have been using google alot and for a long time, moving your data can be a manual and time consuming process. You also have to get used to doing everyday things using new, possibly unfamiliar apps. And you need to be willing to tinker and figure things out, or know somebody like me who can help you.

My tech stack[2]:

  • Hetzner - low-cost cloud hosting, all servers in Finland
  • Mailinabox - turnkey, self-hosted mail server with few configurable parts
  • Nextcloud - have been using this for years, turned on talk and calendar apps
  • imapsync - linux shell scripts for migrating email
  • Apple mail, calendar, contacts (on all my devices, connected to mailinabox and with icloud sync disabled)

As of today:

  • new self-hosted email on my own domain is fully operational
  • static site up and running, including contact form and “meetme” page for scheduling calls with me via nextcloud
  • video calls hosted using nextcloud talk have been working great so far
  • email migration from gmail is still underway after several days (I have 20 years of email! should have done more cleanup beforehand)
  • Apple mail, calendar and contacts all working using my self-hosted setup
  • new email to gmail is forwarding to my new email, and is being deleted
  • daily incremental backups of mailinabox and nextcloud are running
  • my family is still sharing calendars on google
  • google drive contents are still on google. Working through that is going to take longer and I have deferred that for now.

For an existing organization to degoogle, it will be the same task multiplied by the number of people in the organization. The number of years with google and the extent of dependence on google drive are also factors. So the team will have to block out time to discuss the changes, make plans, and then roll up their sleeves and get to work. I’d love to help you with that.


  1. “too long; didn’t read” - techie term for short short version ↩︎

  2. Fancy way to say “tools I use” ↩︎

I’m a week in now and have settled into my new routines using apple Mail for accessing my email and calendar, and have started sending and receiving email from my new email address.

Some things I noticed:

  • The migration of my email from gmail is complete, but it took a long time! If I were to do this again, I would spend a few hours cleaning up/deleting messages from my gmail first. There may also be other, easier approaches depending on how many folders you have that you want to retain. I have a full backup that I can import to my apple Mail directly if I wanted to or if I am concerned about not having access to my full archive for searching. I lose the folders but that may not matter for searching.
  • To address concerns about email sending not working, I could use mail-tester.com. That site lets you grab an email address to send an email to and then check if there are any issues.
  • Some people I correspond with did say my email landed in their spam folder. This is expected for an email address on a new domain. I ask everyone to please mark it as not spam to help train their email providers to accept email from my new address.
  • mailinabox provides a fantastic link to automatically set up your email, calendar and contacts, which worked perfectly!

    iOS and macOS only: Open this configuration link on your iOS device or on your Mac desktop to easily set up mail (IMAP/SMTP), Contacts, and Calendar. Your username is your whole email address.

  • I disabled icloud sync on all my devices for mail and calendar. You may want to keep contacts syncing because of convenience. Other items on your phone you can also disable if you decide to use nextcloud which can sync your files and photos for you.
  • The Mail user interface is very different and apple-like, making some settings and features hard to find. For instance copying my email signature over was surprisingly hard to do. And I had to do it separately on my phone and laptop which was a little frustrating.
  • Exporting my calendar from google and importing it to apple’s calendar (using my mailinabox calendar) was fairly straightforward.

Mailinabox provides a turnkey version of nextcloud but you do not have to use it for anything and I will not because I have my own, separate nextcloud instance which is on a more powerful server and has more features (including talk, for video conferencing) and I prefer to use that.

However, if you want to use your own separate nextcloud for allowing people to schedule meetings with you as I do, you have to subscribe in your nextcloud calendar to your mailinabox calendar so it knows your availability and then also subscribe to your nextcloud calendar in apple Calendar so you can see the scheduled calls. This can get a little confusing so I might write it up as a separate learning.

One learning is that emails from my tobiaseigen.org domain actually are being greylisted and sent to spam. This is happening because my domain name is new (I just registered it in January) and so it does not have a strong reputation yet.

This is not something that I would expect to be a problem for an organization moving their existing domain from Google Workspace to a self-hosted Mailinabox server, but it’s worth keeping in mind as a risk and also as a reason why emails might be delayed or not getting responses. After making a change like this it’s worth being vigilant to make sure things are working as expected.

I found out about my emails were going to spam when I followed up via other channels with some people I wrote to and had not yet heard back from. They confirmed it and marked my messages as NOT SPAM to help train their email providers.

The greylisting is also a bit annoying but not so bad. The emails do eventually arrive. In one case, my emails to my Discourse co-conspirator Bhanu Sharma were delivered several hours later than the original send time. He uses icloud and suggested I reach out to Apple support to ask them to remove my domain from their greylist which I will do.

My mailinabox also provides greylisting and I am finding myself that I am getting much less spam than I used to on my gmail account. The only times it is a bit annoying is when I am signing up to a site that is on a domain that is greylisted. So far I’ve not had to wait more than 15 minutes for the email.

Started a Troubleshooting topic about greylisting for future reference.

1 Like

It’s now been just over a month since I moved to self-hosted email on my own domain, and while the journey has not been altogether smooth I am feeling very good about it.

Last week I decided to move from mailinabox to mailcow, for reasons:

One compelling benefit has been that Mailcow provides a web interface for imapsync, which I used to migrate my mailbox from google to mailinabox. Imapsync worked great but with a web interface it is even better! I really look forward to using this to help organizations move from google to self-hosted.

The move did add some bumps in the road, mainly that google was not happy with it and paused delivering mail from its servers. That has now been resolved and the missing emails all were delivered today. More on that experience in that topic for the intrepid.

Another part of degoogling that has been valuable to me is that it’s given me the opportunity to tidy up all my subscriptions and memberships on an ongoing basis. Those few that I want to keep I changed my email address, and then unsubscribed from the rest. I even found one paid subscription today that I was able to cancel!

Intriguingly, anthropic doesn’t allow changing email addresses so I had to cancel my account there. When it runs out of tokens I will start a new account using my new self-hosted email. This is another reason to use Discourse AI - I would otherwise have lost everything I created to date with anthropic! :exploding_head: And yet another example of how big tech makes it hard to leave big tech.

Another odd one was ridwell.com - I had to email them to ask for my email address to be changed. So antiquated! Ridwell is a paid subscription service I use to augment my recycling abilities. Every two weeks they pick up recycling items that otherwise go in the trash. I love the service and it’s so forward thinking and planet friendly, but they do need to update their membership platform!

I will not be deleting my gmail account, at least not for a while, because there are going to be things I need it for that I have not anticipated. But I have successfully migrated my email to my self-hosted server and deleted all the email from my gmail account!

:person_lifting_weights:

This weekend I finally took the step of deleting the kabissa.org google workspace account. This felt strange but also liberating!

Strange because it’s free and it was helpful to be able to use it for testing things and as a reference when helping former Kabissa members with their domains, but also liberating because it was one of the last vestiges of the organization I that has not been in operation now for quite a number of years and it makes no sense to keep the account and all its associated data on Google’s servers. This is degoogling! :flexed_biceps:

To ease the decision, I did two things:

  1. Took advantage of Google Takeout to take a full backup of all accounts on the domain. This provides you with a handful of compressed files which you can store locally along with your other local backups. One of them contains all the email which can be opened locally using the open source mozilla thunderbird email client.

    Google docs, sheets and so on would be harder to deal with but that is not a big issue for Kabissa because for the duration of the organization’s history we mostly used a server in our office for storing our files and rarely used google apps.

  2. Used mailcow’s sync tool to import the main mailboxes I still refer to occasionally into sub-mailboxes on my main email account. It’s amazing that when searching my email now I can pull up emails going back to 2000!

    I did run into an odd conflict with the nextcloud password manager’s firefox extension and the mailcow sync tool. It was overriding the “Username” and “Password” fields to sync from. It took me a while to figure this out but once I did the sync went smoothly.[1] It was surprisingly fast and reliable!


  1. Reported to mailcow and nextcloud support forums for the benefit of future travelers, and in case they want to fix it ↩︎