Open the dashboard through your own web address
Normally you open the dashboard at http://127.0.0.1:4202 on the machine that runs AgentX. Some teams put it behind a reverse proxy instead: a web server, such as Caddy or nginx, that answers on a friendly address like https://ops.example.com and passes the traffic on to AgentX.
AgentX protects itself from other websites. It only accepts changes (saving, sending a message to an agent, starting a job) from pages it served itself. A page from any other web address is refused, even when it's open in a browser on the same machine. Otherwise any website you happened to visit could quietly send your agents instructions.
Behind a reverse proxy, the browser shows your proxy's address, not AgentX's. This page shows how to tell AgentX that address is yours.
Before you start
- The reverse proxy already forwards
https://ops.example.com(use your own address) to the dashboard's port,4202. - You can edit the
.envfile next toagentx.jsonon the AgentX machine.
1. Check whether you need to do anything
Many proxies pass the original address along in a header called X-Forwarded-Host, and AgentX accepts that on its own.
- Browser: open the dashboard through your proxy's address.
- Change something small and save it. For example, open Settings, then save a setting without changing it.
- If it saves, you're done. If you see Forbidden: request from a page on another origin, continue with step 2.
2. Add your address to the allowed list
- Terminal: on the AgentX machine, open the
.envfile next toagentx.json. - Add your proxy's address. Include
https://and leave out any path or trailing slash:shFor several addresses, separate them with commas:AGENTX_ALLOWED_ORIGINS=https://ops.example.comhttps://ops.example.com,https://agents.example.org. - Terminal: restart the daemon and the dashboard so they read the file.shThe dashboard runs as its own service: restart it the way you started it (for example, stop and run
agentx daemon restartagentx board serveagain).
Only add addresses you control. Anything on the list can send your agents instructions through your browser.
Sign in from another device
With a dashboard token (dashboard.token in agentx.json), a browser that is not on the AgentX machine signs in before it sees the Hub, Settings, Approvals, People or an agent's page. A request through a reverse proxy counts as another device, even when the proxy runs on the AgentX machine.
- Browser: open the dashboard's address. It shows Sign in to this dashboard.
- Paste the dashboard token and select Sign in. You land on the page you asked for.

The browser keeps a sign-in cookie for 30 days. The cookie is not the token, and pages opened this way never contain the token. To sign every browser out, change dashboard.token and restart the dashboard. On the AgentX machine itself nothing changes: there is no sign-in there.
Check it worked
- Browser: reload the dashboard through your proxy's address.
- Save a setting. It saves without an error.
- Terminal: a page on any other address is still refused. The request below pretends to come from another website, and the answer should be
403:shcurl -s -o /dev/null -w "%{http_code}\n" -X POST -H "Origin: https://example.net" http://127.0.0.1:4202/api/draft - Browser: with a dashboard token set, open the proxy's address in a private window. It asks you to sign in, and the page source holds no
AX_LOCAL_TOKEN.
If something is wrong
- "That token is not right" when you sign in: paste the value of
dashboard.tokenfrom theagentx.jsonthe dashboard uses, with no spaces around it. - Asked to sign in again on every visit: the browser is dropping the cookie. Allow cookies for the dashboard's address.
- Still "Forbidden: request from a page on another origin": the address in
.envmust match what the browser shows exactly, includinghttps://and any port such as:8443. Then restart both services. - It worked, then stopped after a restart: the service might be started from another folder. The
.envfile must sit next to theagentx.jsonthat the service uses. - A tool that calls AgentX from its own web page stopped working: that is the protection working. Call AgentX from a server or the command line instead, or add that tool's address to
AGENTX_ALLOWED_ORIGINSif you trust it. - The dashboard doesn't load at all through the proxy: this setting isn't involved. Check the proxy forwards to port
4202and that the dashboard service is running.
