Skip to content

🐞 Bug: Connection issues when running behind Reverse Proxy #2661

@scetu

Description

@scetu

Bug Description

Arcane becomes extremely slow, unresponsive, or displays blank pages when deployed behind a Caddy v2 reverse proxy. Direct IP access works flawlessly. Onboarded 6 Edge agents - all of them have issues when running behind reverse proxy.

Steps To Reproduce

  1. Deploy Arcane via convenience script curl -fsSL https://getarcane.app/install.sh | sudo bash
ENVIRONMENT=production
PORT=3552
APP_URL=http://192.168.1.20:3552
  1. Deploy Edge Agents via Docker Run with mTLS enabled
  2. Verify application loads and functions correctly via direct access
  3. Remove edge agents, delete docker volumes on deployed agent nodes
  4. Configure Caddy v2 as a reverse proxy in front of Arcane, bind arcane master (convinient script isntalled) to localhost and change app url in /opt/arcane/.env
ENVIRONMENT=production
PORT=3552
LISTEN=127.0.0.1
APP_URL=https://arcane.mydomain.com

create Caddyfile site

arcane.mydomain.com {
    reverse_proxy 127.0.0.1:3552
}
  1. Onboard edge agents with via new app url
  2. Attempt to access Arcane through the proxy URL, navigate between environments, deploy stacks - every now and then timeouts occurs or page is not loaded. Arcane is slow and unresponsive

Expected Behavior

Arcane should load quickly and respond normally when accessed via the Caddy reverse proxy, just as it does when accessed directly via IP address.

Actual Behavior

Pages load very slowly or timeout entirely
Empty webpage is sometimes displayed
Edge agents connected through the proxy experience connectivity issues
All registered edge agents are affected

Screenshots

No response

Arcane Version

1.19.4

Installation Method

Binary/Executable

Environment Type

Both Local and Remote Agents

Database Type

SQLite (Default)

Operating System

Linux

Docker Version

29.4.3

Browser & Version

Firefox 150.0.3

Relevant Logs or Error Messages

# Caddy access logs showing frequent polling and some errors:
{"level":"error","ts":1779357250.5119684,"logger":"http.log.access.log0","msg":"handled request","request":{"proto":"HTTP/3.0","method":"GET","uri":"/api..."}}
{"level":"error","ts":1779357253.4660513,"logger":"http.log.access.log0","msg":"handled request","request":{"proto":"HTTP/3.0","method":"GET","uri":"/api..."}}
# ... repeated error entries every few seconds

Docker Compose Configuration

Environment Configuration (.env file)

Additional Context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions