What Grafana version and what operating system are you using?
-
Grafana deployed via Helm chart in Kubernetes
-
Operating System: Kubernetes cluster (Linux containers)
What are you trying to achieve? I want to make my Grafana instance accessible both internally (grafana.svc.internal) and externally through an Azure Application Proxy (grafana.svc.company.com) while maintaining OAuth authentication with Azure AD.
How are you trying to achieve it?
-
Current setup: Grafana deployed via Helm with internal-only Ingress
-
Configured Azure Application Proxy to proxy requests from
grafana.svc.company.comtografana.svc.internal -
OAuth configured with Azure AD using internal URL as redirect URI
-
Attempting to access Grafana externally through the proxy
What happened? When accessing Grafana through the external URL (grafana.svc.company.com), Grafana keeps redirecting/rewriting URLs back to the internal hostname (grafana.svc.internal), making external access impossible. The proxy reaches the login page, but redirects break the authentication flow.
What did you expect to happen? I expected Grafana to accept requests from the external hostname and work seamlessly through the proxy, allowing users to access the instance via grafana.svc.company.com while maintaining all functionality including OAuth authentication.
Can you copy/paste the configuration(s) that you are having problems with?
grafana.ini:
server:
domain: grafana.svc.internal
root_url: https://%(domain)s/
Ingress configuration uses an internal-only IngressClass with hostname grafana.svc.internal.
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. No specific errors in logs, but the browser gets redirected to grafana.svc.internal which is not accessible externally, resulting in connection timeouts for external users.
Did you follow any online instructions? If so, what is the URL? I’ve reviewed the official Grafana documentation for reverse proxy configuration, but most examples assume the same hostname for internal and external access.
Additional Questions:
-
Is there a way to configure Grafana to work with multiple hostnames or accept requests from different domains?
-
I noticed that
server.domaindoesn’t accept a list of hostnames - is there an alternative approach? -
Has anyone successfully used Grafana behind a reverse proxy with a different external hostname?
Any suggestions or workarounds would be greatly appreciated!