this post was submitted on 15 Sep 2026
110 points (97.4% liked)

Selfhosted

64087 readers
861 users here now

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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. 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.

  8. 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:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

What setups/softwares do you use to secure your server?

All I do is run the process as user with no login shell.

The topic came to mind after reading this post Is Authelia enough without fail2ban or crowdsec?

(page 2) 30 comments
sorted by: hot top controversial new old
[–] j4yc33@piefed.social 2 points 2 months ago

Defense in Depth. I have 4 networks, Home, Testing, Production, Production DMZ. At each layer I use firewalls and NIPS devices. Production and Testing have a SOAR appliance tied to Zeek NDR.

I have a robust maintenance schedule with checks and security patches installed ever 2 weeks. I have everything documented, services are run in their own containers instead of on monolithic servers.

Every system and component are hardened with modified DISA STIGs. Accounts have only the access they need, and everything is well documented for continuity of Operations.

[–] remon@ani.social 2 points 2 months ago

Depends on how secure synology is.

[–] hexagonwin@lemmy.today 2 points 2 months ago

i don't have many servers exposed publicly other than apache2(+freshrss) and opensshd. server runs freebsd and apache2 runs on a jail. nothing special other than that, so i could theoretically get instantly pwned with a openssh 0day.

[–] tatterdemalion@programming.dev 2 points 2 months ago

Secrets

  • Encrypted secrets file. All repo-managed credentials live in secrets/secrets.yaml, encrypted with SOPS/age.
  • Encrypted OpenTofu state. State and plans are encrypted client-side (PBKDF2 + AES-GCM) with a passphrase from TF_VAR_state_passphrase.

Network perimeter

  • Default-drop firewall on the router. I use a hand-written nftables ruleset with policy drop on both input and forward. Only lo, lan0 and wg0 are trusted. WAN accepts only established traffic, WireGuard UDP and HTTP/HTTPS.
  • No SSH from the WAN. sshd on the router is not exposed to the internet at all.
  • WireGuard for remote access.
  • Forced DNS. NAT redirects all LAN and VPN port-53 traffic to the router's AdGuard. AdGuard uses Quad9 over DoT upstream, with blocklists and safe search.
  • Second-level ACL in nginx. Private .home vhosts and Grafana carry allow LAN; allow VPN; deny all;.
  • TLS everywhere. Every public vhost sets forceSSL with recommendedTlsSettings. Certificates come from ACME DNS-01, so issuance needs no inbound port 80. Cloudflare is DNS-only with no proxy, so no third party sees plaintext.

Host access

  • SSH hardening. Password and keyboard-interactive auth are off, PermitRootLogin = "no", and logins are key-only.
  • Dedicated deployer system user. It uses a CI-only keypair, separate from the interactive keys. Everything it does through sudo is logged with LOG_INPUT/LOG_OUTPUT to /var/log/sudo-deployer.log.
[–] Tiger_Man_@szmer.info 2 points 2 months ago* (last edited 2 months ago)

i try to keep it secure by minimalism because the less complicated is the software the smaller is the chance of a vulnerability

so everything related to file transfer/access uses sftp (with accounts with no ssh permissions because: 1. i dont want the password to my server to be stored anywhere in some sftp software 2. im not the only user of this server) and for other services i just run a small local program and remote access it with ssh

i guess the biggest secuity threat is someone physically stealing the backup disk or the main hard drive because theyre both unencrypted

[–] PriorityMotif@lemmy.world 2 points 2 months ago
[–] irmadlad@lemmy.world 2 points 2 months ago

I tend to go overboard on security, or so I've been told.

https://lemmy.world/post/43533409

[–] WrenHavoc@lemmy.dbzer0.com 2 points 2 months ago

For my server, secure enough. Just the basic recommendations, non-standard ssh port, default deny on firewall, fail2ban, etc. It doesn't need a lot of security because its just a static website. For most projects this is enough.

I will say, a honeypot can be useful and I'm getting one set up but its a low priority for me.

[–] littleomid@feddit.org 2 points 2 months ago* (last edited 2 months ago)

There are a couple things that are public. Nothing that’s not containerized in an LXC. SSH is only available with VPN. I once locked myself out after not being at home as we had a blackout, I found no way in after two days and had to get there physically. I think I’m fine.

[–] tired_n_bored@lemmy.world 1 points 2 months ago

I have 3 subnets. One for me, one for family members and one for the publicly accessible services I expose. Each process has limited access to the file system, no root shell and even in the case someone gains full control of it they can't reach other subnets. I use fail2ban too.

For the "me" part, I connect through a VPN. I'd like to run rootless docker services tho, or by using Podman

[–] lch361@discuss.tchncs.de 1 points 2 months ago

Rootless LXC containers, TLS. In my case, I have both VPS and my own hardware, so every sensitive data is hosted on the hardware only.

[–] Mio@feddit.nu 1 points 2 months ago (1 children)

Wireguard VPN. I actually have a public hosted Oracle server that when authentic opens port 443 for that source IP temporary so no VPN will be needed. Computer visit free pub Oracle VM. Android Phone scan QR, start Wireguard and auth that user. Computer can now reach my home server on port 443 and 22 for 24 hours as the source IP is allowed.

I do this instead of crowdsec etc. I expect zero days vulnerabilities that someone will utilize so dont trust nginx and ssh to be wide open.

[–] soyslurper2@lemmy.dbzer0.com 1 points 2 months ago (1 children)

You have Authentik guarding your Wireguard key on a public server?

I'm not sure how this is different from having Authentik on your home server, unless the point is to hide your IP address

load more comments (1 replies)
load more comments
view more: ‹ prev next ›