Loading content…
Loading content…
Self-hostable assistant with containerized agents, memory and scheduled tasks. NanoClaw v2 guide focused on isolation, credentials and operation.
Reviewed: 10/10/2026
Project: https://github.com/nanocoai/nanoclaw
Isolation model: https://github.com/nanocoai/nanoclaw/blob/main/docs/isolation-model.md
This guide corresponds to NanoClaw v2, according to the documentation reviewed on 10/10/2026. The installation uses
bash nanoclaw.sh; v1 has a different data and configuration schema. Check the deployed commit before applying instructions frommain.
NanoClaw is a self-hostable assistant that runs agents in Linux containers with explicitly allocated resources. The Node host receives messages and orchestrates containers; the runner uses Bun and, by default, Claude Agent SDK. It allows conversations, memory and permissions to be separated by work scope. Channels and providers are added via skills to the fork.
main).Telegram / Discord / Slack / WhatsApp / etc.
|
ADAPTADORES host
|
Node host / router
|
DB central (v2.db)
|
DB por sesión: inbound.db <-- host escribe, contenedor lee
|
Contenedor del agente
Bun + SDK + herramientas
|
DB por sesión: outbound.db <-- contenedor escribe, host lee
|
host entrega respuesta
Salidas a APIs
|
Credential gateway / Vault
|
Servicios autenticados
According to the official migration and architecture notes:
data/v2.db stores users, roles, agent groups, message groups and relationships.| Version | Downloads (weekly) | Downloads (total) | Published |
|---|---|---|---|
0.1.0latest First published version. | 0 | 1 | October 14, 2026 |
data/v2-sessions/<session_id>/inbound.db receives messages/events/tasks; primary writer: host.data/v2-sessions/<session_id>/outbound.db accumulates responses/state; primary writer: container.groups/<folder>/ contains identity/instructions/memory and agent group configuration.groups/<folder>/container.json is optional container and mount configuration. Do not copy v1 recipes without reviewing the current format.main contains mainly infrastructure.The host controls input and output; the container runs the agent. Both are part of the trust model.
NanoClaw distinguishes communication channel, agent group and session. Not all multi-chat configurations represent privacy between users.
agent-shared)Two or more channels write to the same conversation. They share workspace, memory, instructions and history; even messages from different platforms appear in the same context.
Suitable: GitHub alerts and a Slack for the same project that deliberately want a joint conversation.
Unsuitable: personal life vs work, external users with non-equivalent access.
shared / per-thread)Chats keep separate threads, but share durable memory, tools, files and agent group identity. One conversation does not appear verbatim in the other, but indirect leakage through persistent memory may exist.
Suitable: a user who uses the assistant from Telegram and Discord.
Unsuitable: different people with mutually confidential information.
Suitable: one personal bot and another work bot; several clients/users with different access. Nuance: even if they are separated at the application and filesystem level, the host, the Docker daemon, the credentials gateway and the operating system are still shared infrastructure. For mutually hostile adversaries, consider separate VPSs/VMs.
| Scenario | Configuration |
|---|---|
| One user on Telegram and Discord | same agent, separate sessions |
| GitHub webhook + Slack for the same initiative | shared session, with an explicit decision |
| Users with independent data | separate agents |
| Personal project + company data | separate agents |
| Different clients with NDAs or secrets | separate agent groups; also consider separate VMs |
Official v2 documentation:
For a test with remote models and few conversations, start from 2–4 vCPU, 4 GB RAM and 30 GB SSD and measure consumption. This is a deployment estimate, not an official minimum. Adjust concurrency and container limits according to the host resources and the configuration of the installed version.
Reference preparation for Ubuntu/Debian; review the changes before applying them:
sudo apt update
sudo apt install -y git curl ca-certificates
# Instala Docker Engine/Compose y verifica que el daemon es operativo.
docker version
docker info
node --version # objetivo >=22
pnpm --version # objetivo >=10
Docker security: being a member of the docker group confers practically host administrator privileges on a rootful daemon. Therefore you should not treat an account with access to the Docker socket as an "isolated service user". Use a VPS dedicated to the experiment or a trusted administrator. Never provide /var/run/docker.sock as an agent volume.
git clone https://github.com/nanocoai/nanoclaw.git nanoclaw-v2
cd nanoclaw-v2
git rev-parse HEAD
# Guarda ese SHA en tu inventario de infraestructura.
Review nanoclaw.sh, setup files, Dockerfile, credentials policy and skills to be installed, especially if it is a machine with personal data. The setup script can install system components and, if it fails, delegate diagnosis/repair to Claude Code; it should not be run blindly on a sensitive production host.
bash nanoclaw.sh
The README states that the current wizard installs/prepares Node, pnpm and Docker if missing, configures a credentials gateway, registers the Anthropic credential, builds the container and pairs the first channel: Slack, Telegram, Discord, WhatsApp, iMessage or local CLI, depending on the environment. It can invoke Claude Code automatically if there are failures. Read the operations it proposes and use low-privilege test credentials.
Suggested flow for a headless VPS:
Consult the installed version's help for service names and configuration options.
/add-telegram, /add-discord, /add-opencode, etc.; commands with / run inside the Claude Code prompt, not directly in bash.Create a bot with @BotFather.
In your v2 checkout, open Claude Code:
cd nanoclaw-v2
claude
Inside Claude Code, request the skill:
/add-telegram
Follow the specific flow: channel registration, token, owner, linking with the agent group, and policy for unknown senders.
Test messages from your account and from a second unauthorized account.
Verify that untrusted messages do not receive administrative permissions by mentioning a keyword.
If you have already paired Telegram during bash nanoclaw.sh, do not repeat the channel installation without reason. Check the status of your installation and the skill documentation.
The repo cites, among others, Slack, Discord, WhatsApp, iMessage, Microsoft Teams, Matrix, Google Chat, Webex, Linear, and GitHub. The list does not mean all of them are preinstalled. Skills add modules from the channels branch and specific dependencies to the fork. Before granting permissions to Slack/GitHub/Gmail, create credentials with minimal scopes and test revocation.
In v2, the README presents a credential gateway that injects secrets into outbound traffic without giving the raw key to the container. During setup, one of the supported gateways is installed—the README currently mentions OneCLI Agent Vault—; per-agent rules and rate controls can be applied.
Verify that keys are not mounted or included as container variables; isolation depends on that configuration.
The v1→v2 notes indicate that automatically created agents may start in a all secrets mode, which allows automatic injection of secrets whose host patterns match. For strong separation, review and switch to selective mode according to the interface and help of the installed OneCLI version; the reference mentions onecli agents set-secret-mode --mode selective as a command family. Run:
onecli agents --help
onecli agents set-secret-mode --help
The specific syntax for identifying an agent depends on the release. Do not apply an incomplete command to the wrong target. Add allowlist rules per host/API/agent and limit spending per credential at the provider.
Never put tokens in: messages, files visible to all agent groups, shared instructions, Docker image, or Git repository. Keep the host process, OneCLI volumes, and Docker account under administrator control.
According to the README, the product does not require its own account for basic functionality and reports anonymous setup diagnostics. If you want to opt out:
NANOCLAW_NO_DIAGNOSTICS=1 bash nanoclaw.sh
Prebuilt images and optional community services may require an account and transmit metadata. Local compilation is the default path. Calls to external LLM providers transmit the content necessary to respond; review their data handling policy.
--privileged, without access to the Docker socket, and with a restricted user if the runtime allows it.~/.ssh, third-party client repositories, password managers, and cloud directories.container.json per group, volumes, mounts, and effective permissions.Even if there is no raw key inside the container, the agent could use an allowed API to do something improper, or exfiltrate information through a network egress if it knows about it.
Review the gateway's egress/hostname policies and apply firewall/egress per container where appropriate.
Block cloud metadata services (169.254.169.254) and unnecessary internal hosts if they are reachable by untrusted agents.
A container can be compromised and so can the Docker daemon/host; consider kernel, container runtime, and dependency updates.### Identity control
In v2, owner and admin user roles are defined (global or scoped), plus group membership and unknown sender policy.
Unknown sender policy: strict, request_approval or public, depending on the migration documentation. Prioritize strict or manual approval for a private bot.
Do not assume that a channel is private just because of its name, a mention or a trigger word.
Even with Docker, an adversarial message can instruct the agent to delete files from a mounted volume, leak accessible data or execute connected tools. The effective boundary is the combination of volume scope, network, secrets, service permissions and roles, not just the prompt.
The v2 stack uses the Claude Agent SDK as the source provider. The README lists integrations via skills:
/add-codex: OpenAI Codex runtime, with whatever authentication form the integration supports./add-opencode: other providers/models through OpenCode./add-ollama-provider: local open-weight models with Ollama.Skill commands are sent inside Claude Code from the checkout. Their compatibility with a specific model, tool handling and performance must be verified case by case. Do not assume that a compatible API guarantees all tool calls and the same memory behavior.
Model per agent group: documented in the README; useful for reserving powerful models for critical jobs and cheap ones for summaries. To evaluate real cost, record: requests, input/output tokens, tool repetitions, tool calling errors and container hours.
Customization is maintained in a fork through code and skills:
The v2 documentation states:
ncl groups create --template <ref>
Replace <ref> with a legitimate template and verify that the ncl CLI was installed in your environment. Templates combine instructions, skills and MCP without secrets. Review the tools the template includes before running it with real credentials. Reference: https://github.com/nanocoai/nanoclaw/blob/main/docs/templates.md
The runner includes an MCP tool registry, and the v2 notes mention self-modification flows for installing packages or adding MCP servers with administrative approval and image rebuild. Review the current version of that flow: running a third-party MCP is adding code to the agent's trust context.
The installer manages the services; their names depend on the system and version. Use these Docker tools to inspect the deployment:
cd nanoclaw-v2
git rev-parse --short HEAD
node --version
pnpm --version
docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}'
docker stats --no-stream
docker system df
For an identified and trusted container:
docker logs --tail=100 NOMBRE_O_ID_DEL_CONTENEDOR
# Examina mounts y límites antes de cambiar permisos:
docker inspect NOMBRE_O_ID_DEL_CONTENEDOR
If setup or behavior fails, the README recommends opening claude from the checkout and using the /debug skill; treat change proposals as a PR, not as orders to approve automatically.
| Problem | Check |
|---|---|
| The script cannot bring Docker up | daemon, user permissions, architecture, host resources |
| Telegram does not respond | installed skill, credential, outbound connection, group/owner routing |
| It receives messages but no one can administer it | owner/admin roles, sender policy, correct accounts |
| It mixes memory from two chats | check level 1/2/3 of the isolation model |
| The container cannot find a file | it is not mounted or lacks read permissions |
| An API works from the host but not from the agent | gateway policy, assigned secret, allowed hostname, network |
| Excessive RAM | number of live containers/sessions, local models, recurring jobs |
| Failure after updating | v2 changes, channel skill, packages, local branch and DB migrations |
Record and retain in encrypted form:
data/ (includes central and per-session DB), gateway state if applicable;groups/ and memory/instructions;.env is not enough);Perform consistent backups: stop processes appropriately or use a consistent SQLite copy; do not indiscriminately rsync-copy active databases and assume consistency. Test restoring in a separate environment without connecting it to real channels to avoid duplicate sends.
Review upstream changes before integrating them into a customized fork.
The README describes:
bash nanoclaw.sh --uninstall --dry-run # vista previa
bash nanoclaw.sh --uninstall # solicita confirmaciones
The uninstall may delete the service, containers, images, data, logs and agent files linked to that checkout. Keep a backup beforehand, read the preview and confirm you are in the correct folder. Shared credentials/gateway may survive and require separate review.
The official path is to clone a clean v2 installation alongside v1 and run from v2:
git clone https://github.com/nanocoai/nanoclaw.git nanoclaw-v2
cd nanoclaw-v2
bash migrate-v2.sh
The migrator detects the nearby v1 or uses NANOCLAW_V1_PATH=/ruta/a/v1; it copies components and then Claude Code handles decisions (owner, memory, customizations). It does not automatically perform the service switchover unless authorized. Never migrate directly on top of the only copy of your data.
selective mode where applicable.Reviewed: 10/10/2026
Project: https://github.com/nanocoai/nanoclaw
Isolation model: https://github.com/nanocoai/nanoclaw/blob/main/docs/isolation-model.md
This guide corresponds to NanoClaw v2, according to the documentation reviewed on 10/10/2026. The installation uses
bash nanoclaw.sh; v1 has a different data and configuration schema. Check the deployed commit before applying instructions frommain.
NanoClaw is a self-hostable assistant that runs agents in Linux containers with explicitly allocated resources. The Node host receives messages and orchestrates containers; the runner uses Bun and, by default, Claude Agent SDK. It allows conversations, memory and permissions to be separated by work scope. Channels and providers are added via skills to the fork.
main).Telegram / Discord / Slack / WhatsApp / etc.
|
ADAPTADORES host
|
Node host / router
|
DB central (v2.db)
|
DB por sesión: inbound.db <-- host escribe, contenedor lee
|
Contenedor del agente
Bun + SDK + herramientas
|
DB por sesión: outbound.db <-- contenedor escribe, host lee
|
host entrega respuesta
Salidas a APIs
|
Credential gateway / Vault
|
Servicios autenticados
According to the official migration and architecture notes:
data/v2.db stores users, roles, agent groups, message groups and relationships.data/v2-sessions/<session_id>/inbound.db receives messages/events/tasks; primary writer: host.data/v2-sessions/<session_id>/outbound.db accumulates responses/state; primary writer: container.groups/<folder>/ contains identity/instructions/memory and agent group configuration.groups/<folder>/container.json is optional container and mount configuration. Do not copy v1 recipes without reviewing the current format.main contains mainly infrastructure.The host controls input and output; the container runs the agent. Both are part of the trust model.
NanoClaw distinguishes communication channel, agent group and session. Not all multi-chat configurations represent privacy between users.
agent-shared)Two or more channels write to the same conversation. They share workspace, memory, instructions and history; even messages from different platforms appear in the same context.
Suitable: GitHub alerts and a Slack for the same project that deliberately want a joint conversation.
Unsuitable: personal life vs work, external users with non-equivalent access.
shared / per-thread)Chats keep separate threads, but share durable memory, tools, files and agent group identity. One conversation does not appear verbatim in the other, but indirect leakage through persistent memory may exist.
Suitable: a user who uses the assistant from Telegram and Discord.
Unsuitable: different people with mutually confidential information.
Suitable: one personal bot and another work bot; several clients/users with different access. Nuance: even if they are separated at the application and filesystem level, the host, the Docker daemon, the credentials gateway and the operating system are still shared infrastructure. For mutually hostile adversaries, consider separate VPSs/VMs.
| Scenario | Configuration |
|---|---|
| One user on Telegram and Discord | same agent, separate sessions |
| GitHub webhook + Slack for the same initiative | shared session, with an explicit decision |
| Users with independent data | separate agents |
| Personal project + company data | separate agents |
| Different clients with NDAs or secrets | separate agent groups; also consider separate VMs |
Reference: https://github.com/nanocoai/nanoclaw/blob/main/docs/isolation-model.md
Official v2 documentation:
For a test with remote models and few conversations, start from 2–4 vCPU, 4 GB RAM and 30 GB SSD and measure consumption. This is a deployment estimate, not an official minimum. Adjust concurrency and container limits according to the host resources and the configuration of the installed version.
Reference preparation for Ubuntu/Debian; review the changes before applying them:
sudo apt update
sudo apt install -y git curl ca-certificates
# Instala Docker Engine/Compose y verifica que el daemon es operativo.
docker version
docker info
node --version # objetivo >=22
pnpm --version # objetivo >=10
Docker security: being a member of the docker group confers practically host administrator privileges on a rootful daemon. Therefore you should not treat an account with access to the Docker socket as an "isolated service user". Use a VPS dedicated to the experiment or a trusted administrator. Never provide /var/run/docker.sock as an agent volume.
git clone https://github.com/nanocoai/nanoclaw.git nanoclaw-v2
cd nanoclaw-v2
git rev-parse HEAD
# Guarda ese SHA en tu inventario de infraestructura.
Review nanoclaw.sh, setup files, Dockerfile, credentials policy and skills to be installed, especially if it is a machine with personal data. The setup script can install system components and, if it fails, delegate diagnosis/repair to Claude Code; it should not be run blindly on a sensitive production host.
bash nanoclaw.sh
The README states that the current wizard installs/prepares Node, pnpm and Docker if missing, configures a credentials gateway, registers the Anthropic credential, builds the container and pairs the first channel: Slack, Telegram, Discord, WhatsApp, iMessage or local CLI, depending on the environment. It can invoke Claude Code automatically if there are failures. Read the operations it proposes and use low-privilege test credentials.
Suggested flow for a headless VPS:
Consult the installed version's help for service names and configuration options.
/add-telegram, /add-discord, /add-opencode, etc.; commands with / run inside the Claude Code prompt, not directly in bash.Create a bot with @BotFather.
In your v2 checkout, open Claude Code:
cd nanoclaw-v2
claude
Inside Claude Code, request the skill:
/add-telegram
Follow the specific flow: channel registration, token, owner, linking with the agent group, and policy for unknown senders.
Test messages from your account and from a second unauthorized account.
Verify that untrusted messages do not receive administrative permissions by mentioning a keyword.
If you have already paired Telegram during bash nanoclaw.sh, do not repeat the channel installation without reason. Check the status of your installation and the skill documentation.
The repo cites, among others, Slack, Discord, WhatsApp, iMessage, Microsoft Teams, Matrix, Google Chat, Webex, Linear, and GitHub. The list does not mean all of them are preinstalled. Skills add modules from the channels branch and specific dependencies to the fork. Before granting permissions to Slack/GitHub/Gmail, create credentials with minimal scopes and test revocation.
In v2, the README presents a credential gateway that injects secrets into outbound traffic without giving the raw key to the container. During setup, one of the supported gateways is installed—the README currently mentions OneCLI Agent Vault—; per-agent rules and rate controls can be applied.
Verify that keys are not mounted or included as container variables; isolation depends on that configuration.
The v1→v2 notes indicate that automatically created agents may start in a all secrets mode, which allows automatic injection of secrets whose host patterns match. For strong separation, review and switch to selective mode according to the interface and help of the installed OneCLI version; the reference mentions onecli agents set-secret-mode --mode selective as a command family. Run:
onecli agents --help
onecli agents set-secret-mode --help
The specific syntax for identifying an agent depends on the release. Do not apply an incomplete command to the wrong target. Add allowlist rules per host/API/agent and limit spending per credential at the provider.
Never put tokens in: messages, files visible to all agent groups, shared instructions, Docker image, or Git repository. Keep the host process, OneCLI volumes, and Docker account under administrator control.
According to the README, the product does not require its own account for basic functionality and reports anonymous setup diagnostics. If you want to opt out:
NANOCLAW_NO_DIAGNOSTICS=1 bash nanoclaw.sh
Prebuilt images and optional community services may require an account and transmit metadata. Local compilation is the default path. Calls to external LLM providers transmit the content necessary to respond; review their data handling policy.
--privileged, without access to the Docker socket, and with a restricted user if the runtime allows it.~/.ssh, third-party client repositories, password managers, and cloud directories.container.json per group, volumes, mounts, and effective permissions.Even if there is no raw key inside the container, the agent could use an allowed API to do something improper, or exfiltrate information through a network egress if it knows about it.
Review the gateway's egress/hostname policies and apply firewall/egress per container where appropriate.
Block cloud metadata services (169.254.169.254) and unnecessary internal hosts if they are reachable by untrusted agents.
A container can be compromised and so can the Docker daemon/host; consider kernel, container runtime, and dependency updates.### Identity control
In v2, owner and admin user roles are defined (global or scoped), plus group membership and unknown sender policy.
Unknown sender policy: strict, request_approval or public, depending on the migration documentation. Prioritize strict or manual approval for a private bot.
Do not assume that a channel is private just because of its name, a mention or a trigger word.
Even with Docker, an adversarial message can instruct the agent to delete files from a mounted volume, leak accessible data or execute connected tools. The effective boundary is the combination of volume scope, network, secrets, service permissions and roles, not just the prompt.
The v2 stack uses the Claude Agent SDK as the source provider. The README lists integrations via skills:
/add-codex: OpenAI Codex runtime, with whatever authentication form the integration supports./add-opencode: other providers/models through OpenCode./add-ollama-provider: local open-weight models with Ollama.Skill commands are sent inside Claude Code from the checkout. Their compatibility with a specific model, tool handling and performance must be verified case by case. Do not assume that a compatible API guarantees all tool calls and the same memory behavior.
Model per agent group: documented in the README; useful for reserving powerful models for critical jobs and cheap ones for summaries. To evaluate real cost, record: requests, input/output tokens, tool repetitions, tool calling errors and container hours.
Customization is maintained in a fork through code and skills:
The v2 documentation states:
ncl groups create --template <ref>
Replace <ref> with a legitimate template and verify that the ncl CLI was installed in your environment. Templates combine instructions, skills and MCP without secrets. Review the tools the template includes before running it with real credentials. Reference: https://github.com/nanocoai/nanoclaw/blob/main/docs/templates.md
The runner includes an MCP tool registry, and the v2 notes mention self-modification flows for installing packages or adding MCP servers with administrative approval and image rebuild. Review the current version of that flow: running a third-party MCP is adding code to the agent's trust context.
The installer manages the services; their names depend on the system and version. Use these Docker tools to inspect the deployment:
cd nanoclaw-v2
git rev-parse --short HEAD
node --version
pnpm --version
docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}'
docker stats --no-stream
docker system df
For an identified and trusted container:
docker logs --tail=100 NOMBRE_O_ID_DEL_CONTENEDOR
# Examina mounts y límites antes de cambiar permisos:
docker inspect NOMBRE_O_ID_DEL_CONTENEDOR
If setup or behavior fails, the README recommends opening claude from the checkout and using the /debug skill; treat change proposals as a PR, not as orders to approve automatically.
| Problem | Check |
|---|---|
| The script cannot bring Docker up | daemon, user permissions, architecture, host resources |
| Telegram does not respond | installed skill, credential, outbound connection, group/owner routing |
| It receives messages but no one can administer it | owner/admin roles, sender policy, correct accounts |
| It mixes memory from two chats | check level 1/2/3 of the isolation model |
| The container cannot find a file | it is not mounted or lacks read permissions |
| An API works from the host but not from the agent | gateway policy, assigned secret, allowed hostname, network |
| Excessive RAM | number of live containers/sessions, local models, recurring jobs |
| Failure after updating | v2 changes, channel skill, packages, local branch and DB migrations |
Record and retain in encrypted form:
data/ (includes central and per-session DB), gateway state if applicable;groups/ and memory/instructions;.env is not enough);Perform consistent backups: stop processes appropriately or use a consistent SQLite copy; do not indiscriminately rsync-copy active databases and assume consistency. Test restoring in a separate environment without connecting it to real channels to avoid duplicate sends.
Review upstream changes before integrating them into a customized fork.
The README describes:
bash nanoclaw.sh --uninstall --dry-run # vista previa
bash nanoclaw.sh --uninstall # solicita confirmaciones
The uninstall may delete the service, containers, images, data, logs and agent files linked to that checkout. Keep a backup beforehand, read the preview and confirm you are in the correct folder. Shared credentials/gateway may survive and require separate review.
The official path is to clone a clean v2 installation alongside v1 and run from v2:
git clone https://github.com/nanocoai/nanoclaw.git nanoclaw-v2
cd nanoclaw-v2
bash migrate-v2.sh
The migrator detects the nearby v1 or uses NANOCLAW_V1_PATH=/ruta/a/v1; it copies components and then Claude Code handles decisions (owner, memory, customizations). It does not automatically perform the service switchover unless authorized. Never migrate directly on top of the only copy of your data.
Source: https://github.com/nanocoai/nanoclaw/blob/main/docs/v1-to-v2-changes.md
selective mode where applicable.