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
You're going to get a lot of bad or basic advice with no reasoning (use a firewall) in here... And as you surmised this is a very big topic and you haven't provided a lot of context about what you intend to do. I don't have any specific links, but I do have some advice for you:
First - keep in mind that security is a process not a thing. 90% of your security will come from being diligent about applying patches, keeping software up-to-date, and paying attention to security news. If you're not willing to apply regular patches then don't expose anything to the internet. There are automated systems that simply scan for known vulnerabilities on the internet. Self-hosting is NOT "set it and forget it". Figuring out ways to automate this help make it easy to do and thus more likely to be done. Checkout things like Ansible for that.
Second is good authentication hygiene. Choose good passwords. Better yet long passphrases. Or enable MFA and other additional protections. And BE SURE TO CHANGE ANY DEFAULT PASSWORDS for software you setup. Often there is some default 'admin' user.
Beyond that your approach is"security in depth" - you take a layered approach to security understanding what your exposure is and what will happen should one of your services / systems be hacked.
Examples of security in depth:
Minimize your attack surface area. If it doesn't need to be exposed to the internet then don't expose it. VPNs can help with the "I want to connect to my home server while I'm away" problem and are easy to setup (tailscale and wireguard being two popular options). If your service needs to be "public" to the internet understand that this is a bigger step and that everything here should be taken more seriously.
Minimize your exposure. Think though the question of "if a malicious person got this password what would happen and how would I handle it?" Would they have access to files from other services running on the same server (having separation between services can help with this)? Would they have access to unencrypted files with sensitive data? It's all theoretical, until it isn't...
If you do expose services to the internet monitor your logs to see if there is anything "unusual" happening. Be prepared to see lots of bots attempting to hack services. It may be scary at first, but relatively harmless if you've followed the above recommendations. "Failed logins" by the thousands are fine. fail2ban can help cut that down a bit though.
Overall I'd say start small and start "internal" (nothing exposed to the internet). Get through a few update/upgrade cycles to see how things go. And ask questions! Especially about any specific services and how to deploy them securely. Some are more risky than others.
Wow, thank you so much for taking the time to answer. I really do appreciate it.
Going off of what you said, I am going to take what I currently have, scale it back, and attempt to get more separation between services.
Again, thank you!
Happy to help.
Containerization and virtualization can help with the separation of services - especially in an environment where you can't throw hardware at the problem. Containers like Docker/podman and LXD/LXC aren't "perfect" (isolation-wise) but do provide a layer of isolation between things that run in the container and the host (as well as other services). A compromised service would still need to find a way out of the container (adding a layer of protection). But they still all share the same physical resources and kernel so any vulnerabilities in the kernel would potentially be vulnerable (keep your systems up-to-date). A full VM like VirtualBox or VMWare will provide greater separation at the cost of using more resources.
Docker's isolation is generally "good enough" for the most part though. Your aggressors are more likely to be bot nets scanning for low-hanging fruit (poorly configured services, known exploits, default admin passwords, etc.) rather than targeted attacks by state-funded hackers anyway.