Install Prerequisites on Linux
Who this is for: Linux users setting up the SandGrain SDK. Pick the section for your distribution.
What you'll accomplish: Install Git, Node.js, build tools, USB serial libraries, and Docker, then join the groups the SDK needs.
Before you begin: Commands use sudo. After adding yourself to the docker and serial-port groups, you must log out and back in for the change to take effect.
Ubuntu / Debian / Linux Mint / Pop!_OS
# Refresh package index
sudo apt update
# Git, Node.js, build tools, USB serial libraries
sudo apt install -y git nodejs npm \
build-essential libmosquitto-dev libftdi1-dev \
ca-certificates curl gnupg
# Docker Engine + docker compose v2 (official Docker repo)
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
-o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \ https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io \
docker-buildx-plugin docker-compose-plugin
# Add yourself to the docker (run docker without sudo) and dialout (USB serial) groups
sudo usermod -aG docker,dialout $USER
# Log out and back in for group membership to take effect
Debian users: replace ubuntu with debian in the two Docker URLs above.
Fedora / RHEL / Rocky / Alma bash
# Git, Node.js, build tools, USB serial libraries
sudo dnf install -y git nodejs npm gcc make \
mosquitto-devel libftdi-devel
# Docker Engine
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io \
docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
# Groups
sudo usermod -aG docker,dialout $USER
Arch / Manjaro / EndeavourOS bash
sudo pacman -Syu --needed git nodejs npm \
base-devel mosquitto libftdi \
docker docker-compose
sudo systemctl enable --now docker
sudo usermod -aG docker,uucp $USER
# uucp is Arch's serial-port group (equivalent of dialout)
Verify the install (any distro)
Open a new terminal so group memberships and PATH updates apply:
git --version
node --version # must be v20.x or higher
npm --version
docker --version
docker compose version
gcc --version # only if you'll build the SDK
All should print version info; none should say "not found."
Verify Docker is ready bash
docker info # look for the "Server Version:" line
If you see "permission denied while trying to connect to the Docker daemon socket", you didn't log out and back in after usermod -aG docker. Fix it with newgrp docker (or log out and back in), then retry docker info.
Run Mosquitto as a service (for local/standalone testing)
When you run the standalone SDK on this machine, Mosquitto should be running:
sudo systemctl enable mosquitto
sudo systemctl start mosquitto
sudo systemctl status mosquitto
Next step
Continue to Get the Code & Run the Setup Script.