1. Prepare your machine and install the Hexcore CLI
Order: Docker → Node.js (nvm) → build tools → Hexcore CLI → hexcore doctor.
1.1 Requirements
| Item | Requirement |
|---|---|
| Operating system | macOS (Intel or Apple Silicon); Ubuntu 22.04/24.04; Debian 12; Rocky Linux, AlmaLinux, CentOS Stream or RHEL 9 |
| Not supported | CentOS 7 / RHEL 7: glibc too old for Node.js 22 |
| Windows | Not tested. hexcore service supports only Linux (systemd) and macOS (launchd) |
| Docker | Docker Engine (Linux) or Docker Desktop (macOS), usable without sudo |
| Node.js | 22 or later, 24 LTS recommended, installed with nvm |
| RAM | Each hydra-node uses up to about 500 MB under load; cardano-node on the same machine needs far more |
| Outbound network | registry.npmjs.org (CLI), github.com (prebuilt better-sqlite3), ghcr.io (hydra-node image), blockfrost.io if you use Blockfrost |
| Clock | Enable time sync (NTP): Trust Center rejects requests off by more than 5 minutes |
Check the clock on Linux:
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):
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:
docker run --rm hello-world
Notes:
- Members of the
dockergroup 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).
1.3 Install Node.js with nvm (recommended)
nvm lets npm i -g run without sudo; sudo npm i -g is a common cause of EACCES and node-gyp errors.
# 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 …orsudo npm …:sudocannot 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:
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:
# 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
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.
| Message | Cause | Fix |
|---|---|---|
gyp ERR! find Python, make: not found, g++: command not found | Missing Python 3, make or a C++ compiler | Install the build tools (§1.4), then reinstall |
prebuild-install warn … No prebuilt binaries found | No prebuilt binary | Only 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 -g | No permission to write a system directory | Use 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 binary | Network blocks or is slow to GitHub | Set 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 packages | Optional modules, npm ignores their failure | Nothing to do |
After fixing, run npm install -g @vtechcom/hexcore again. To check the native module on its own:
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:
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):
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:
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:
- Stop the heads in the UI (removing Hexcore does not stop hydra-node containers).
hexcore service uninstallif you have a service; otherwisehexcore stop.npm uninstall -g @vtechcom/hexcore.~/.hexcoreremains, with every node's keys. Back it up before deleting.