Skip to main content

Install on Linux

Quick install

curl -fsSL https://download.next-hat.com/scripts/get-nanocl.sh | sh

This script will download and install the latest version of Nanocl for your platform. It doesn't require root privileges. Since it install it in your home directory, under the ~/.nanocl directory. And add a ~/.nanocl/env file in your shell profile to have the nanocl command in your PATH. But then the command will only be available for your user.

info

The script will fallback to build from source from crates.io if no prebuilt binary is available for your platform. Therefore no man pages will be installed in this case.

Manual install

Get the CLI tarball

You can grab the nanocl tarball directly from the GitHub releases page.
You can also use the following commands to download and extract the tarball:

curl -LO https://github.com/next-hat/nanocl/releases/download/nanocl-0.18.0/nanocl_0.18.0_linux_amd64.tar.gz
tar -xzf nanocl_0.18.0_linux_amd64.tar.gz

Extracted directory layout:

.
├─ bin/
│ └─ nanocl (the nanocl binary)
└─ share/
└─ man/
└─ man1/ (multiple man pages for nanocl and its subcommands)

We now need to move the nanocl binary and it's man pages to appropriate locations.

sudo mv ./bin/nanocl /usr/local/bin
sudo mv ./share/man/man1/* /usr/local/share/man/man1

Debian/Ubuntu

A .deb package is also available for Debian-based distributions like Debian and Ubuntu.

curl -LO https://github.com/next-hat/nanocl/releases/download/nanocl-0.18.0/nanocl_0.18.0_amd64.deb
sudo dpkg -i nanocl_0.18.0_amd64.deb

Compile from source

If there is no release binary for your platform, you can compile Nanocl from source using Cargo.

Prerequisites:

cargo install nanocl

Verify installation

Once all these steps are done, you can verify that Nanocl is correctly installed by checking its version:

nanocl --version

Now be sure to follow the post installation steps to install nanocl components.