[FEATURE] Provide a switch or env overriide to allow isntalling the claude executable into a LFS standard location like /opt/claude.

Resolved 💬 4 comments Opened Feb 2, 2026 by lembark Closed Feb 5, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I run claude on a shared business server. We do not allow installing code into users' home directories to avoid issues with security, consistency, and filesystem bloat. One issues we have to avoid is users installing broken or inconsistent versions of executables. At this point we have been able to manhandle npm into a consistent environment with all users sharing /opt/npm and our SysAdmins maintaining a consistent, tested environment for the node/npm products.

We will not be allowing users to hack their home directories with individual claude product installs going forward, but the npm install for claude has been deprecated.

Aside: I'm putting this into 'Configuration & Settings' as a topic as there is nothing that addresses installation specifically.

Proposed Solution

It should not be rocket science to allow for "claude install --prefix=/opt/claude/<version> -- which would at least follow the Linux FHS:

https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html

specifically the /opt filesystem:

https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html

In a perfect world you'd install the executable into /opt/claude/<version>/bin with any documentation in ./doc, etc, so that new versions could be tested before overwriting old ones. At the very least adding a switch '--prefix' for env var override (e.g., CLAUDE_PREFIX) would greatly simplify managing the product in shared environments and simplify handing it with the standard filesystem.

Standardizing node's environment was hell enough, but doable. It shouldn't be this hard to simply keep production code clean. Every product installer since BSD and GNU has had a prefix-ish setting, you already process command line switches in the standard code, adding one for the installer should be doable and would keep claude much more manageable.

Alternative Solutions

Hacking a symlink in the filesystem is one workaround, but leaves us with security issues (e.g., someone hacking the symlink in a home directory to malware).

We could create a special 'claude-install' user with a home directory of /opt/claude, but that seill leaves us having to hack links for .local/claude in /opt to leave the executable in a reasonable place.

Priority

High - Significant impact on productivity

Feature Category

Configuration and settings

Use Case Example

cd /var/tmp/download;
wget "$GCS_BUCKET/$version/$platform/claude";
chmod +x ./claude;
./claude install --prefix=/opt/claude/$version/claude;

Additional Context

Anyone attempting to use this executable in financial-, defense-, or HIPPA-compliant environments will hit a brick wall with this installer. We can hack around the shell script by hardwiring our own DOWNLOAD_DIR -- or hacking our own install shell script. The post-download execution of "claude install" we can't control from here.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗