Selfhosted
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:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
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.
-
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:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
It's very easy to make a custom CA and issue certs. Here's a good tutorial.
Unfortunately in practice It depends greatly on what's on the other side (the client app). Some examples:
Oh did I mention how you get a mTLS client cert to an app on an iOS device? You send it over email to an account that the device has access to through the Mail app, then share the attachment. Yep.
It's also not exactly straightforward to use mTLS with reverse proxies.
Let's take for example Caddy and say you want unconditional mTLS for all reverse proxy hosts. Easy enough:
But suppose you don't want unconditional mTLS, you'd like to let clients in if they have mTLS or a custom header, or do different things depending if the client has valid mTLS or not. Does Caddy offer a built-in conditional to act on mTLS status? Nope!
As a workaround I'm setting the client_auth mode to
verify_if_givenand then using a DIY conditional that checks if the variablehttp.request.tls.client.certificate_der_base64is empty or not. But it's undocumented so who knows if it may break at any point.For reference, how you handle both custom headers and mTLS at once (after setting the mode as I've mentioned):
The nested "not not" is required because Caddy can only do logical AND in group conditionals, so to do logical OR you basically have to do NOT (NOT a AND NOT b).
In caddy, isn't an OR is just two separate blocks?
@authorized { header X-Custom-Pass "LONGRANDOMKEY01" # jim } @authorized { header X-Custom-Pass "LONGRANDOMKEY02" # Bob }
I could be wrong. Caddy config is a dark art.
Lol I don't know, I'll have to try. I would've never thought of it. If it works it's definitely not intuitive. Dark art indeed.