> For the complete documentation index, see [llms.txt](https://cider.gitbook.io/welcome-to-gitbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cider.gitbook.io/welcome-to-gitbook/docs/3.legacy-docs/2.compilation/compiling-on-linux.md).

# Compiling on Linux

## Getting Started

Recommended / Required Development Utilities

* [NodeJS 14.0.0 or greater](https://nodejs.org/)
* [pnpm](https://pnpm.io/) (*Optional, but highly recommended*)
* [Git](https://git-scm.com)
* [Python 3.8 or greater](https://www.python.org/downloads/)
* Basic Command Line Knowledge

::alert{type="warning"} While not required, PNPM is **recommended** for compiling Cider, and you can install it by using:

`npm install -g pnpm` ::

### Cloning the repository

Open a terminal window in the directory you'd like Git to clone to and enter the following command

```
git clone https://github.com/ciderapp/Cider.git
```

**Optionally**, if you'd like to use the **Development** branch of Cider to test upcoming features switch your branch by moving your terminal into the directory and using git to checkout the branch by entering the following commands

```
cd Cider\
git checkout develop
```

::alert{type="note" title="Success"} If you'd like to update your repository in the future to keep up to date, use the command *(Make sure you're in the directory, you originally cloned in)*

`git pull`

### Installing Dependencies

Now for the fun part, by using `pnpm`, `npm` or `yarn` (we'll be using `pnpm` in this case) enter the following command to automatically obtain all required dependencies for installation.

{% tabs %}
{% tab title="pnpm" %}

```
pnpm install
```

{% endtab %}

{% tab title="npm" %}

```
npm install --force
```

{% endtab %}

{% tab title="yarn" %}

```
yarn install
```

{% endtab %}
{% endtabs %}

::alert{type="note"} This step could take a little while on some machines. ::

### Compiling Cider

This step takes a little while on the first compilation so bear with it as it does what it needs to do.

Compiling Cider for specific CPU architectures is a smart thing to do and you can do it by adding **switches** to the `dist` argument as displayed.

{% tabs %}
{% tab title="pnpm" %}

```
// For x86_64 machines. (Modern PC's)
pnpm dist -l --x64

// For x86 ONLY machines. (Legacy PC's)
pnpm dist -l --ia32
```

{% endtab %}

{% tab title="npm" %}

```
// For x86_64 machines. (Modern PC's)
npm run dist -l --x64

// For x86 ONLY machines. (Legacy PC's)
npm run dist -l --ia32
```

{% endtab %}

{% tab title="yarn" %}

```
// For x86_64 machines. (Modern PC's)
yarn dist -l --x64

// For x86 ONLY machines. (Legacy PC's)
yarn dist -l --ia32
```

{% endtab %}
{% endtabs %}

::alert{type="warning"} On some low-end machines this process could take up to \~10 minutes. ::

::alert{type="warning"} This command would build three separate packages of Cider, AppImage, .deb, and .snap packages ::

### Compiling Cider from AUR

If you are on an arch-based Linux distribution and have an AUR helper (`pacman/yay/paru/etc.`), then you are in luck. Cider has 2 PKGBUILD's in the Arch User Repository.

Assuming you already have access to the AUR and have a friendly AUR helper (we will use `yay` for this example) enter the following command to automatically obtain all required dependencies for installation.

::alert{type="tip"} If you like to live on the bleeding edge, use the `cider-git` package, this will compile directly from the [main](https://github.com/ciderapp/Cider/tree/main) branch. :;

```
yay -S cider
```

::alert{type="warning"} Running this on Node.js 17 or later will fail. This is due to Node.js 17 no longer writing `openssl_fips` to `config.gypi` so it's not there in Node.js 17's `process.config`. It is suggested to downgrade to `nodejs-lts-gallium` to resolve this issue. ::

### Installing Cider

Your new Cider installation setup file is ready for you! You can find your setup executable in your cloned folder directory on your system in the subfolder `dist/` and from there you'll see your new Setup files. Choose the installer that best matches your distro.

::alert{type="note" title="Success"} Congrats! You've successfully compiled your own build of Cider! ::


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cider.gitbook.io/welcome-to-gitbook/docs/3.legacy-docs/2.compilation/compiling-on-linux.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
