netdata reverse proxy apache skip login page v3

I want to reverse proxy a netdata agent using apache. Im using the free version and i dont want to sign up. I access my page on the browser using /v3. But when attempting a proxy, any web query will append an extra /v3 which returns a 400 series error. Trying to create a /netdata/v3/ url space also fails as it sometimes attempts to call v1 . Any ideas ?

Suggested template:

Problem/Question

Relevant docs you followed/actions you took to solve the issue

Environment/Browser/Agent’s version etc

What I expected to happen

Hey,

The problem is that Netdata’s web UI makes API calls to /api/v3/..., and if your Apache proxy doesn’t handle the path mapping correctly, you end up with doubled paths like /netdata/v3/api/v3/... hence the 400 errors.

The cleanest solution is to proxy Netdata at a dedicated path like /netdata/ rather than trying to map it to /v3:

<VirtualHost *:80>
    RewriteEngine On
    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *>
        Require all granted
    </Proxy>
    # Note: trailing slashes on BOTH sides
    ProxyPass "/netdata/" "http://localhost:19999/" connectiontimeout=5 timeout=30
    ProxyPassReverse "/netdata/" "http://localhost:19999/"
    RewriteRule ^/netdata$ http://%{HTTP_HOST}/netdata/ [L,R=301]
</VirtualHost>

Then access via http://your-server/netdata/

The browser will automatically call /netdata/api/v3/... for data, and Apache proxies it correctly to Netdata’s root.

If you specifically need /v3 as your base path, you’d need to map both /v3/ and /api/v3/ separately. The /netdata/ approach avoids this entirely.

Netdata’s docs have the full Apache reverse proxy setup worth checking: Running Netdata behind Apache’s mod_proxy

Hope that helps

Building on what kanelatechnical said, if you specifically want to keep /v3 as your base path rather than /netdata, you need to proxy both the UI path and the API path separately since Netdata’s v3 dashboard makes XHR calls to /api/v3:

<VirtualHost *:80>
    ProxyRequests Off
    ProxyPreserveHost On

    # Proxy /v3/ to Netdata root
    ProxyPass "/v3/" "http://localhost:19999/"
    ProxyPassReverse "/v3/" "http://localhost:19999/"

    # Also proxy /api/ so XHR calls from the dashboard work
    ProxyPass "/api/" "http://localhost:19999/api/"
    ProxyPassReverse "/api/" "http://localhost:19999/api/"

    RewriteEngine On
    RewriteRule ^/v3$ http://%{HTTP_HOST}/v3/ [L,R=301]
</VirtualHost>

The reason your original attempt doubled the path is that the dashboard’s JavaScript hardcodes API calls relative to the server root at /api/v3, not relative to the proxied path. So whichever base path you pick, you also need a separate ProxyPass rule for /api/ pointing to Netdata’s /api/.

One alternative is to put Netdata behind a subdomain (e.g. netdata.yourdomain.com) and proxy the whole root — then there are no path conflicts at all. That tends to be the simplest long-term setup.

Update: I worked on a solution that works.

<VirtualHost *:80>
ServerName x.x.x.x
RewriteEngine On
RewriteRule “^/$” “/v3/” [R=301,L]
ProxyPass “/” “http://y.y.y.y:19999/
ProxyPassReverse “/” “http://y.y.y.y:19999/

#the homepage or root route is / so that is what we catch first
#append a /v3 and redirect permanently
#catch the prefix /, and forward it with /v3(in the case that /v3 is appended by the rewrite rule) to the proxy server at y.y.y.y
#the rewrite rule ignores all other calls as they are not root url/homepage.