Throw a docker container with keycloack and selfhost.
But self hosting is non-trivial. You have to deal with DNS, TLS certificates, configuring Keycloak, data backups, and redundancy.
I set it up once so I could evaluate it. I may yet choose to self host but I'm not under any illusions that it's easier than paying for a service.
Edit: Elest will do it, https://elest.io/open-source/authentik