Claude Code for Home Assistant: slim fork v1.2.65 (Proxmox "Killed" fix, working auto-update, smoother OAuth)

Okay, I incorporated the security-related changes from @umrath into the newest version, v1.2.69.

What was changed:

  • full_access is now false (was true, a leftover from when we needed the Docker socket).
  • docker_api: true is gone, and the docker CLI is no longer in the image.
  • capability net_admin is dropped from the AppArmor profile. The app only needs outbound HTTP, not interface or firewall control. net_raw stays.
  • The ttyd binary is now SHA256-verified at build time; build fails closed if the GitHub release ever serves a different binary.
  • mbpoll is pinned to v1.5.4 instead of cloning a moving main.
  • FONT_SIZE read from /data/options.json is sanitized before being passed to ttyd, just in case.

If you were using Claude Code to spawn or manage docker containers, this is not possible anymore without explicitly allowing it: you'd need to add docker_api: true back in your config and reinstall the docker CLI in a local override.

To pull it: Settings → Apps → App Store → ⋮ → Reload, then Update on the Claude Code app page. Restart after.

Full credit to @umrath, this is a direct port from his fork with his permission. Let me know if anything breaks.

Thank you for the effort to make it happen!
I will switch to your version now and mark (close? need to figure out what's best ...) my fork accordingly.

Cool addon, thanks for updating the existing one.

I am running into an issue with updating claude code, it cannot write the update.
Here is the auto update failure:

[WARN] Claude Code update failed/timed out (exit 243, see /tmp/claude-update.log). Last lines:
  | npm error   dest: '/usr/local/lib/node_modules/@anthropic-ai/.claude-code-1devilah'
  | npm error }
  | npm error
  | npm error The operation was rejected by your operating system.
  | npm error It is likely you do not have the permissions to access this file as the current user
  | npm error
  | npm error If you believe this might be a permissions issue, please double-check the
  | npm error permissions of the file and its containing directories, or try running
  | npm error the command again as root/Administrator.
  | npm error A complete log of this run can be found in: /root/.npm/_logs/2026-05-21T09_34_41_875Z-debug-0.log

Here I am running the command directly inside the claude code app terminal.

npm install -g @anthropic-ai/claude-code@latest
 
npm error code EACCES
npm error syscall rename
npm error path /usr/local/lib/node_modules/@anthropic-ai/claude-code
npm error dest /usr/local/lib/node_modules/@anthropic-ai/.claude-code-1devilah
npm error errno -13
npm error Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@anthropic-ai/claude-code' -> '/usr/local/lib/node_modules/@anthropic-ai/.claude-code-1devilah'
npm error     at async Object.rename (node:internal/fs/promises:784:10)
npm error     at async moveFile (/usr/lib/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js:30:5)
npm error     at async Promise.allSettled (index 0)
npm error     at async [reifyPackages] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
npm error     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
npm error     at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:150:5)
npm error     at async Npm.exec (/usr/lib/node_modules/npm/lib/npm.js:207:9)
npm error     at async module.exports (/usr/lib/node_modules/npm/lib/cli/entry.js:74:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'rename',
npm error   path: '/usr/local/lib/node_modules/@anthropic-ai/claude-code',
npm error   dest: '/usr/local/lib/node_modules/@anthropic-ai/.claude-code-1devilah'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /root/.npm/_logs/2026-05-21T09_30_20_267Z-debug-0.log

@nstrelow thanks for the detailed log dumps in post #23, those were exactly what I needed.

You were right that this is not an ownership issue. The app runs as root, so the EACCES is coming from the AppArmor profile, not from Unix permissions. The profile grants r and ix on /usr/local/** but no w, and npm install -g ...@latest updates the package by renaming the existing directory inside /usr/local/lib/node_modules, which the kernel then denies. npm reports errno -13, exits 243, and the boot wrapper logs it as "failed/timed out", which is a misleading message: the actual cause is a hard permission denial, not the 300s update timeout that was fixed in 1.2.67.

Tracked as issue #13 and shipped in 1.2.70. The short version: I moved the npm global prefix off the read-only /usr tree to /data/npm-global. /data is the app's persistent state directory, the AppArmor profile already grants it rwk, and Supervisor keeps it across restarts and updates. On first boot of 1.2.70 the script seeds /data/npm-global from a staging copy baked into the image, and from then on both auto_update_claude at boot and a manual npm install -g @anthropic-ai/claude-code@latest from the app terminal land their writes there. /usr stays read-only, in line with the 1.2.69 hardening.

To pick it up: Settings -> Apps -> App Store -> three-dot menu -> Reload, then Update on the Claude Code page. After the update, auto_update_claude should work with Protection mode left on.

After update to 1.2.70 Claude won't start:

claude-code:/homeassistant# claude
bash: claude: command not found
claude-code:/homeassistant#

Same here (claude command not found). Here is a snippet from the logs:

[INFO] Seeding /data/npm-global from /opt/npm-global (first boot or fresh install)
cp: cannot access '/opt/npm-global/.': Permission denied
[WARN] Failed to seed /data/npm-global; falling back to image-bundled /opt/npm-global

I dropped back to 1.2.69, and

claude-code:/homeassistant# ls /opt/npm-global/.
ls: cannot access '/opt/npm-global/.': No such file or directory

1.2.71 (getting closer ..... still not working):

claude-code:/homeassistant# which claude
/opt/npm-global/bin/claude
claude-code:/homeassistant# claude
bash: /opt/npm-global/bin/claude: Permission denied

I think I found the source of the problem. It was introduced with the security changes in the permissions. I have now deployed a new version that works on my end. Let me know if that fixes it for you guys. 1.2.72

Just as a precaution that old apparmor configs are lying around I suggest to uninstall and reinstall completely from scratch. That has fixed it for me.

Sorry, for the trouble.

@sproft Thanks for your work to improve security and continue development on this very useful ha app. I make extensive use of node-red for automations and would love for claude to be able to access the node-red config, from what I understand this would need all_addon_configs:rw adding to the map. Is this something you would consider adding, or have an option of enabling?

1.2.72 is working :slight_smile: Thanks!

Heyo, another user was requesting this feature and i can refer you to this Issue:

I decided against enabling this by default as some apps could be holding access_keys that you might not want to give to claude. The Issue includes instructions on how to enable this manually if you want.

If more users request this, I might look into how to enable this on a per app basis, but for now I will refer you to the manual solution. Let me know if it works for you.

Installation via npm is deprecated. Use one of the recommended methods below.

For more installation options, uninstall steps, and troubleshooting, see the setup documentation.

Install Claude Code:

MacOS/Linux (Recommended):

curl -fsSL https://claude.ai/install.sh | bash
Homebrew (MacOS/Linux):

brew install --cask claude-code
Windows (Recommended):

irm https://claude.ai/install.ps1 | iex
WinGet (Windows):

winget install Anthropic.ClaudeCode
NPM (Deprecated):

npm install -g @anthropic-ai/claude-code

Installed
Claude Code Version: 1.2.72

continue get the error "command not found: claude"

the log:
[INFO] Seeding /data/npm-global from /opt/npm-global (first boot or fresh install)

cp: cannot create hard link '/data/npm-global/./lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe' to '/data/npm-global/./lib/node_modules/@anthropic-ai/claude-code/node_modules/@anthropic-ai/claude-code-linux-x64-musl/claude': Permission denied

the npm package is still being updated by anthropic so I don't see an urgent reason to switch the installation. Will keep an eye out though.

Hey @blademckain , I have just updated the App, so hopefully that fixes your Issue, because I was unable to recreate on my side. Let me know if that fixes it.

I am getting this error when trying to open the verification link

Invalid OAuth Request

Missing redirect_uri parameter

What am I doing wrong?

@Honkykong7777 Did you make sure to copy the entire URL over the two lines?

reinstalled

The error in the log is gone
but the terminal still says claude command not found

after try some command to debug with chatgpt, it say the problem is:

uname -m: x86_64
npm: 10.9.1
node: v22.22.2
claude-code: 2.1.186
claude path: /data/npm-global/bin/claude
ldd error: /lib/ld-musl-x86_64.so.1: Permission denied
claude --version hangs with no output

Ok, I found the problem. My CPU doesn't support AVX. Do you know if there will be a version released that doesn't require AVX?

I get this when I try to authorize. I did copy the whole 2 lines. I didn't have a problem with the original fork of this add on. I just moved to this one because you are updating it and he was not. Looking froward to using it with Opus 4.8.
Thanks for doing this. :+1:t2: