docs/netdata-agent/configuration/secure-your-netdata-agent-with-bearer-token.md
Netdata provides native bearer token protection that integrates with Netdata Cloud Single Sign-On (SSO). With a single configuration setting, you can secure direct access to your Netdata Agents and Parents while inheriting the same permissions and roles your users have in Netdata Cloud.
Bearer token protection is available to all Netdata Cloud users:
Your agent must be claimed to Netdata Cloud to use this feature.
When bearer token protection is enabled:
http://your-server:19999)This means:
Edit your netdata.conf using the edit-config script:
cd /etc/netdata
sudo ./edit-config netdata.conf
Add or modify the [web] section:
[web]
bearer token protection = yes
Restart Netdata to apply:
sudo systemctl restart netdata
When enabled, bearer token protection secures all data APIs, including:
/api/v3/data, /api/v3/allmetrics)/api/v3/alerts, /api/v3/alert_transitions)/api/v3/contexts, /api/v3/nodes)/api/v3/function, /api/v3/functions)/api/v3/config)Static web files (HTML, CSS, JavaScript) in Netdata's web directory are not protected. This means:
This is by design - it allows the dashboard to redirect users to Netdata Cloud for authentication.
A small set of APIs also remain publicly accessible for operational reasons:
| API | What it exposes |
|---|---|
/api/v3/info | Agent version, OS, build info, capabilities |
/api/v3/me | Current user authentication status |
/api/v3/claim | Agent claiming endpoint (protected by separate security key) |
/api/v3/stream_info | Streaming connection statistics |
/api/v2/claim | Agent claiming endpoint (v2, protected by security key) |
/api/v1/registry?action=hello | Node list, machine GUIDs, cloud connection status |
/api/v1/manage/health | Alert silencing (protected by separate X-Auth-Token) |
These APIs are required for the authentication flow and dashboard initialization. The registry hello action returns node identifiers and cloud connection status, which the dashboard needs to initiate the authentication redirect.
Note: Other v1 and v2 APIs (like /api/v2/info, /api/v3/versions, /api/v3/progress) are protected by bearer token - only the specific endpoints listed above bypass protection.
| Method | Setup Complexity | SSO | Centralized Management | Works Offline |
|---|---|---|---|---|
| Bearer Token Protection | Single setting | Yes | Yes | No |
| Reverse Proxy + Basic Auth | High (proxy + htpasswd) | No | No | Yes |
| IP-Based Restrictions | Medium | No | No | Yes |
| Disable Dashboard | Single setting | N/A | N/A | N/A |
Choose bearer token protection when you want the simplest setup with Cloud SSO integration. Choose reverse proxy if you need custom authentication, don't use Netdata Cloud, or require offline access.
Bearer token protection can be combined with:
allow connections from to limit which IPs can even attempt to connectExample combining bearer token with IP restrictions:
[web]
bearer token protection = yes
allow connections from = 10.* 192.168.* localhost
Users can't authenticate:
http://your-server:19999/api/v3/info and inspect the cloud section. Use cloud.status to verify whether the agent is connected to Netdata Cloud, and if it is not online, inspect cloud.reason for the failure detailssudo netdatacli aclk-state to diagnose the ACLK connectionToken expired errors:
Want to disable temporarily:
[web]
bearer token protection = no
Or via API (requires Admin/Manager role via Cloud):
POST /api/v3/bearer_protection