Error

https://www.davx5.com/

You might still have to use a gmail account for this though, depending on if your email works with it.

There's also Nextcloud which would be self hosted.

And the extremely low tech solution of just having them offline in a foss contacts app and exporting backups from that app to your storage in case you lose them.

I've been using EteSync to sync my contacts and calendars for many years now. It's end-to-end encrypted and works well.

Sync to a CalDAV/CardDAV server instead of to Google. If you're up for self-hosting, Radicale is a good and simple one.

I use DAVx⁵ on Android and Thunderbird on the desktop. Other sync clients are listed here: https://radicale.org/v3.html#supported-clients

Try Docker, or if you want to invest a bit more learning time for a huge convenience pay off: NixOS

I use posteo for email and use davx5 to sync contacts and calendars to their carddav and caldav servers.

If you are feeling ambitious and want to go "serverless", try out DecSync and a compatible android app for contact sync. This represents all your contacts as files on disk in a way that avoids conflicts, and you can use SyncThing to keep your devices in sync 100% peer to peer. Unfortunately on your desktop you'll probably have to use something like radicale on localhost and the plugin to convert it into CardDAV for your regular email client to understand.

I got Nextcloud on Hetzner. Technically, Hetzner can see the contacts stored on their servers, but I trust them enough, and everything is open source.

You can also self-host Nextcloud.

Same. Hetzner has a solid business in hosting, they don't make their money from mining my data. They'd hand it over for a lawful request, but the data is not -that- secret and thus possible false accusations aren't really an issue.

I've barely hosted anything and those must have leaked like a sieve. Trusting Hetzner way more.

I use Radicale.

With podman/docker container, behind caddy reverse proxy.

fossify contacts lets you import and export your contacts at anytime to and from a simple file

Nextcloud.

I export my contacts as a file and copy it to my pc, an external HDD and several cloud providers. Anything I store in the cloud is encrypted with Rclone first. There is a nice client available for Android. I don't pay for cloud storage so I only use the free tiers.

I guess this is only practical if you rarely make changes to your contacts.

I would suggest a baikal server: https://sabre.io/baikal/docker-install/it's made from.the ones making radicle and sabre, one of the kost used open source caldav/carddav servers. Yes it can sync calendars too

I have a little python script that (among other things) will maintain an address list in a *.csv file on a Windows or Linux PC. It's a Qt app. The documentation does some handwaving about importing/exporting to Android. See: https://lacusveris.com/Tonto2/Docs/en/index.shtml

Export them as a VCF file and put them on a flash drive.

I wish Flock was still around.

Check out Yunohost. It's a self hosting project built on Debian. It lets you install a bunch of server "apps", including some that will sync contacts for you (Nextcloud, Baikal, My WebDAV).

You can install this on an old computer you have laying around, or on a VPS. Syncing to an Android device you'll need to use DAVx5. Syncing to iOS is actually easier since it has built-in DAV support.

Many mail providers give you access to CalDAV + CardDAV which have a wide array of mature technology to sync contacts, calendars, todo lists on basically all platforms. If you move away from Protonmail as primary, you would get access to this normal service as well as being able to use IMAP without paying & using some middleman application just to use email. I do not pay for a lot of services, but I get a lot of value out of keeping email + CalDAV + CardDAV off-premise with the cost of €1 per month.