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.com
through 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!