External App Proxy Setup Causing Nginx Auto-Restart Help with Reverse Proxy Architecture?
-
Hi Cloudron community,
I’ve hit a bit of a snag while working through a custom setup involving an external reverse proxy and Cloudron app deployment.
Here’s what I’ve done so far:
- Configured a second VPS running an external reverse proxy (via Nginx Proxy Manager) to forward certain subdomains to my Cloudron instance on a primary VPS.
- Followed a pattern similar to the "Deploying Anubis (AI Crawler Filtering)" setup creating Docker Compose stacks on the proxy server, including a Redis container for session and metrics support.
- Used REDIRECT_DOMAINS in Anubis (the proxy component) to map Cloudron subdomains (e.g., app1.example.cloud, app2.example.cloud) properly.
Everything appears correct, but the issue is: Nginx keeps restarting intermittently on the proxy server causing 502 / gateway errors when users hit certain Cloudron-hosted apps.
Here’s what I’ve tried:
- Double-checked the nginx.conf for syntax errors nginx -t shows no problems.
- Validated SSL certificate settings for *.example.cloud, with Let’s Encrypt configured and working.
- Confirmed Cloudron apps are healthy and listening correctly when accessed directly (not via the proxy).
- Ensured both VPS firewalls (UFW on VPS1 and VPS2) allow traffic on TCP 443 and 80, plus internal management ports.
A few questions I’m hoping the community can help with:
- Has anyone seen Nginx auto-restarting in this route-proxy setup, and what diagnostics helped (e.g., journalctl, Docker resource limits)?
- When routing Cloudron subdomains through a proxy, are there specific headers, health checks, or Nginx tuning parameters that are essential?
- Is there a better architecture approach like using Cloudron’s built-in reverse proxy instead or a more crash-resilient pattern for handling incoming traffic?
I want to nail down a stable and secure proxy layer without disrupting Cloudron’s internal routing.
Thanks in advance for any insights or experiences you can share!
Mark Pousee
-
Hi Cloudron community,
I’ve hit a bit of a snag while working through a custom setup involving an external reverse proxy and Cloudron app deployment.
Here’s what I’ve done so far:
- Configured a second VPS running an external reverse proxy (via Nginx Proxy Manager) to forward certain subdomains to my Cloudron instance on a primary VPS.
- Followed a pattern similar to the "Deploying Anubis (AI Crawler Filtering)" setup creating Docker Compose stacks on the proxy server, including a Redis container for session and metrics support.
- Used REDIRECT_DOMAINS in Anubis (the proxy component) to map Cloudron subdomains (e.g., app1.example.cloud, app2.example.cloud) properly.
Everything appears correct, but the issue is: Nginx keeps restarting intermittently on the proxy server causing 502 / gateway errors when users hit certain Cloudron-hosted apps.
Here’s what I’ve tried:
- Double-checked the nginx.conf for syntax errors nginx -t shows no problems.
- Validated SSL certificate settings for *.example.cloud, with Let’s Encrypt configured and working.
- Confirmed Cloudron apps are healthy and listening correctly when accessed directly (not via the proxy).
- Ensured both VPS firewalls (UFW on VPS1 and VPS2) allow traffic on TCP 443 and 80, plus internal management ports.
A few questions I’m hoping the community can help with:
- Has anyone seen Nginx auto-restarting in this route-proxy setup, and what diagnostics helped (e.g., journalctl, Docker resource limits)?
- When routing Cloudron subdomains through a proxy, are there specific headers, health checks, or Nginx tuning parameters that are essential?
- Is there a better architecture approach like using Cloudron’s built-in reverse proxy instead or a more crash-resilient pattern for handling incoming traffic?
I want to nail down a stable and secure proxy layer without disrupting Cloudron’s internal routing.
Thanks in advance for any insights or experiences you can share!
Mark Pousee
@markpousee have you already set the proxy server as a Trusted IP on cloudron - https://docs.cloudron.io/networking/#trusted-ips ?
Though, I cannot think of why nginx is automatically restarting . TBH, I have never seen nginx crash. This makes me wonder if something in your setup (compose?) is monitoring nginx responses (some healtcheck?) and restarting nginx automatically ?
If you have a test Cloudflare, you can quickly put Cloudflare in front of Cloudron and check if that works. After all, your proxy is same as Cloudflare functionally.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login