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: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
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
Don't require elevated permissions. Either grant the user it runs as permission to that dir, or instruct it to use a different dir that it has access to. Services should have the least permissions possible.
For binding privileged ports like 80 and 443, use CAP_NET_BIND_SERVICE. For access to protected directories, adjust permissions.
At no point should sudo be necessary, that's how you get security vulnerabilities.
I'm much less worried about an attacker messing w/ my certs (that's a pretty sophisticated attack) and more worried about privilege escalation where the attacker gets root access. Caddy is intended to be externally facing, so it'll be getting the brunt of the attacks (like this one that attacks HTTP 1.1). If someone is able to find an exploit to allow remote code execution, being able to run commands with
sudo
is a pretty big deal.That's a big part of why I run my services in containers, and also why I'm switching from Docker to Podman. Docker runs everything as root by default, and it's a pain to run things as non-root. Podman runs everything as an underprivileged user by default, which forces the admin to configure it properly. If an attacker is able to break out of Docker, it'll have root access to the system, whereas if an attacker breaks out of Podman, they'll just have whatever that user's permission is.
If I'm going to expose something to the internet, I want to make sure it's properly configured to reduce the chances of getting a rootkit or something.