2025-08-04 19:13:40 -04:00
# Claude Desktop for Linux
2025-04-05 20:15:38 -04:00
2026-02-08 14:33:18 -05:00
This project provides build scripts to run Claude Desktop natively on Linux systems. It repackages the official Windows application for Linux distributions, producing `.deb` packages (Debian/Ubuntu), `.rpm` packages (Fedora/RHEL), distribution-agnostic AppImages, and an [AUR package ](https://aur.archlinux.org/packages/claude-desktop-appimage ) for Arch Linux.
2025-04-05 20:15:38 -04:00
2025-08-04 19:18:59 -04:00
**Note:** This is an unofficial build script. For official support, please visit [Anthropic's website ](https://www.anthropic.com ). For issues with the build script or Linux implementation, please [open an issue ](https://github.com/aaddrick/claude-desktop-debian/issues ) in this repository.
2025-04-05 20:15:38 -04:00
2026-02-16 14:16:44 -05:00
---
> **⚠️ EXPERIMENTAL: Cowork Mode Support**
2026-02-16 18:35:43 -05:00
> Cowork mode is **enabled by default** in this build. It uses the same TypeScript VM client as Windows, communicating over a Unix domain socket to a local service daemon. To use it, start a Cowork session from the Claude Desktop UI.
> **Important:** Cowork mode on Linux currently runs Claude Code **directly on the host** with no VM isolation. Unlike macOS/Windows, there is no sandbox—Claude has access to your entire home directory. VM-based isolation (QEMU/KVM) is actively being developed. Use Cowork mode only if you understand the security implications.
2026-02-16 14:16:44 -05:00
---
2025-08-04 19:13:40 -04:00
## Features
2025-04-05 20:15:38 -04:00
2025-08-04 19:13:40 -04:00
- **Native Linux Support**: Run Claude Desktop without virtualization or Wine
2026-01-05 19:54:43 -05:00
- **MCP Support**: Full Model Context Protocol integration
2025-08-04 19:13:40 -04:00
Configuration file location: `~/.config/Claude/claude_desktop_config.json`
2026-01-05 19:54:43 -05:00
- **System Integration**:
- Global hotkey support (Ctrl+Alt+Space) - works on X11 and Wayland (via XWayland)
2025-08-04 19:13:40 -04:00
- System tray integration
- Desktop environment integration
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
### Screenshots
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00

2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00

2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00

2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
## Installation
2025-01-17 11:17:57 +01:00
2026-01-24 11:06:05 -05:00
### Using APT Repository (Debian/Ubuntu - Recommended)
2026-01-24 08:53:57 -05:00
Add the repository for automatic updates via `apt` :
```bash
# Add the GPG key
curl -fsSL https://aaddrick.github.io/claude-desktop-debian/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/claude-desktop.gpg
# Add the repository
echo "deb [signed-by=/usr/share/keyrings/claude-desktop.gpg arch=amd64,arm64] https://aaddrick.github.io/claude-desktop-debian stable main" | sudo tee /etc/apt/sources.list.d/claude-desktop.list
# Update and install
sudo apt update
sudo apt install claude-desktop
```
Future updates will be installed automatically with your regular system updates (`sudo apt upgrade` ).
2026-01-24 11:06:05 -05:00
### Using DNF Repository (Fedora/RHEL - Recommended)
Add the repository for automatic updates via `dnf` :
```bash
# Add the repository
sudo curl -fsSL https://aaddrick.github.io/claude-desktop-debian/rpm/claude-desktop.repo -o /etc/yum.repos.d/claude-desktop.repo
# Install
sudo dnf install claude-desktop
```
Future updates will be installed automatically with your regular system updates (`sudo dnf upgrade` ).
2026-02-08 14:33:18 -05:00
### Using AUR (Arch Linux)
The [`claude-desktop-appimage` ](https://aur.archlinux.org/packages/claude-desktop-appimage ) package is available on the AUR and is automatically updated with each release.
```bash
# Using yay
yay -S claude-desktop-appimage
# Or using paru
paru -S claude-desktop-appimage
```
The AUR package installs the AppImage build of Claude Desktop.
2025-08-04 19:13:40 -04:00
### Using Pre-built Releases
2025-01-17 11:17:57 +01:00
2026-01-24 10:59:53 -05:00
Download the latest `.deb` , `.rpm` , or `.AppImage` from the [Releases page ](https://github.com/aaddrick/claude-desktop-debian/releases ).
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
### Building from Source
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
#### Prerequisites
2024-12-26 11:08:01 -05:00
2026-01-24 10:59:53 -05:00
- Linux distribution (Debian/Ubuntu, Fedora/RHEL, or other)
2025-08-04 19:13:40 -04:00
- Git
- Basic build tools (automatically installed by the script)
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
#### Build Instructions
2024-12-26 11:08:01 -05:00
```bash
2025-08-04 19:13:40 -04:00
# Clone the repository
2025-01-18 12:10:28 +01:00
git clone https://github.com/aaddrick/claude-desktop-debian.git
2025-02-26 11:43:42 +05:30
cd claude-desktop-debian
2024-12-26 11:08:01 -05:00
2026-01-24 10:59:53 -05:00
# Build with auto-detected format (based on your distro)
2025-04-06 20:31:28 -04:00
./build.sh
2025-04-03 17:22:28 -04:00
2026-01-24 10:59:53 -05:00
# Or specify a format explicitly:
./build.sh --build deb # Debian/Ubuntu .deb package
./build.sh --build rpm # Fedora/RHEL .rpm package
./build.sh --build appimage # Distribution-agnostic AppImage
2025-04-03 17:22:28 -04:00
2025-08-04 19:13:40 -04:00
# Build with custom options
./build.sh --build deb --clean no # Keep intermediate files
2025-12-05 20:33:09 +01:00
# Build using a locally downloaded installer
# (useful when the bundled download URL is outdated)
./build.sh --exe /path/to/Claude-Setup.exe
2025-04-03 01:27:06 -04:00
```
2026-01-24 10:59:53 -05:00
The build script automatically detects your distribution and selects the appropriate package format:
| Distribution | Default Format | Package Manager |
|--------------|----------------|-----------------|
| Debian, Ubuntu, Mint | `.deb` | apt |
| Fedora, RHEL, CentOS | `.rpm` | dnf |
2026-02-08 14:33:18 -05:00
| Arch Linux | `.AppImage` (via AUR) | yay/paru |
2026-01-24 10:59:53 -05:00
| Other | `.AppImage` | - |
2025-08-04 19:13:40 -04:00
#### Installing the Built Package
2025-04-03 01:27:06 -04:00
2026-01-24 10:59:53 -05:00
**For .deb packages (Debian/Ubuntu):**
2025-04-03 01:27:06 -04:00
```bash
2026-01-24 10:59:53 -05:00
sudo apt install ./claude-desktop_VERSION_ARCHITECTURE.deb
# Or: sudo dpkg -i ./claude-desktop_VERSION_ARCHITECTURE.deb
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
# If you encounter dependency issues:
sudo apt --fix-broken install
2024-12-26 11:08:01 -05:00
```
2026-01-24 10:59:53 -05:00
**For .rpm packages (Fedora/RHEL):**
```bash
sudo dnf install ./claude-desktop-VERSION-1.ARCH.rpm
# Or: sudo rpm -i ./claude-desktop-VERSION-1.ARCH.rpm
```
2025-08-04 19:13:40 -04:00
**For AppImages:**
```bash
# Make executable
chmod +x ./claude-desktop-*.AppImage
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
# Run directly
./claude-desktop-*.AppImage
2025-04-03 01:27:06 -04:00
2025-08-19 23:11:21 -04:00
# Or integrate with your system using Gear Lever
2025-08-04 19:13:40 -04:00
```
2025-04-03 01:27:06 -04:00
2025-08-19 23:11:21 -04:00
**Note:** AppImage login requires proper desktop integration. Use [Gear Lever ](https://flathub.org/apps/it.mijorus.gearlever ) or manually install the provided `.desktop` file to `~/.local/share/applications/` .
**Automatic Updates:** AppImages downloaded from GitHub releases include embedded update information and work seamlessly with Gear Lever for automatic updates. Locally-built AppImages can be manually configured for updates in Gear Lever.
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
## Configuration
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
### MCP Configuration
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
Model Context Protocol settings are stored in:
```
~/.config/Claude/claude_desktop_config.json
```
2024-12-26 11:08:01 -05:00
2026-01-05 19:54:43 -05:00
### Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `CLAUDE_USE_WAYLAND` | unset | Set to `1` to use native Wayland instead of XWayland. Note: Global hotkeys won't work in native Wayland mode. |
**Wayland Note:** By default, Claude Desktop uses X11 mode (via XWayland) on Wayland sessions to ensure global hotkeys work. If you prefer native Wayland and don't need global hotkeys:
```bash
# One-time launch
CLAUDE_USE_WAYLAND=1 claude-desktop
# Or add to your environment permanently
export CLAUDE_USE_WAYLAND=1
```
2025-08-04 19:13:40 -04:00
### Application Logs
2025-03-29 02:31:42 -04:00
2025-08-04 19:13:40 -04:00
Runtime logs are available at:
```
2026-01-05 19:54:43 -05:00
~/.cache/claude-desktop-debian/launcher.log
2025-08-04 19:13:40 -04:00
```
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
## Uninstallation
2025-03-29 02:31:42 -04:00
2026-01-24 11:06:05 -05:00
**For APT repository installations (Debian/Ubuntu):**
2026-01-24 08:53:57 -05:00
```bash
# Remove package
sudo apt remove claude-desktop
# Remove the repository and GPG key
sudo rm /etc/apt/sources.list.d/claude-desktop.list
sudo rm /usr/share/keyrings/claude-desktop.gpg
```
2026-01-24 11:06:05 -05:00
**For DNF repository installations (Fedora/RHEL):**
```bash
# Remove package
sudo dnf remove claude-desktop
# Remove the repository
sudo rm /etc/yum.repos.d/claude-desktop.repo
```
2026-02-08 14:33:18 -05:00
**For AUR installations (Arch Linux):**
```bash
# Using yay
yay -R claude-desktop-appimage
# Or using paru
paru -R claude-desktop-appimage
# Or using pacman directly
sudo pacman -R claude-desktop-appimage
```
2026-01-24 08:53:57 -05:00
**For .deb packages (manual install):**
2025-03-29 02:31:42 -04:00
```bash
2025-08-04 19:13:40 -04:00
# Remove package
2026-01-24 10:59:53 -05:00
sudo apt remove claude-desktop
# Or: sudo dpkg -r claude-desktop
2025-03-29 02:31:42 -04:00
2025-08-04 19:13:40 -04:00
# Remove package and configuration
2025-03-29 02:31:42 -04:00
sudo dpkg -P claude-desktop
```
2026-01-24 10:59:53 -05:00
**For .rpm packages:**
```bash
# Remove package
sudo dnf remove claude-desktop
# Or: sudo rpm -e claude-desktop
```
2025-08-04 19:13:40 -04:00
**For AppImages:**
1. Delete the `.AppImage` file
2. Remove the `.desktop` file from `~/.local/share/applications/`
2025-08-19 23:11:21 -04:00
3. If using Gear Lever, use its uninstall option
2025-03-29 02:31:42 -04:00
2025-08-04 19:13:40 -04:00
**Remove user configuration (both formats):**
2025-03-29 02:31:42 -04:00
```bash
2025-04-03 01:27:06 -04:00
rm -rf ~/.config/Claude
2025-03-29 02:31:42 -04:00
```
2025-08-04 19:13:40 -04:00
## Troubleshooting
### Window Scaling Issues
If the window doesn't scale correctly on first launch:
1. Right-click the Claude Desktop tray icon
2. Select "Quit" (do not force quit)
3. Restart the application
2025-03-29 02:31:42 -04:00
2025-08-04 19:13:40 -04:00
This allows the application to save display settings properly.
2024-12-26 11:08:01 -05:00
2026-01-05 19:54:43 -05:00
### Global Hotkey Not Working (Wayland)
If the global hotkey (Ctrl+Alt+Space) doesn't work, ensure you're not running in native Wayland mode:
1. Check your logs at `~/.cache/claude-desktop-debian/launcher.log`
2. Look for "Using X11 backend via XWayland" - this means hotkeys should work
3. If you see "Using native Wayland backend", unset `CLAUDE_USE_WAYLAND` or ensure it's not set to `1`
**Note:** Native Wayland mode doesn't support global hotkeys due to Electron/Chromium limitations with XDG GlobalShortcuts Portal.
2025-08-04 19:13:40 -04:00
### AppImage Sandbox Warning
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
AppImages run with `--no-sandbox` due to electron's chrome-sandbox requiring root privileges for unprivileged namespace creation. This is a known limitation of AppImage format with Electron applications.
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
For enhanced security, consider:
- Using the .deb package instead
- Running the AppImage within a separate sandbox (e.g., bubblewrap)
2025-08-19 23:11:21 -04:00
- Using Gear Lever's integrated AppImage management for better isolation
2024-12-26 11:08:01 -05:00
2026-01-24 01:47:40 +00:00
### Authentication Errors (401)
If you encounter recurring "API Error: 401" messages after periods of inactivity, the cached OAuth token may need to be cleared. This is an upstream application issue reported in [#156 ](https://github.com/aaddrick/claude-desktop-debian/issues/156 ).
To fix manually (credit: [MrEdwards007 ](https://github.com/MrEdwards007 )):
1. Close Claude Desktop completely
2. Edit `~/.config/Claude/config.json`
3. Remove the line containing `"oauth:tokenCache"` (and any trailing comma if needed)
4. Save the file and restart Claude Desktop
5. Log in again when prompted
A scripted solution is also available at the bottom of [this comment ](https://github.com/aaddrick/claude-desktop-debian/issues/156#issuecomment-2682547498 ).
2025-08-04 19:13:40 -04:00
## Technical Details
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
### How It Works
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
Claude Desktop is an Electron application distributed for Windows. This project:
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
1. Downloads the official Windows installer
2. Extracts application resources
3. Replaces Windows-specific native modules with Linux-compatible implementations
2026-01-24 10:59:53 -05:00
4. Repackages as one of:
- **Debian package (.deb)**: For Debian, Ubuntu, and derivatives
- **RPM package (.rpm)**: For Fedora, RHEL, CentOS, and derivatives
- **AppImage**: Portable, distribution-agnostic executable
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
### Build Process
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
The build script (`build.sh` ) handles:
- Dependency checking and installation
- Resource extraction from Windows installer
- Icon processing for Linux desktop standards
- Native module replacement
- Package generation based on selected format
2024-12-26 11:08:01 -05:00
2026-01-05 17:35:53 -05:00
### Automated Version Detection
2025-04-03 01:27:06 -04:00
2026-01-05 17:35:53 -05:00
A GitHub Actions workflow runs daily to check for new Claude Desktop releases:
1. Uses Playwright to resolve Anthropic's Cloudflare-protected download redirects
2. Compares resolved URLs with those in `build.sh`
3. If a new version is detected:
- Updates `build.sh` with new download URLs
- Creates a new release tag
- Triggers automated builds for both architectures
This ensures the repository stays up-to-date with official releases automatically.
### Manual Updates
If you need to build with a specific version before the automation catches it:
2025-12-05 20:33:09 +01:00
1. **Use a local installer ** : Download the latest installer from [claude.ai/download ](https://claude.ai/download ) and build with:
```bash
./build.sh --exe /path/to/Claude-Setup.exe
```
2. **Update the URL ** : Modify the `CLAUDE_DOWNLOAD_URL` variables in `build.sh` .
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
## Acknowledgments
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
This project was inspired by [k3d3's claude-desktop-linux-flake ](https://github.com/k3d3/claude-desktop-linux-flake ) and their [Reddit post ](https://www.reddit.com/r/ClaudeAI/comments/1hgsmpq/i_successfully_ran_claude_desktop_natively_on/ ) about running Claude Desktop natively on Linux.
2025-04-03 01:27:06 -04:00
2025-08-04 19:13:40 -04:00
Special thanks to:
- **k3d3** for the original NixOS implementation and native bindings insights
- **[emsi ](https://github.com/emsi/claude-desktop )** for the title bar fix and alternative implementation approach
2026-01-05 17:35:53 -05:00
- **[leobuskin ](https://github.com/leobuskin/unofficial-claude-desktop-linux )** for the Playwright-based URL resolution approach
2026-02-08 14:33:18 -05:00
- **[yarikoptic ](https://github.com/yarikoptic )** for codespell support and shellcheck compliance
- **[IamGianluca ](https://github.com/IamGianluca )** for build dependency check improvements
- **[ing03201 ](https://github.com/ing03201 )** for IBus/Fcitx5 input method support
- **[ajescudero ](https://github.com/ajescudero )** for pinning @electron/asar for Node compatibility
- **[delorenj ](https://github.com/delorenj )** for Wayland compatibility support
- **[Regen-forest ](https://github.com/Regen-forest )** for suggesting Gear Lever as AppImageLauncher replacement
- **[niekvugteveen ](https://github.com/niekvugteveen )** for fixing Debian packaging permissions
- **[speleoalex ](https://github.com/speleoalex )** for native window decorations support
- **[imaginalnika ](https://github.com/imaginalnika )** for moving logs to `~/.cache/`
- **[richardspicer ](https://github.com/richardspicer )** for the menu bar visibility fix on Linux
- **[jacobfrantz1 ](https://github.com/jacobfrantz1 )** for Claude Desktop code preview support and quick window submit fix
- **[janfrederik ](https://github.com/janfrederik )** for the `--exe` flag to use a local installer
- **[MrEdwards007 ](https://github.com/MrEdwards007 )** for discovering the OAuth token cache fix
- **[lizthegrey ](https://github.com/lizthegrey )** for version update contributions
- **[mathys-lopinto ](https://github.com/mathys-lopinto )** for the AUR package and automated deployment
- **[pkuijpers ](https://github.com/pkuijpers )** for root cause analysis of the RPM repo GPG signing issue
- **[dlepold ](https://github.com/dlepold )** for identifying the tray icon variable name bug with a working fix
- **[Voork1144 ](https://github.com/Voork1144 )** for detailed analysis of the tray icon minifier bug
2026-02-16 13:56:29 -05:00
- **[milog1994 ](https://github.com/milog1994 )** for Linux UX improvements including popup detection, functional stubs, and Wayland compositor support
2026-02-16 14:00:51 -05:00
- **[jarrodcolburn ](https://github.com/jarrodcolburn )** for passwordless sudo support in container/CI environments
2026-02-16 14:09:43 -05:00
- **[chukfinley ](https://github.com/chukfinley )** for experimental Cowork mode support on Linux
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
For NixOS users, please refer to [k3d3's repository ](https://github.com/k3d3/claude-desktop-linux-flake ) for a Nix-specific implementation.
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
## License
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
The build scripts in this repository are dual-licensed under:
- MIT License (see [LICENSE-MIT ](LICENSE-MIT ))
- Apache License 2.0 (see [LICENSE-APACHE ](LICENSE-APACHE ))
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
The Claude Desktop application itself is subject to [Anthropic's Consumer Terms ](https://www.anthropic.com/legal/consumer-terms ).
2024-12-26 11:08:01 -05:00
2025-08-04 19:13:40 -04:00
## Contributing
2024-12-26 11:08:01 -05:00
2025-08-09 21:58:44 -04:00
Contributions are welcome! By submitting a contribution, you agree to license it under the same dual-license terms as this project.