From 7755082a4ce7bb1276aa2694faa54e6b621b0813 Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Wed, 29 Apr 2026 11:58:42 +0000 Subject: [PATCH 01/12] Add root user warning gate to Linux setup pre-flight Users running setup as root hit permission issues with containers, services, and file ownership. Warn early with an interactive prompt and provide step-by-step instructions to create a regular user. Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/nanoclaw.sh b/nanoclaw.sh index 058dbbf..4ab7b39 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -134,6 +134,39 @@ write_header # skips re-printing the wordmark, keeping the flow visually continuous. printf '\n %s%s\n\n' "$(bold 'Nano')" "$(brand_bold 'Claw')" +# ─── pre-flight: root user warning (Linux) ──────────────────────────── +if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then + printf ' %s\n' \ + "$(red 'Warning: you are running as root.')" + printf ' %s\n' \ + "$(dim "Running NanoClaw as root is not recommended. It can cause permission")" + printf ' %s\n\n' \ + "$(dim "issues with containers, services, and file ownership.")" + printf ' %s\n' \ + "$(dim "We recommend creating a regular user and running setup from there.")" + printf ' %s\n\n' \ + "$(dim "If you continue as root, some things may not work as expected.")" + read -r -p " $(bold 'Continue as root anyway?') [y/N] " ROOT_ANS Date: Wed, 29 Apr 2026 12:08:22 +0000 Subject: [PATCH 02/12] Change root warning from y/N prompt to numbered menu options Clearer UX: option 1 shows user creation instructions, option 2 explicitly continues as root (not recommended). Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 4ab7b39..06086b3 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -142,14 +142,12 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then "$(dim "Running NanoClaw as root is not recommended. It can cause permission")" printf ' %s\n\n' \ "$(dim "issues with containers, services, and file ownership.")" - printf ' %s\n' \ - "$(dim "We recommend creating a regular user and running setup from there.")" - printf ' %s\n\n' \ - "$(dim "If you continue as root, some things may not work as expected.")" - read -r -p " $(bold 'Continue as root anyway?') [y/N] " ROOT_ANS Date: Wed, 29 Apr 2026 12:12:54 +0000 Subject: [PATCH 03/12] Update root warning instructions: add root login step, fix ssh user Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 06086b3..8c0bf32 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -155,11 +155,12 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then ph_event setup_root_aborted printf '\n %s\n' "$(bold 'To set up a regular user:')" printf ' %s\n' "$(dim '1. Open another terminal (keep this one for reference)')" - printf ' %s\n' "$(dim '2. Create a new user: adduser nanoclaw')" - printf ' %s\n' "$(dim '3. Add to sudo group: usermod -aG sudo nanoclaw')" - printf ' %s\n' "$(dim '4. Log out of this SSH session: exit')" - printf ' %s\n' "$(dim '5. Log back in as the new user: ssh your-user@your-server')" - printf ' %s\n\n' "$(dim '6. Re-run setup: bash nanoclaw.sh')" + printf ' %s\n' "$(dim '2. Log in as root: ssh root@your-server')" + printf ' %s\n' "$(dim '3. Create a new user: adduser nanoclaw')" + printf ' %s\n' "$(dim '4. Add to sudo group: usermod -aG sudo nanoclaw')" + printf ' %s\n' "$(dim '5. Log out of this SSH session: exit')" + printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" + printf ' %s\n\n' "$(dim '7. Re-run setup: bash nanoclaw.sh')" exit 1 ;; esac From dec1be6adc4e0f993a40cd1eaa7c6c735eb78350 Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Wed, 29 Apr 2026 18:57:15 +0000 Subject: [PATCH 04/12] Add clone step to root warning user-creation instructions Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 8c0bf32..1813980 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -160,7 +160,8 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then printf ' %s\n' "$(dim '4. Add to sudo group: usermod -aG sudo nanoclaw')" printf ' %s\n' "$(dim '5. Log out of this SSH session: exit')" printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" - printf ' %s\n\n' "$(dim '7. Re-run setup: bash nanoclaw.sh')" + printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" + printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" exit 1 ;; esac From 0a18c1d21a2516b3745a6de9261189c4a8fa1b7c Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Wed, 29 Apr 2026 21:12:14 +0000 Subject: [PATCH 05/12] Ensure user is in docker group before sg docker, revert workarounds The root cause of broken keyboard navigation was sg docker prompting for the (unset) group password when the user wasn't in the docker group. Fix by running sudo usermod -aG docker before sg docker. This makes the stty sane calls and p.confirm workaround unnecessary, so revert those. Also remove the manual docker group instruction from nanoclaw.sh since container.ts handles it automatically. Co-Authored-By: Claude Opus 4.6 --- setup/container.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/setup/container.ts b/setup/container.ts index 6ecd032..18de61a 100644 --- a/setup/container.ts +++ b/setup/container.ts @@ -127,11 +127,22 @@ export async function run(args: string[]): Promise { } // Socket is unreachable due to group perms — current shell's supplementary - // groups are fixed at login, so `usermod -aG docker` (via install-docker.sh - // or a prior install) doesn't affect us until next login. Re-exec this - // step under `sg docker` so the child picks up docker as its primary - // group and can talk to /var/run/docker.sock without a logout. + // groups are fixed at login, so `usermod -aG docker` doesn't affect us + // until next login. Ensure the user is in the docker group (install-docker.sh + // does this on fresh installs, but skips when Docker is already present), + // then re-exec under `sg docker` so the child picks up docker as its + // primary group and can talk to /var/run/docker.sock without a logout. if (status === 'no-permission' && getPlatform() === 'linux' && commandExists('sg')) { + // Ensure the current user is in the docker group — without this, + // sg will ask for the (typically unset) group password and fail. + const inGroup = spawnSync('id', ['-nG'], { encoding: 'utf-8' }); + if (!(inGroup.stdout ?? '').split(/\s+/).includes('docker')) { + log.info('Adding current user to docker group'); + spawnSync('sudo', ['usermod', '-aG', 'docker', process.env.USER ?? ''], { + stdio: 'inherit', + }); + } + log.info('Re-executing container step under `sg docker`'); const res = spawnSync( 'sg', From 3d2996541337f35e969bc6577c7793c9725e90b8 Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Wed, 29 Apr 2026 21:23:42 +0000 Subject: [PATCH 06/12] Update root warning instructions: add SSH key copy, remove extra step Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 1813980..5dd366f 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -154,11 +154,11 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then *) ph_event setup_root_aborted printf '\n %s\n' "$(bold 'To set up a regular user:')" - printf ' %s\n' "$(dim '1. Open another terminal (keep this one for reference)')" - printf ' %s\n' "$(dim '2. Log in as root: ssh root@your-server')" - printf ' %s\n' "$(dim '3. Create a new user: adduser nanoclaw')" - printf ' %s\n' "$(dim '4. Add to sudo group: usermod -aG sudo nanoclaw')" - printf ' %s\n' "$(dim '5. Log out of this SSH session: exit')" + printf ' %s\n' "$(dim '1. Log in as root: ssh root@your-server')" + printf ' %s\n' "$(dim '2. Create a new user: adduser nanoclaw')" + printf ' %s\n' "$(dim '3. Add to sudo group: usermod -aG sudo nanoclaw')" + printf ' %s\n' "$(dim '4. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" + printf ' %s\n' "$(dim '5. Log out: exit')" printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" From d07cd7afa0d873cb00658db4da2ca2fb64a45d3e Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Wed, 29 Apr 2026 21:38:15 +0000 Subject: [PATCH 07/12] Remove redundant root login step from user-creation instructions Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 5dd366f..fdb24a1 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -154,14 +154,13 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then *) ph_event setup_root_aborted printf '\n %s\n' "$(bold 'To set up a regular user:')" - printf ' %s\n' "$(dim '1. Log in as root: ssh root@your-server')" - printf ' %s\n' "$(dim '2. Create a new user: adduser nanoclaw')" - printf ' %s\n' "$(dim '3. Add to sudo group: usermod -aG sudo nanoclaw')" - printf ' %s\n' "$(dim '4. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" - printf ' %s\n' "$(dim '5. Log out: exit')" - printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" - printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" - printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" + printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" + printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" + printf ' %s\n' "$(dim '3. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" + printf ' %s\n' "$(dim '4. Log out: exit')" + printf ' %s\n' "$(dim '5. Log back in as the new user: ssh nanoclaw@your-server')" + printf ' %s\n' "$(dim '6. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" + printf ' %s\n\n' "$(dim '7. Re-run setup: bash nanoclaw.sh')" exit 1 ;; esac From 72837c1643dc39898b21e2fbef7fd4301490c54a Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Thu, 30 Apr 2026 07:44:49 +0000 Subject: [PATCH 08/12] Fix sg docker re-exec restarting setup from scratch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When maybeReexecUnderSg() re-launches setup:auto under `sg docker`, the new process had no memory of completed steps — it re-prompted the welcome menu, re-ran environment and container checks, and then failed on onecli because the earlier run's state was lost. Pass NANOCLAW_SKIP with completedStepNames() so the re-exec'd process skips already-finished steps, suppress the welcome menu and existing-env prompts on re-exec since the user already answered them. Co-Authored-By: Claude Opus 4.6 --- setup/auto.ts | 66 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/setup/auto.ts b/setup/auto.ts index 37e3cb6..425778f 100644 --- a/setup/auto.ts +++ b/setup/auto.ts @@ -85,17 +85,21 @@ async function main(): Promise { // Welcome menu — default path or open advanced overrides before any setup // work begins. Default lands on standard so Enter is the happy path. - const startChoice = ensureAnswer( - await brightSelect<'default' | 'advanced'>({ - message: 'How would you like to begin?', - options: [ - { value: 'default', label: 'Standard setup' }, - { value: 'advanced', label: 'Advanced', hint: 'override defaults' }, - ], - initialValue: 'default', - }), - ) as 'default' | 'advanced'; - setupLog.userInput('start_choice', startChoice); + // On sg re-exec, the user already chose — skip straight to standard. + let startChoice: 'default' | 'advanced' = 'default'; + if (process.env.NANOCLAW_REEXEC_SG !== '1') { + startChoice = ensureAnswer( + await brightSelect<'default' | 'advanced'>({ + message: 'How would you like to begin?', + options: [ + { value: 'default', label: 'Standard setup' }, + { value: 'advanced', label: 'Advanced', hint: 'override defaults' }, + ], + initialValue: 'default', + }), + ) as 'default' | 'advanced'; + setupLog.userInput('start_choice', startChoice); + } if (startChoice === 'advanced') { configValues = await runAdvancedScreen(configValues); applyToEnv(configValues); @@ -126,22 +130,28 @@ async function main(): Promise { // paste credentials again on a re-run. const existingEnv = detectExistingEnv(); if (existingEnv) { - const lines = Object.values(existingEnv.groups).map( - (g) => ` ${k.green('✓')} ${g.label}`, - ); - note(lines.join('\n'), 'Found existing configuration'); + // On sg re-exec, auto-reuse — the user already decided in the first run. + const isReexec = process.env.NANOCLAW_REEXEC_SG === '1'; + let reuseChoice: 'reuse' | 'fresh' = 'reuse'; - const reuseChoice = ensureAnswer( - await brightSelect({ - message: 'Use this existing environment?', - options: [ - { value: 'reuse', label: 'Yes, use what I already have', hint: 'recommended' }, - { value: 'fresh', label: 'No, start fresh' }, - ], - initialValue: 'reuse', - }), - ) as 'reuse' | 'fresh'; - setupLog.userInput('existing_env_choice', reuseChoice); + if (!isReexec) { + const lines = Object.values(existingEnv.groups).map( + (g) => ` ${k.green('✓')} ${g.label}`, + ); + note(lines.join('\n'), 'Found existing configuration'); + + reuseChoice = ensureAnswer( + await brightSelect({ + message: 'Use this existing environment?', + options: [ + { value: 'reuse', label: 'Yes, use what I already have', hint: 'recommended' }, + { value: 'fresh', label: 'No, start fresh' }, + ], + initialValue: 'reuse', + }), + ) as 'reuse' | 'fresh'; + setupLog.userInput('existing_env_choice', reuseChoice); + } if (reuseChoice === 'reuse') { for (const [key, value] of Object.entries(existingEnv.raw)) { @@ -1178,9 +1188,11 @@ function maybeReexecUnderSg(): void { if (spawnSync('which', ['sg'], { stdio: 'ignore' }).status !== 0) return; p.log.warn('Docker socket not accessible in current group. Re-executing under `sg docker`.'); + const existingSkip = (process.env.NANOCLAW_SKIP ?? '').split(',').map((s) => s.trim()).filter(Boolean); + const skipList = [...new Set([...existingSkip, ...setupLog.completedStepNames()])].join(','); const res = spawnSync('sg', ['docker', '-c', 'pnpm run setup:auto'], { stdio: 'inherit', - env: { ...process.env, NANOCLAW_REEXEC_SG: '1' }, + env: { ...process.env, NANOCLAW_REEXEC_SG: '1', ...(skipList ? { NANOCLAW_SKIP: skipList } : {}) }, }); process.exit(res.status ?? 1); } From 23a3fea868c21be09a2c31df2d70825db2d6eb3a Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Thu, 30 Apr 2026 09:26:34 +0000 Subject: [PATCH 09/12] Add passwordless sudo step to root warning instructions Setup steps like install-node.sh and install-docker.sh run sudo non-interactively. Without NOPASSWD, password prompts can silently hang when piped through the setup runner. Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index fdb24a1..fd35c47 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -156,9 +156,18 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then printf '\n %s\n' "$(bold 'To set up a regular user:')" printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" - printf ' %s\n' "$(dim '3. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" - printf ' %s\n' "$(dim '4. Log out: exit')" - printf ' %s\n' "$(dim '5. Log back in as the new user: ssh nanoclaw@your-server')" + printf ' %s\n' "$(dim '3. Enable passwordless sudo: echo "nanoclaw ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/nanoclaw')" + printf ' %s\n' "$(dim '4. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" + printf ' %s\n' "$(dim '5. Log out: exit')" + printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" + printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" + printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" + printf ' %s\n\n' "$(bold 'If you are using a web terminal (hosting provider console):')" + printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" + printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" + printf ' %s\n' "$(dim '3. Enable passwordless sudo: echo "nanoclaw ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/nanoclaw')" + printf ' %s\n' "$(dim '4. Log out: logout')" + printf ' %s\n' "$(dim '5. Log in as the new user at the login prompt')" printf ' %s\n' "$(dim '6. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" printf ' %s\n\n' "$(dim '7. Re-run setup: bash nanoclaw.sh')" exit 1 From d5388a168ba5ddf5676dbc5cdcdba11a155ecc07 Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Thu, 30 Apr 2026 10:37:42 +0000 Subject: [PATCH 10/12] Replace web terminal instructions with SSH setup hint Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index fd35c47..57997f9 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -162,14 +162,8 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" - printf ' %s\n\n' "$(bold 'If you are using a web terminal (hosting provider console):')" - printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" - printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" - printf ' %s\n' "$(dim '3. Enable passwordless sudo: echo "nanoclaw ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/nanoclaw')" - printf ' %s\n' "$(dim '4. Log out: logout')" - printf ' %s\n' "$(dim '5. Log in as the new user at the login prompt')" - printf ' %s\n' "$(dim '6. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" - printf ' %s\n\n' "$(dim '7. Re-run setup: bash nanoclaw.sh')" + printf ' %s\n' "$(dim 'Not using SSH? Refer to your hosting provider docs or ask your coding agent to help you set up SSH access.')" + printf '\n' exit 1 ;; esac From 35f8e9d2f5ef25f77fa122475aa9187b8ba78d08 Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Thu, 30 Apr 2026 10:40:45 +0000 Subject: [PATCH 11/12] Move SSH hint above user-creation steps Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 57997f9..8693537 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -153,7 +153,8 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then ;; *) ph_event setup_root_aborted - printf '\n %s\n' "$(bold 'To set up a regular user:')" + printf '\n %s\n' "$(bold 'To set up a regular user (via SSH):')" + printf ' %s\n\n' "$(dim 'Not using SSH? Refer to your hosting provider docs or ask your coding agent to help you set up SSH access.')" printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" printf ' %s\n' "$(dim '3. Enable passwordless sudo: echo "nanoclaw ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/nanoclaw')" @@ -162,8 +163,6 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" - printf ' %s\n' "$(dim 'Not using SSH? Refer to your hosting provider docs or ask your coding agent to help you set up SSH access.')" - printf '\n' exit 1 ;; esac From e56132d04a55d1ac105095b67b8aec67fbcbd498 Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Thu, 30 Apr 2026 11:33:20 +0000 Subject: [PATCH 12/12] Remove SSH key copy step from root warning instructions Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 8693537..d44b367 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -158,11 +158,10 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" printf ' %s\n' "$(dim '3. Enable passwordless sudo: echo "nanoclaw ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/nanoclaw')" - printf ' %s\n' "$(dim '4. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" - printf ' %s\n' "$(dim '5. Log out: exit')" - printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" - printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" - printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" + printf ' %s\n' "$(dim '4. Log out: exit')" + printf ' %s\n' "$(dim '5. Log back in as the new user: ssh nanoclaw@your-server')" + printf ' %s\n' "$(dim '6. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" + printf ' %s\n\n' "$(dim '7. Re-run setup: bash nanoclaw.sh')" exit 1 ;; esac