Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

Configure a data source connection proxy

Grafana provides support for proxying data source connections through a Secure Socks5 Tunnel. This enables you to securely connect to data sources hosted in a different network than Grafana.

To make use of this functionality, you need to deploy a socks5 proxy server that supports TLS on a machine exposed to the public internet within the same network as your data source. From there, Grafana establishes a mutually trusted connection from Grafana to the Proxy. Then the Proxy can proxy the Grafana connection to your private server without exposing your data sources to the public internet.

Known limitations

  • You can configure only one socks5 proxy per Grafana instance
  • All built-in core data sources are compatible, but not all external data sources are. For a list of supported data sources, refer to private data source connect.

Before you begin

To complete this task, you must first deploy a socks proxy server that supports TLS, is publicly accessible, and is hosted within the same network as the data source.


  1. For Grafana to send data source connections to the socks5 server, use the following table to configure the secure_socks_datasource_proxy section of the config.ini:

    enabledEnable this feature in Grafanatrue
    root_ca_certThe file path of the root ca cert/etc/ca.crt
    client_keyThe file path of the client private key/etc/client.key
    client_certThe file path of the client public key/etc/client.crt
    server_nameThe domain name of the proxy, used for SNIproxy.grafana.svc.cluster.local
    proxy_addressthe address of the proxylocalhost:9090
  2. Set up a data source and configure it to send data source connections through the proxy.

    To configure your data sources to send connections through the proxy, enableSecureSocksProxy=true must be specified in the data source json. You can do this in the API or use file based provisioning.

    Additionally, you can set the socks5 username and password by adding secureSocksProxyUsername in the data source json and secureSocksProxyPassword in the secure data source json.