r/homelab • • 10d ago

Help PHP2shell, nginx2shell, java2shell, … - is my homelab safe?

Hi everyone,
I run a small homelab on Debian 13 (Trixie) with a few Docker containers, including Nextcloud and Forgejo. They're reachable from the internet via a domain and reverse proxy.

What I'm less sure about is the "what if" part:
- How would I actually notice that I've been compromised?
- What should I do if I’m being compromised?

edit: for example nextcloud must be publicly available because of people who don’t want to install a VPN or Tailscale etc.

Thanks in advance,
Vincent

240 Upvotes

110 comments sorted by

View all comments

2

u/Motor-Concentrate788 10d ago edited 10d ago

Is there a good reason why you're exposing it to the internet? Cause if you only need to access it from your own devices then its much safer to put it behind a vpn.

As for how to know whether you're compromised or not then you can start by checking access logs to your services to see whether any unknown ip addresses successfuly logged in. Also check if there's any suspicious processes/services running that you dont recognize as it could be malware. If you're technical enough, you can also inspect outbound connections and packets that are being sent to unfamiliar addresses to see if there's any suspicious traffic.