Our great sponsors
-
awesome-selfhosted
A list of Free Software network services and web applications which can be hosted on your own servers
-
caddy-auth-portal
Discontinued Authentication Plugin for Caddy v2 implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication. MFA with App Authenticators and Yubico.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I've recently taken an interest in self-hosting simple open source applications — to have fun, take control of my privacy, and learn more about Linux, Docker and DevOps!
I hope this post helps setting up your SSO with Caddy. I'd highly recommend trying it out if you find yourself always needing to authenticate with different services on your domain – and check out caddy-auth-portal's docs for even more advanced features!
There's a caveat though: one of your subdomains/routes needs to be marked as primary yes (for reasons explained here), but the sso snippet we defined didn't have this. So, you'll need to copy and paste the config into one of your routes and add primary yes before you can just use import sso in the rest.
In Caddy v2, there's a pre-set order of precedence for directives. See this issue on GitHub for more details.
Related posts
- Moving reverse proxies
- Has anyone tried the auth-portal Plugin for Caddy?
- Narrowing down the awesome selfhosted list
- greenpau/caddy-auth-portal : Authentication Plugin for Caddy v2 implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication
- Testers Wanted – MFA Apps with Caddy v2 Authentication Portal