Skip to content

Commit 905bad3

Browse files
committed
docs(installation): add prebuilt binary install path and fix Docker volume mount
Add a prebuilt binary section to the installation page covering Linux x64/arm64 tarballs, systemd unit setup, and GitHub CLI one-liner. Update the quickstart to show the binary option first with Docker as the macOS/Windows alternative. Correct the Docker data volume mount path from /data to /var/lib/nodedb across all docker run examples, the Compose snippet, and the environment variable reference table. Update data_dir default to reflect the per-install-method values (~/.nodedb/data for binary, /var/lib/nodedb for Docker).
1 parent 99e2573 commit 905bad3

3 files changed

Lines changed: 124 additions & 30 deletions

File tree

docs/introduction/docker.rdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ docker run -d --name nodedb \
1515
-p 6433:6433 \
1616
-p 6480:6480 \
1717
-p 9090:9090 \
18-
-v nodedb-data:/data \
18+
-v nodedb-data:/var/lib/nodedb \
1919
farhansyah/nodedb
2020
```
2121

@@ -40,7 +40,7 @@ docker run -d --name nodedb \
4040
-p 9090:9090 \
4141
-p 6381:6381 \
4242
-p 8086:8086 \
43-
-v nodedb-data:/data \
43+
-v nodedb-data:/var/lib/nodedb \
4444
-e NODEDB_PORT_RESP=6381 \
4545
-e NODEDB_PORT_ILP=8086 \
4646
farhansyah/nodedb
@@ -58,7 +58,7 @@ services:
5858
- "6480:6480" # HTTP
5959
- "9090:9090" # sync
6060
volumes:
61-
- nodedb-data:/data
61+
- nodedb-data:/var/lib/nodedb
6262
environment:
6363
NODEDB_MEMORY_LIMIT: "4GiB"
6464
# NODEDB_PORT_RESP: "6381" # uncomment to enable Redis protocol
@@ -102,7 +102,7 @@ curl http://localhost:6480/health
102102
| `NODEDB_HOST` | `0.0.0.0` | Bind address |
103103
| `NODEDB_PORT_RESP` | disabled | Set to enable Redis protocol |
104104
| `NODEDB_PORT_ILP` | disabled | Set to enable ILP ingest |
105-
| `NODEDB_DATA_DIR` | `/data` | Data directory inside container |
105+
| `NODEDB_DATA_DIR` | `/var/lib/nodedb` | Data directory inside container |
106106

107107
## Custom Port Mapping
108108

@@ -112,6 +112,6 @@ Remap any port on the host side. The container always listens on the same intern
112112
docker run -d --name nodedb \
113113
-p 5432:6432 \
114114
-p 8080:6480 \
115-
-v nodedb-data:/data \
115+
-v nodedb-data:/var/lib/nodedb \
116116
farhansyah/nodedb
117117
```

docs/introduction/installation.rdx

Lines changed: 110 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,119 @@
11
---
22
title: Installation
3-
description: Build NodeDB from source. Requires Rust 1.94+ and Linux with io_uring support.
3+
description: Install NodeDB via prebuilt binary, Docker, or from source. Linux kernel 5.1+ required.
44
---
55

66
# Installation
77

8-
NodeDB requires Linux kernel 5.1+ (for io_uring) and Rust 1.94+.
8+
NodeDB requires Linux kernel 5.1+ (for io_uring), regardless of how you install it.
9+
10+
There are three ways to install NodeDB:
11+
12+
1. [Prebuilt binary](#prebuilt-binary-linux) — **recommended on Linux.** Direct kernel access to io_uring, no virtualization overhead, best raw performance.
13+
2. [Docker](/docs/introduction/docker) — **recommended on macOS / Windows / WSL2**, or when you want a one-command setup with zero host configuration.
14+
3. [Build from source](#build-from-source) — for development or custom features.
15+
16+
All three share the same [configuration](#configuration) and connection paths described below.
17+
18+
## Prebuilt binary (Linux)
19+
20+
Each tagged release ships a static `nodedb` tarball on GitHub for `linux-x64` and `linux-arm64`. macOS and Windows users should use [Docker](/docs/introduction/docker) until those targets ship.
21+
22+
```bash
23+
# Resolve the latest tag and your architecture
24+
TAG=$(curl -fsSL https://api.github.com/repos/NodeDB-Lab/nodedb/releases/latest \
25+
| grep '"tag_name"' | cut -d'"' -f4)
26+
ARCH=$(uname -m | sed 's/aarch64/arm64/; s/x86_64/x64/')
27+
28+
# Download and extract
29+
curl -L -o nodedb.tar.gz \
30+
"https://github.com/NodeDB-Lab/nodedb/releases/download/${TAG}/nodedb-${TAG#v}-linux-${ARCH}.tar.gz"
31+
tar -xzf nodedb.tar.gz
32+
33+
# Optional: install system-wide
34+
sudo mv nodedb /usr/local/bin/
35+
36+
# Run with all defaults (data goes to ~/.nodedb/data)
37+
nodedb
38+
```
39+
40+
If you have the [GitHub CLI](https://cli.github.com/) installed, this is one command:
41+
42+
```bash
43+
gh release download --repo NodeDB-Lab/nodedb --pattern 'nodedb-*-linux-x64.tar.gz' \
44+
&& tar -xzf nodedb-*-linux-x64.tar.gz
45+
```
46+
47+
Run with a config file or a custom data directory:
48+
49+
```bash
50+
# Point at an explicit data dir
51+
NODEDB_DATA_DIR=/var/lib/nodedb nodedb
52+
53+
# Or load a config file (env vars still override TOML keys)
54+
nodedb --config /etc/nodedb/nodedb.toml
55+
```
56+
57+
For a long-running server, drop a unit file at `/etc/systemd/system/nodedb.service`:
58+
59+
```ini
60+
[Unit]
61+
Description=NodeDB
62+
After=network.target
63+
64+
[Service]
65+
Type=simple
66+
User=nodedb
67+
Group=nodedb
68+
ExecStart=/usr/local/bin/nodedb --config /etc/nodedb/nodedb.toml
69+
Restart=on-failure
70+
LimitNOFILE=1048576
71+
72+
[Install]
73+
WantedBy=multi-user.target
74+
```
75+
76+
Then `sudo systemctl enable --now nodedb`. The user/group must be able to read the config file and write `data_dir`.
77+
78+
For a specific version or to browse changelogs, see the release page: <https://github.com/NodeDB-Lab/nodedb/releases>. The SQL surface is still pre-1.0 and changes between tags, so pin a version in production.
79+
80+
## Docker
81+
82+
See [Docker](/docs/introduction/docker) for the full Compose and `docker run` setup. The right choice on macOS, Windows, or any host where you don't want to manage a binary directly.
983

1084
## Build from Source
1185

86+
Requires Rust 1.94+ and a Linux host.
87+
1288
```bash
1389
git clone https://github.com/NodeDB-Lab/nodedb.git
1490
cd nodedb
1591

1692
# Release build (all crates)
1793
cargo build --release
1894

19-
# Run tests
20-
cargo test --all-features
95+
# Run tests (use nextest — the cluster integration tests rely on
96+
# the test groups defined in .config/nextest.toml and will hang
97+
# under plain `cargo test`)
98+
cargo install cargo-nextest --locked # one-time
99+
cargo nextest run --all-features
21100
```
22101

23102
The build produces two binaries:
24103

25104
- `target/release/nodedb` — the database server
26105
- `target/release/ndb` — the terminal client (TUI with syntax highlighting, tab completion, history search)
27106

28-
## Start the Server
107+
Start the server:
29108

30109
```bash
31110
./target/release/nodedb
111+
112+
# Or with a config file
113+
./target/release/nodedb --config nodedb.toml
32114
```
33115

34-
Default output:
116+
Default startup output:
35117

36118
```
37119
2026-01-01T00:00:00Z INFO nodedb: Starting NodeDB
@@ -43,7 +125,12 @@ Default output:
43125

44126
## Configuration
45127

46-
All protocols share one bind address. Env vars take precedence over the TOML file.
128+
This section applies to **every** install method — prebuilt binary, Docker, and source builds all read the same TOML schema and respond to the same environment variables. Pick whichever is convenient:
129+
130+
- **TOML file** — pass `--config /path/to/nodedb.toml` on the command line. Best for production / systemd / pre-baked images.
131+
- **Environment variables** — prefix `NODEDB_*`. Best for Docker (`-e`), Compose (`environment:`), and Kubernetes. Env vars **override** values from the TOML file when both are set.
132+
133+
All protocols share one bind address (`host`); only the port differs per protocol.
47134

48135
```toml
49136
# nodedb.toml
@@ -63,24 +150,24 @@ resp = 6381 # Optional: set to enable
63150
ilp = 8086 # Optional: set to enable
64151
```
65152

66-
| Config field | Environment variable | Default |
67-
| ------------------ | ------------------------- | ---------------- |
68-
| `host` | `NODEDB_HOST` | `127.0.0.1` |
69-
| `ports.native` | `NODEDB_PORT_NATIVE` | `6433` |
70-
| `ports.pgwire` | `NODEDB_PORT_PGWIRE` | `6432` |
71-
| `ports.http` | `NODEDB_PORT_HTTP` | `6480` |
72-
| `ports.resp` | `NODEDB_PORT_RESP` | disabled |
73-
| `ports.ilp` | `NODEDB_PORT_ILP` | disabled |
74-
| `data_dir` | `NODEDB_DATA_DIR` | `~/.local/share/nodedb` |
75-
| `memory_limit` | `NODEDB_MEMORY_LIMIT` | `1GiB` |
76-
| `data_plane_cores` | `NODEDB_DATA_PLANE_CORES` | CPUs - 1 |
77-
| `max_connections` | `NODEDB_MAX_CONNECTIONS` | `4096` |
78-
| `log_format` | `NODEDB_LOG_FORMAT` | `text` |
153+
| Config field | Environment variable | Default |
154+
| ------------------ | ------------------------- | ---------------------------------------------------- |
155+
| `host` | `NODEDB_HOST` | `127.0.0.1` |
156+
| `ports.native` | `NODEDB_PORT_NATIVE` | `6433` |
157+
| `ports.pgwire` | `NODEDB_PORT_PGWIRE` | `6432` |
158+
| `ports.http` | `NODEDB_PORT_HTTP` | `6480` |
159+
| `ports.resp` | `NODEDB_PORT_RESP` | disabled |
160+
| `ports.ilp` | `NODEDB_PORT_ILP` | disabled |
161+
| `data_dir` | `NODEDB_DATA_DIR` | `~/.nodedb/data` (binary), `/var/lib/nodedb` (Docker) |
162+
| `memory_limit` | `NODEDB_MEMORY_LIMIT` | `1GiB` |
163+
| `data_plane_cores` | `NODEDB_DATA_PLANE_CORES` | CPUs - 1 |
164+
| `max_connections` | `NODEDB_MAX_CONNECTIONS` | `4096` |
165+
| `log_format` | `NODEDB_LOG_FORMAT` | `text` |
79166

80167
## Connect
81168

82169
```bash
83-
# With the ndb TUI client
170+
# With the ndb TUI client (source build)
84171
./target/release/ndb
85172

86173
# With psql
@@ -92,7 +179,7 @@ curl http://localhost:6480/health
92179

93180
## System Requirements
94181

95-
- **OS**: Linux (kernel 5.1+ for io_uring)
96-
- **Rust**: 1.94+
182+
- **OS**: Linux (kernel 5.1+ for io_uring) — required for the binary and source builds; Docker users can run on any host that supports a Linux container with io_uring.
183+
- **Rust**: 1.94+ (source builds only)
97184
- **Memory**: 512 MiB minimum, 4+ GiB recommended
98185
- **Disk**: NVMe recommended for Data Plane I/O

docs/introduction/quickstart.rdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ This guide takes you from zero to running multi-engine queries in five minutes.
1010
## 1. Start NodeDB
1111

1212
```bash
13-
# Docker (recommended)
13+
# Linux: prebuilt binary (recommended — best performance)
14+
gh release download --repo NodeDB-Lab/nodedb --pattern 'nodedb-*-linux-x64.tar.gz' \
15+
&& tar -xzf nodedb-*-linux-x64.tar.gz \
16+
&& ./nodedb
17+
18+
# macOS / Windows / WSL2: Docker
1419
docker compose up -d
1520

16-
# Or from source
21+
# Or from source (any Linux with Rust 1.94+)
1722
./target/release/nodedb
1823
```
1924

25+
See [Installation](/docs/introduction/installation) for the full setup, configuration, and systemd unit examples.
26+
2027
## 2. Connect
2128

2229
```bash

0 commit comments

Comments
 (0)