Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. External App Proxy Setup Causing Nginx Auto-Restart Help with Reverse Proxy Architecture?

External App Proxy Setup Causing Nginx Auto-Restart Help with Reverse Proxy Architecture?

Scheduled Pinned Locked Moved Discuss
app proxy
2 Posts 2 Posters 18 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    markpousee
    wrote last edited by joseph
    #1

    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

    J 1 Reply Last reply
    1
    • M markpousee

      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

      J Offline
      J Offline
      joseph
      Staff
      wrote last edited by
      #2

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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search