That was the solution: UFW was blocking internal traffic. Running ufw allow from 172.16.0.0/12 fixed it.
Hello!
So until now, I’ve been self-hosting at home with my own machines, and this is the first time I’m working with a VPS.
I’m running Nginx Proxy Manager (NPM) and my application in separate Docker containers on my AlphaVPS VPS with the IP address 100.100.10.10. I’ve configured UFW to secure my server, and I’m trying to access my application through a domain using NPM, but I’m getting a 504 Gateway Timeout error.
Here’s what I’ve done so far with UFW:
1. Block All Incoming Traffic by Default
ufw default deny incoming
ufw default allow outgoing
2. Allowed Specific IPs
I’ve allowed specific IPs which are my home and work IP:
ufw allow from 100.100.10.11
ufw allow from 100.100.10.12
3. Allowed Ports for Nginx Proxy Manager
I’ve opened the necessary ports for HTTP (80) and HTTPS (443) to be accessible from the outside:
ufw allow 80
ufw allow 443
What I did in Nginx Proxy Manager:
- I created an A record for
sub.domain.comthrough my registrar, pointing to the VPS IP (100.100.10.10). - In Nginx Proxy Manager, I added a Proxy Host for the domain
sub.domain.com, set the IP address (100.100.10.10), and the port of my application inside Docker (e.g., 8000). - I also enabled SSL and requested a new certificate for
sub.domain.com.
Issue:
Even after setting up everything, I’m facing a 504 Gateway Timeout error when trying to access my application through the domain name.
Could someone help me troubleshoot why I’m getting the 504 Gateway Timeout error? I might have done something wrong as my understanding of this is very basic. Could it be a problem with the UFW setup, or is there something wrong with the Nginx Proxy Manager configuration?
Thanks in advance for your help!



Honestly, I don’t know what people expect either, and I do think there’s a fair bit of snobbery and gatekeeping around what this community rightly calls AI slop (and don’t get me started on reddit’s /r/selfhosted lol).
I’ve been interested in code from afar, but my life priorities and passions mean learning to code properly has to take a back seat. That said, I have ideas, I’m rigorous, and I can read and learn. So I use Claude to vibe-code a whole bunch of tools that fill a real gap in what already exists for my hobbies and my two jobs. Whether I use AI or not is my responsibility, and every public repo I have carries a disclaimer about AI usage.
For me, the bar should be: does it work, is it documented, and is the AI involvement disclosed clearly ? If yes to all three, I’m curious enough and big enough to review the repo and try it myself.
Mods here have proposed tags and standards to tell apart projects with varying degrees of AI involvement. Yet the systematic backlash makes me hesitant to share tools that could genuinely help some people, spark ideas for others, or maybe even lead to a collaboration with someone skilled enough to build something exceptional for the community. In my case, AI is a very useful tool, but it only ever produces stuff for me alone.
Which is a shame.