We offer different ways to install the ShellHub Agent. The easiest way is with our one-line installation script, which works with all major Linux distributions but it requires that you have Docker installed and properly set up.
If you want to install ShellHub Agent but would like to not use Docker, currently we have two other options:
- Install the ShellHub Agent from the source code,
- Integrate the ShellHub Agent into an existing Yocto Project image
In next sessions we'll cover each of these alternatives.
Using the One-line installation script¶
Docker installed and properly set up on device is required.
Follow the Docker Install Instructions for your distro/platform.
You should always use the latest docker version. The minimum supported Docker version is
Open the ShellHub UI, navigate to Devices on the sidebar, and click on ADD DEVICE. It should give you a registration command for installing ShellHub Agent that you need to run on your device:
Installing from the source code¶
ShellHub Agent requires Go 1.14 to compile, please refer to the official documentation for how to install Go in your system.
First checkout the latest stable version (v0.4.0) of ShellHub as follows:
git clone -b v0.4.0 https://github.com/shellhub-io/shellhub.git shellhub
Next, we need to execute the following command to build ShellHub Agent:
cd shellhub/agent go build
file ./agent to check if executable was built.
Integrate with an existing Yocto Project image¶
To use ShellHub in a Yocto Project image is necessary to add meta-shellhub layer in your project.
git clone firstname.lastname@example.org:shellhub-io/meta-shellhub.git
Besides that, add the settings below in your local.conf file:
CORE_IMAGE_EXTRA_INSTALL += "packagegroup-shellhub-runtime" SHELLHUB_TENANT_ID = "<your tenant id here>"
CORE_IMAGE_EXTRA_INSTALL: this variable will install the ShellHub agent in your device.
SHELLHUB_TENANT_ID: needs to be filled with your tenant code available in the ShellHub platform at the top right in icon with the user name.
Remember to add the other configurations according to your needs. After this, just generate the desired image.
Stay tuned to the fact that ShellHub demands the use of a password in the device will use ShellHub.