Below are the instructions to install and setup an xchain-node on Ubuntu 24.04
sudo apt-get update
sudo apt-get upgrade
sudo apt install nodejs npm
sudo apt install ca-certificates curl gnupg -y
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] 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 docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
Buildx is required: the module images only build under BuildKit, and
xchain-node install refuses to build without it. Install docker-buildx-plugin
when using Docker's repository as above, or install docker-buildx when using
the Ubuntu archive's docker.io package.
sudo usermod -aG docker `id -un`
newgrp docker
On boxes with a small root disk and a big data disk, operators move Docker's
data-root onto the big disk via /etc/docker/daemon.json:
{ "data-root": "/misc/docker" }
Important: this setting moves Docker's own image + overlay2 store, but it does
NOT move the containerd content/snapshot store, which stays at
/var/lib/containerd on the root disk and keeps growing as images are pulled,
eventually filling /. If you relocate the data-root, relocate containerd too:
point its root at the same disk in /etc/containerd/config.toml
(or bind-mount /var/lib/containerd), then restart both daemons:
sudo systemctl restart containerd docker
xchain-node's precheck prints a warning on every command when it detects a
relocated Docker data-root with containerd still on /. If your containerd
root lives at a non-default path, set XCHAIN_NODE_CONTAINERD_ROOT to that path
to silence the check.
git clone git@github.com:XChain-Platform/xchain-node.git
cd xchain-node
npm install
sudo ln -s ~/xchain-node/xchain-node.sh /usr/local/bin/xchain-node