Security
Backend trust tokens
Your app servers sit on a port somewhere. Anything that can reach that port can talk to them, and it looks exactly the same to the application as nginx does. A pool token is how the backend tells the difference.

How it works
Turn it on per pool. nginx then puts a shared secret on every request it proxies there:
proxy_set_header X-Fleet-Token "k7Rm...9wQ2";
proxy_hide_header X-Fleet-Token;
Your backend checks the header and returns 403 to anything else. The GUI gives you the snippet for nginx, Apache, Express, Django or Spring, so it is a paste rather than a project.
Three details that matter
- The header is set, not added. A client sending that header itself has it thrown away and replaced. You cannot forge your way in from outside.
- The health checker sends it too. Without that, the moment a backend started enforcing the token, every check would come back 403 and a perfectly healthy pool would be marked down and pulled out of service.
- The secret is stored encrypted and only shown when you ask for it.
What it is and is not
It is a bearer secret
Anybody holding it can pretend to be the fleet. So it belongs behind a firewall rather than instead of one. If the hop to your backend crosses a network you do not trust, run that hop over TLS as well, which is what the backend TLS settings are for.
Rotating without an outage
You cannot change both ends at the same instant, and nginx can only send one value, so it takes two steps.
- Rotate. A new token is generated but nginx keeps sending the old one, so nothing changes on the wire. Add the new one to your backends so they accept either.
- Activate. nginx starts sending the new one, which your backends already take. Apply the config, watch traffic, then delete the old one from your backends.
Doing it in one step means every request in the gap gets a 403. Turning the feature off is the same idea in reverse: apply the config that stops sending the header first, then stop checking for it.
When to use something else
If you can put the backends on a network only the load balancers can reach, do that instead and skip this entirely. A token is for the case where you cannot, which in practice is most shared or cloud networks.
Common questions
Does the token change per request?
No, it is a fixed shared secret. Making it a signed per request value would mean the backend has to verify a signature, which is a much bigger change to ask of an application you may not own.
Can different pools have different tokens?
Yes, one per pool. That limits the blast radius if one backend is compromised.
Will this break WebSockets or file uploads?
No. It is one extra request header.
Step by step instructions
The how to section has searchable, task shaped answers. Search it for backend trust.
Related features
Backend TLS
Speak https to your own servers, and verify it properly.
Read moreBackend pools
The list of servers behind a site, and how traffic is shared.
Read moreThe tunnel
Reach a backend that has no public address at all.
Read moreActive health checks
Probe every backend on a schedule and pull the dead ones out.
Read more