Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Flox makes it easy to work locally, test in CI, and deploy to production—all w

<CardGroup cols={2}>
<Card title="Quick start with the Flox CLI" icon="terminal">
Install `flox` with `apt`, `yum`, `brew`, or a standalone installer to get your dev environment set up in minutes.
Install `flox` with one command (`curl -fsSL https://get.flox.dev | sh`), or with `apt`, `yum`, `brew`, or a standalone installer to get your dev environment set up in minutes.

[Download & Install](/install-flox/install)

Expand Down
127 changes: 112 additions & 15 deletions install-flox/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,103 @@ description: "How to install or upgrade the Flox CLI"
Flox 1.14.0 online.
</Note>
<Tabs>
<Tab title="Install Script">

## Install with one command

The install script detects your OS and CPU architecture and installs Flox
with the best method available on your machine. It supports MacOS and
Debian- and Red Hat-based Linux distributions, on `x86_64` and `aarch64`.

```bash
curl -fsSL https://get.flox.dev | sh
```

The script picks the install method that matches your platform:

* On MacOS, it downloads and runs the `.pkg` installer.
* On Debian- and Ubuntu-family systems, it installs the `.deb` package
with `apt`.
* On Fedora- and RHEL-family systems, it installs the `.rpm` package
with `dnf` or `yum`.

If Flox is already installed, the script makes no changes and instead
prints the upgrade command for your package manager.

<Note>
**Privileged commands are shown before they run**

Before using `sudo`, the script prints the exact commands it is about
to run with elevated privileges, so you know what you are agreeing to.
You may be prompted for your `sudo` password.
</Note>

Here is what an install looks like on Ubuntu:

```console
$ curl -fsSL https://get.flox.dev | sh
==> Resolving the latest Flox version (stable channel)...
==> Installing Flox 1.14.0 for x86_64-linux
==> Downloading https://downloads.flox.dev/by-env/stable/deb/flox-1.14.0.x86_64-linux.deb
==> The following commands will be run with sudo:
sudo apt-get install -y /tmp/flox-install.XXXXXX/flox-1.14.0.x86_64-linux.deb
==> Installing the .deb package with apt
...
```

<Info>
**If Nix is already installed on your system**

The script does not install Flox through Nix, and it will not modify
your existing Nix installation. When it detects Nix (the `nix` command
or a populated `/nix/store`), it stops and points you to the
[Nix](#nix) tab, which covers installing Flox with an existing Nix.
</Info>
<Info>
**Unsupported systems**

The script refuses to run on systems where the native packages are
untested: immutable (ostree-based) distributions such as Fedora
Silverblue or CoreOS, openSUSE/SLES, and RPM-family systems without
`dnf` or `yum`. On those systems, install Nix first and then follow the
[Nix](#nix) tab instructions.
</Info>

## Pin a channel or version

The script honors two environment variables:

```console
$ curl -fsSL https://get.flox.dev | FLOX_CHANNEL=<channel> sh
$ curl -fsSL https://get.flox.dev | FLOX_VERSION=<version> sh
```

`FLOX_CHANNEL` (default `stable`) selects the release channel.
`FLOX_VERSION` pins an exact version instead of the channel's latest.

## Verify Flox installation

If the following command returns without error then you're ready to get
started!

```console
$ flox --version
1.14.0

```

The version you see might be different.

## Upgrade existing Flox installation

The script does not upgrade an existing installation. Re-running it on a
system that already has Flox prints the upgrade command for your package
manager, for example:

```bash
sudo apt-get update && sudo apt-get install --only-upgrade flox
```
</Tab>
<Tab title="MacOS">

Install Flox with the standalone [`.pkg` installer](#pkg-installer) or
Expand Down Expand Up @@ -108,7 +205,7 @@ description: "How to install or upgrade the Flox CLI"

The package will register a new source in `/etc/apt/sources.list.d` to enable upgrades via `apt`.
</Note>
**Download and install the package**
## Download and install the package

1. Download flox.deb for your system architecture:

Expand Down Expand Up @@ -149,7 +246,7 @@ description: "How to install or upgrade the Flox CLI"
The version of Nix installed by Flox tracks the stable version of Nix in nixpkgs, occasionally adding additional backports or patches.
Nix is usually updated monthly, although if Nix makes breaking changes, updates may be less frequent.
</Accordion>
**Verify Flox installation**
## Verify Flox installation

If the following command returns without error then you're ready to get
started!
Expand All @@ -162,7 +259,7 @@ description: "How to install or upgrade the Flox CLI"

The version you see might be different.

**Upgrade existing Flox installation**
## Upgrade existing Flox installation

```
sudo apt update;
Expand All @@ -179,7 +276,7 @@ description: "How to install or upgrade the Flox CLI"
The rpm will register a package repository in `/etc/yum.repos.d` to enable upgrades.
via `yum`, `dnf` and other compatible tools.
</Note>
**Download and install the package**
## Download and install the package

1. Download flox.rpm for your system architecture:

Expand Down Expand Up @@ -221,7 +318,7 @@ description: "How to install or upgrade the Flox CLI"
The version of Nix installed by Flox tracks the stable version of Nix in nixpkgs, occasionally adding additional backports or patches.
Nix is usually updated monthly, although if Nix makes breaking changes, updates may be less frequent.
</Accordion>
**Verify Flox installation**
## Verify Flox installation

If the following command returns without error then you're ready to get
started!
Expand All @@ -234,7 +331,7 @@ description: "How to install or upgrade the Flox CLI"

The version you see might be different.

**Upgrade existing Flox installation**
## Upgrade existing Flox installation

```
sudo yum update flox
Expand Down Expand Up @@ -520,13 +617,13 @@ description: "How to install or upgrade the Flox CLI"
If you have Docker installed then you can also run flox in a container to
try it out before installing on your system.

**Invoke Flox container**
## Invoke Flox container

```
docker run --pull always --rm -it ghcr.io/flox/flox
```

**Verify Flox installation**
## Verify Flox installation

If the following command returns without error then you're ready to get
started!
Expand Down Expand Up @@ -571,14 +668,14 @@ description: "How to install or upgrade the Flox CLI"
* terminate distribution: `wsl --terminate <name>`
* unregister and delete distribution: `wsl --unregister <name>`

**Supported distributions**
## Supported distributions

Please follow the steps below to install Flox on the distribution of your
choice:

<Accordion title="Ubuntu">

**Download and install the package**
## Download and install the package

1. Download flox.deb for your system architecture:

Expand All @@ -599,7 +696,7 @@ description: "How to install or upgrade the Flox CLI"
sudo apt-get install policycoreutils semodule-utils tar wget xz-utils
```

**Download and install the package**
## Download and install the package

1. Download flox.deb for your system architecture:

Expand All @@ -620,7 +717,7 @@ description: "How to install or upgrade the Flox CLI"
sudo yum install tar xz
```

**Download and install the package**
## Download and install the package

1. Download flox.rpm for your system architecture:

Expand Down Expand Up @@ -650,7 +747,7 @@ description: "How to install or upgrade the Flox CLI"
You can disregard this message as we will be configuring the
`nix-daemon` to start automatically in the next section.
</Info>
**Configure `nix-daemon` to start on activation**
## Configure `nix-daemon` to start on activation

Once Flox has been installed on your WSL distribution the `nix-daemon` will
need to be automatically started as you start your WSL instance.
Expand All @@ -670,7 +767,7 @@ description: "How to install or upgrade the Flox CLI"
```
nix --extra-experimental-features nix-command store ping
```
**Verify Flox installation**
## Verify Flox installation

If the following command returns without error then you're ready to get
started!
Expand All @@ -683,7 +780,7 @@ description: "How to install or upgrade the Flox CLI"

The version you see might be different.

**Upgrade existing Flox installation**
## Upgrade existing Flox installation

Please follow the instructions provided on either the Debian or RPM tab
(whichever matches the existing Linux Distribution installed with your
Expand Down
10 changes: 9 additions & 1 deletion install-flox/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ If you have a partial Flox installation, you can run Flox uninstallation.


<Tabs>
<Tab title="Install Script">

The install script installs Flox with your system package manager.
Follow the tab that matches how the script installed Flox:
[MacOS (Pkg)](#macos-pkg) on MacOS,
[Debian](#debian) on Debian- and Ubuntu-family systems, or
[RPM](#rpm) on Fedora- and RHEL-family systems.
</Tab>
<Tab title="MacOS (Pkg)">

<Warning>
Expand Down Expand Up @@ -398,7 +406,7 @@ filling out the `Install failure` Issue template.
Please include:

- Your operating system and version
- The installation method you used (Pkg, Homebrew, Debian, RPM, etc.)
- The installation method you used (install script, Pkg, Homebrew, Debian, RPM, etc.)
- The full install log output (see [Finding install logs](#finding-install-logs)
above)
- Any error messages you encountered
9 changes: 9 additions & 0 deletions install-flox/uninstall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Here's how to **completely remove `flox` from your system**.


<Tabs>
<Tab title="Install Script">

The install script installs Flox with your system package manager.
Uninstall with the method that matches how the script installed Flox:

* On MacOS, follow the [MacOS (Pkg)](#macos-pkg) tab.
* On Debian- and Ubuntu-family systems, follow the [Debian](#debian) tab.
* On Fedora- and RHEL-family systems, follow the [RPM](#rpm) tab.
</Tab>
<Tab title="MacOS (Pkg)">

<Warning>
Expand Down
4 changes: 3 additions & 1 deletion tutorials/installing-from-repo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ as they are released.

<Note>
When you [download and install a Flox `.deb` or `.rpm` package](/install-flox/install),
the installer performs these steps for you.
the installer performs these steps for you, and the
[install script](/install-flox/install) (`curl -fsSL https://get.flox.dev | sh`)
automates the download as well.
But you can easily script the steps below to automate this process.
</Note>
These instructions cover the process of installing from Flox's repository
Expand Down