Gateway Settings and the Daemon
Your agent answers, but only while the terminal you started it from stays open. Close that window or reboot, and the agent is gone. The last onboarding steps fix this safely: settle the Gateway's network settings, then hand the Gateway to a daemon that keeps it running.
The rule
Bind narrow, lock with a token, and let a daemon keep it running.
Gateway settings decide how the server behaves on the network:
- Port. The single port the Gateway listens on. Control connections, HTTP, the Control UI and hooks all share it.
- Bind address. Which network interface it listens on.
localhost(also written127.0.0.1) means only programs on this machine can connect.0.0.0.0means every network interface, which can mean the whole internet. - Auth token. The password every client must present. Make it long, random and unique; never share it or commit it to version control.
The daemon. A daemon is a background process that runs without any terminal window. When the Gateway is installed as a daemon, which the onboarding wizard offers to do, it starts automatically when the machine boots and keeps running after you log out. That also matters for the proactive core: heartbeats and cron jobs can only fire while the Gateway runs.
The gateway commands control it:
openclaw gateway start # start the Gateway
openclaw gateway stop # stop it
openclaw gateway restart # restart it, for example after a config changeThe shortcut
After any settings change: restart, then audit. openclaw gateway restart loads the new settings, and openclaw security audit --deep checks that the change did not open a hole.
Check the bind address
The settings say
localhost. Good: leave it there.
The trap is fixing reachability by switching to 0.0.0.0. It works, and it also invites every network the machine is on. Keep localhost and use Tailscale, an SSH tunnel or a reverse proxy.
Drills
Answer fast — trust the rule.
What does binding the Gateway to 0.0.0.0 mean?
What does running the Gateway as a daemon give you?
You changed the Gateway's port. What should you do next?
Which of these is the best Gateway auth token?
Remember
- Bind narrow, lock with a token, and let a daemon keep it running.
- After any settings change: restart, then audit.
- Trap:
0.0.0.0and weak tokens, and a Gateway that dies with its terminal.
