1. Prepare your machine and install the Hexcore CLI

1. Prepare your machine and install the Hexcore CLI

Order: Docker → Node.js (nvm) → build tools → Hexcore CLI → hexcore doctor.

1.1 Requirements

ItemRequirement
Operating systemmacOS (Intel or Apple Silicon); Ubuntu 22.04/24.04; Debian 12; Rocky Linux, AlmaLinux, CentOS Stream or RHEL 9
Not supportedCentOS 7 / RHEL 7: glibc too old for Node.js 22
WindowsNot tested. hexcore service supports only Linux (systemd) and macOS (launchd)
DockerDocker Engine (Linux) or Docker Desktop (macOS), usable without sudo
Node.js22 or later, 24 LTS recommended, installed with nvm
RAMEach hydra-node uses up to about 500 MB under load; cardano-node on the same machine needs far more
Outbound networkregistry.npmjs.org (CLI), github.com (prebuilt better-sqlite3), ghcr.io (hydra-node image), blockfrost.io if you use Blockfrost
ClockEnable time sync (NTP): Trust Center rejects requests off by more than 5 minutes

Check the clock on Linux:

bash
timedatectl            # should show "System clock synchronized: yes"
sudo timedatectl set-ntp true

1.2 Install Docker

Ubuntu, Debian, Rocky, AlmaLinux, CentOS Stream

Use Docker's official script (or follow docs.docker.com/engine/install):

bash
curl -fsSL https://get.docker.com | sh
sudo systemctl enable --now docker        # on RHEL-family systems the script does not enable the service
sudo usermod -aG docker $USER             # let the current user run Docker without sudo

Log in again so the docker group takes effect, then check:

bash
docker run --rm hello-world

Notes:

  • Members of the docker group have root-equivalent access. Add only the user that will run Hexcore.
  • On RHEL-family systems, remove podman-docker (if present) before installing Docker: Hexcore needs a real Docker daemon at /var/run/docker.sock.

macOS

Install Docker Desktop and wait for "Engine running". Apple Silicon runs natively (hydra-node 2.4.x has an arm64 image).

nvm lets npm i -g run without sudo; sudo npm i -g is a common cause of EACCES and node-gyp errors.

bash
# Install nvm (latest version at https://github.com/nvm-sh/nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# Load nvm into the current shell (or open a new terminal)
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"

nvm install 24
nvm alias default 24      # new terminals also use Node 24
node -v                   # v24.x.x

Notes:

  • Do not run sudo hexcore … or sudo npm …: sudo cannot see nvm's Node.js.
  • Each Node.js version has its own global packages: after switching Node.js, reinstall Hexcore (§1.7).

Without nvm

Get Node.js 22/24 from NodeSource or nodejs.org, not Ubuntu's default package (it ships only Node.js 18). Then point the npm prefix at a user directory:

bash
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

1.4 Install build tools (to guard against node-gyp errors)

The native module better-sqlite3 usually has a prebuilt binary; when it does not (Node.js too new, unusual CPU, network blocks GitHub), npm compiles it with node-gyp, which needs Python 3, make and a C++ compiler. Install them up front:

bash
# Ubuntu, Debian
sudo apt-get update && sudo apt-get install -y build-essential python3

# Rocky, AlmaLinux, CentOS Stream, RHEL
sudo dnf install -y gcc-c++ make python3

# macOS
xcode-select --install

1.5 Install the Hexcore CLI

bash
npm install -g @vtechcom/hexcore
hexcore --version
hexcore doctor

hexcore doctor checks Node.js, Docker, the image and chain access, and warns if the node API is exposed publicly, with a fix for each failure. Before first-time setup (hexcore or hexcore init), a missing Blockfrost key or cardano-node socket is normal.

Next: DApp developers run hexcore and continue with the guide for DApp developers; providers continue with the server install guide.

1.6 Errors installing the CLI: node-gyp, Python 3

Success means npm install ends with added N packages and hexcore --version prints a version. If there is an npm error mentioning better-sqlite3, see the table below.

MessageCauseFix
gyp ERR! find Python, make: not found, g++: command not foundMissing Python 3, make or a C++ compilerInstall the build tools (§1.4), then reinstall
prebuild-install warn … No prebuilt binaries foundNo prebuilt binaryOnly a warning. If compilation then fails: install build tools or use Node.js 24 LTS (nvm install 24 && nvm use 24)
ModuleNotFoundError: No module named 'distutils'Old node-gyp with Python 3.12+npm i -g npm@latest; if it persists: sudo apt-get install -y python3-setuptools (Debian/Ubuntu) or python3 -m pip install setuptools
EACCES: permission denied on npm install -gNo permission to write a system directoryUse nvm (§1.3) or change the npm prefix. Do not fix it with sudo npm i -g. If you already ran npm with sudo: sudo chown -R $(whoami) ~/.npm
Timeout, ECONNRESET, ETIMEDOUT downloading the prebuilt binaryNetwork blocks or is slow to GitHubSet a proxy (npm config set proxy http://<proxy>:<port>, npm config set https-proxy …) and reinstall, or install build tools
gyp ERR! mentioning cpu-features or sshcrypto, but it still ends with added N packagesOptional modules, npm ignores their failureNothing to do

After fixing, run npm install -g @vtechcom/hexcore again. To check the native module on its own:

bash
cd "$(npm root -g)/@vtechcom/hexcore" && node -e "require('better-sqlite3')(':memory:'); console.log('better-sqlite3 OK')"

1.7 Change the Node.js version

The native module is tied to one Node.js version. After switching (for example 22 to 24), Hexcore may disappear from PATH, or report:

unknown
was compiled against a different Node.js version using NODE_MODULE_VERSION 127.
This version of Node.js requires NODE_MODULE_VERSION 137.

Reinstall Hexcore with the Node.js you now use, then reinstall the service (it hard-codes the node path):

bash
npm install -g @vtechcom/hexcore
hexcore service install      # only if you run Hexcore as a service

1.8 Update and uninstall

Update a running Hexcore without dropping connections:

bash
hexcore update            # to the latest version on npm
hexcore update --check    # only check for a new version
hexcore update --rollback # go back to the previous version
hexcore status            # the version actually running

The hexcore command in PATH stays the npm i -g version, so after an update hexcore --version may print the old one: use hexcore status or Settings. To bring the CLI up to date: npm i -g @vtechcom/hexcore@<version> (#37).

Uninstall:

  1. Stop the heads in the UI (removing Hexcore does not stop hydra-node containers).
  2. hexcore service uninstall if you have a service; otherwise hexcore stop.
  3. npm uninstall -g @vtechcom/hexcore.
  4. ~/.hexcore remains, with every node's keys. Back it up before deleting.