# Install the Factory App on Linux

Install the Factory App on Linux with the install script or the .deb package, then update or remove it.

The Factory App runs on x64 and ARM64 Linux. Install it with a script that works on any distribution, or with a `.deb` package on Debian and Ubuntu.

For macOS and Windows, follow the [Factory App quickstart](/factory-app/quickstart).

## Choose an install method

| Method | Installs to | Root access | Updates |
| :----- | :---------- | :---------- | :------ |
| [Install script](#install-with-the-script) | `~/.local/share/factory-desktop`, for your user | Not needed | The app updates itself |
| [`.deb` package](#install-the-deb-package) | `/usr/lib/factory-desktop`, for every user | Needed | The app links you to each new `.deb` |

<Note>
  On Ubuntu 24.04 and later, install the `.deb`. AppArmor restricts unprivileged user namespaces on those releases, and only the `.deb` ships the sandbox helper the app needs to start without them.
</Note>

## Requirements

- An x64 CPU that supports AVX2, or an ARM64 CPU.
- A Secret Service provider for sign-in credentials. GNOME and KDE include one. On a minimal window manager, install and start GNOME Keyring, KWallet, or KeePassXC with Secret Service integration.
- For the install script: `curl`, `tar`, `sha256sum`, `flock`, and OpenSSL 3.

For the hostnames the app must reach, see the [outbound network allowlist](/enterprise/network-and-deployment#outbound-network-allowlist).

## Install with the script

```bash
curl -fsSL https://downloads.factory.ai/factory-desktop/install.sh | sh
```

The script detects your architecture, downloads the latest release, and verifies its signed checksum before extracting it. It then adds a `factory-desktop` launcher to `~/.local/bin` and a **Factory** entry to your application menu.

To install a specific release, pass its version:

```bash
curl -fsSL https://downloads.factory.ai/factory-desktop/install.sh | sh -s -- --version <version>
```

## Install the `.deb` package

Run these commands in Bash. They download the latest `.deb` for your architecture and install it with its dependencies:

```bash
version=$(curl -fsSL https://downloads.factory.ai/factory-desktop/LATEST)
arch=$(dpkg --print-architecture)
curl -fLO "https://downloads.factory.ai/factory-desktop/releases/${version}/linux/${arch/amd64/x64}/factory-desktop_${version}_${arch}.deb"
sudo apt install "./factory-desktop_${version}_${arch}.deb"
```

## Sign in

Open **Factory** from your application menu, or run `factory-desktop` in a terminal, and sign in with your account. Then continue with [step 2 of the quickstart](/factory-app/quickstart#step-2-connect-to-your-codebase) to connect your codebase.

## Update

- **Script installs** update from inside the app. When the app offers an update and you accept it, the app downloads the release, verifies its signature, switches to it, and restarts. Running the install script again also installs the latest release; restart the app to use it.
- **`.deb` installs** update through a new package. Your package manager owns the installed files, so the app does not replace them. When the app offers an update, accepting it opens the download for the new `.deb`. Install that file with `sudo apt install`, as in the commands above.

To block in-app updates for your organization, turn on **Disable Auto Update** under **Enterprise Controls → Agent Behavior**. The setting applies to Linux script installs the same way it applies to macOS and Windows.

## Uninstall

Remove a script install, including its launcher and menu entry:

```bash
curl -fsSL https://downloads.factory.ai/factory-desktop/install.sh | sh -s -- --uninstall
```

Remove a `.deb` install:

```bash
sudo apt remove factory-desktop
```

Neither command removes your settings in `~/.config` and `~/.factory`.

## Troubleshoot installation

<Troubleshooting>
  <TroubleshootingItem title="The app does not start after a script install">
    Check whether the script warned that AppArmor restricts unprivileged user namespaces. If it did, uninstall the script install and install the `.deb` instead.
  </TroubleshootingItem>

  <TroubleshootingItem title="Sign-in does not complete">
    The app stores sign-in credentials in a Secret Service provider, and the install script warns when it finds none. Install and start GNOME Keyring, KWallet, or KeePassXC with Secret Service integration, then sign in again.
  </TroubleshootingItem>

  <TroubleshootingItem title="The script reports that signature verification failed">
    The script verifies each release with OpenSSL 3. If `openssl version` reports 1.x, upgrade OpenSSL or install the `.deb`. If it reports 3.x, the download did not match Factory's signature: run the script again, and contact [support@factory.com](mailto:support@factory.com) if it fails a second time.
  </TroubleshootingItem>
</Troubleshooting>

<RelatedLinks>
  <RelatedLink href='/factory-app/quickstart' title='Factory App quickstart'>
    Connect a codebase and start a session.
  </RelatedLink>
  <RelatedLink href='/enterprise/hierarchical-settings-and-org-control' title='Enterprise Controls'>
    Configure organization-managed settings.
  </RelatedLink>
</RelatedLinks>
