docs/guides/self-hosted-ai-agent.md
This guide sets up nanobot as a self-hosted AI agent runtime on your own machine or server. The result is a gateway process that can serve the WebUI, chat apps, automations, and API integrations.
config.jsonnanobot gatewayUse this path when you want local or server-side ownership of the agent process, workspace files, memory files, and provider keys. It is also the right path when the agent must keep running after one terminal command finishes.
python -m pip install nanobot-ai
nanobot onboard --wizard
nanobot agent -m "Hello!"
Complete the CLI check before deploying the gateway. A deployment problem is much easier to debug after the provider and model are known to work.
For chat apps, automations, and WebSocket delivery, start the gateway:
nanobot gateway
For the browser surface, use the WebUI launcher instead. It can start and manage the local gateway for you:
nanobot webui
Or connect a channel in ~/.nanobot/config.json, then keep the same gateway
process running for messages.
127.0.0.1 unless you intentionally expose them.allowFrom
allowlists strict.tools.restrictToWorkspace; on Linux, use the bubblewrap sandbox for
shell execution.nanobot status with the same --config and --workspace flags used by
the service.nanobot gateway --verbose while debugging channel startup.