HELP

Deploy apps

Ship your app to a fleet with the nodex CLI: containers to Linux devices, WebAssembly modules to ESP32 boards.

Before you start

  1. Install the nodex CLI (Windows, macOS & Linux)
    curl -fsSL https://raw.githubusercontent.com/adhuldas/nodexa-cli/main/install.sh | sh
    nodex --version
  2. Find your Fleet ID

    Open Fleets, pick a fleet, and copy the Fleet ID from the fleet summary card.

  3. Create a deployment token

    On the same fleet page, click Deployment Token and generate one. It's shown only once, so store it in a password manager or your CI/CD secrets. Never commit it to a repository.

    In CI, pass both values as environment variables instead of flags:

    export NODEXA_FLEET_ID="<fleet-id>"
    export NODEXA_API_TOKEN="<api-token>"
    nodex push

Deploy containers

Devices running nodexOS on Linux (Raspberry Pi, BeagleBone, Variscite and others) run your services as containers built from Docker images. nodex push builds each image, pushes it to the Nodexa registry and creates a new release for the fleet. Docker must be installed on the machine you push from; the devices themselves don't need it.

Option 1: a single Dockerfile

Run from a folder with a Dockerfile. The service name comes from the folder name; override it with --service <name>.

cd my-app            # contains a Dockerfile
nodex push --fleet-id <fleet-id> --token <api-token>

Option 2: docker-compose.yml

A docker-compose.yml or compose.yml is picked up automatically. Services with a build block are built; services with only an image are pulled, retagged and pushed without rebuilding.

services:
  web:
    build: .
    ports:
      - "80:8080"
  firmware:
    image: ghcr.io/my-org/firmware:latest
nodex push --fleet-id <fleet-id> --token <api-token> -c docker-compose.yml

Option 3: a nodexa.yml manifest

For multi-service releases, describe each service in nodexa.yml at the project root. It takes priority over compose files. Point to another file with -f <path>.

platform: linux/arm64      # optional default for every service

services:
  - name: web
    dockerfile: Dockerfile
    context: .
  - name: worker
    dockerfile: worker/Dockerfile
    context: worker/
    platform: linux/arm/v7   # optional per-service override
  - name: firmware
    image: ghcr.io/my-org/firmware:v1.2.0

Match your device's CPU

Build for the architecture your devices run, or containers fail to start with exec format error. Set it with --platform, the NODEXA_PLATFORM variable, or platform: in the manifest. Separate several with commas to build a multi-platform image.

DevicePlatform
Raspberry Pi 4 (64-bit)linux/arm64
BeagleBone Black (ARMv7, 32-bit)linux/arm/v7
x86_64 gatewayslinux/amd64
nodex push --fleet-id <fleet-id> --token <api-token> --platform linux/arm/v7

Pre-built images from private registries

To pull private images (GitHub Container Registry, Docker Hub, ECR…), put credentials in registry.yml next to your project. It's detected automatically, or pass -r <path>.

ghcr.io:
  username: my-github-username
  password: ghp_personalAccessTokenWithReadPackages

Keep registry credentials out of version control:

echo "registry*.yml" >> .gitignore

After the push

The new release appears in the fleet's Releases tab. Each device picks it up on its next update check (set per device under Advanced settings when adding it), pulls the images and restarts the changed services. Follow progress in the device's Logs.

Troubleshooting

Killed: 9 when running wasi-sdk on macOS

macOS blocks unsigned tools downloaded with a browser. The curl install above avoids this; if you downloaded wasi-sdk in a browser, clear the flag:

xattr -dr com.apple.quarantine ~/wasi-sdk
'stdio.h' file not found when building for ESP32

Recent wasi-sdk versions dropped the old target name. Use --target=wasm32-wasip1 instead of wasm32-wasi.

Containers fail with exec format error

The image was built for a different CPU. Push again with the right --platform.

ESP32 device reports a failed deployment

Check the device's logs. A container image pushed to an ESP32 fleet fails with a message saying so; an app that ran out of memory shows the free heap. Build with the flags above and keep the app small.

nodex push says the token is invalid

The token may have been revoked or mistyped. Generate a new one from the fleet's Deployment Token dialog and check that the Fleet ID is correct.