THUNDER-SETUP(7)

Reference index

NAME

thunder-setup — install Thunder with Docker Compose and test a local connection

SYNOPSIS

For a new server, check the host requirements and download the release kit. Configure its ports and create its passphrase and TLS certificate before startup.

For an existing installation, run docker compose ps in the kit directory. Once the server reports healthy, test it with the bundled client or connect your application.

REQUIREMENTS

Host
Docker Compose v2. The machine running the containers needs Linux kernel 6.8 or newer. On Docker Desktop, check the Linux VM. Run the commands in a POSIX shell with OpenSSL installed.
Processor
x86-64 with AVX2, or ARM64 v8.2 with Crypto Extensions.
Memory
With the default core budget, Thunder locks 4 GiB of RAM for its memory arenas. Leave room for the rest of the process and the OS. For 512 MiB values, allocate 4 GiB to each reactor’s arena.
Storage
Docker’s data directory must use ext4 or XFS. On Docker Desktop, use the kit’s named volume for the database.

RELEASE KIT

The Thunder server image on Docker Hub contains the Compose file and settings. Extract them into a new directory. Run the rest of the commands from that directory.

mkdir thunderstrike-run &&
cd thunderstrike-run &&
docker run --rm -v "$PWD:/out" \
  docker.io/sbansal793/thunderstrike:0.1.6 kit /out

CONFIGURATION

Copy the settings to .env. Keep the image tag from the kit. Leave THUNDERSTRIKE_ARENA_BYTES empty to use the default memory allocation. The configure job writes the port mapping to compose.override.yaml.

test -f .env || cp .env.example .env
docker compose -f compose.yaml run --rm configure

Clients first connect on port 7380 by default. To change the core budget, starting port, or CPU layout of an existing server, follow the shutdown procedure before generating a new port mapping.

ENCRYPTION AND TLS

The passphrase unlocks the keys that encrypt the database. Create it once for a new store. These commands restrict file access to its owner and preserve any existing passphrase. Keep a copy with the data backup.

mkdir -p docker/secrets docker/tls && (
  umask 077
  set -C
  passphrase=$(openssl rand -base64 32) &&
    printf '%s\n' "$passphrase" > docker/secrets/passphrase
)

The local client expects a certificate for localhost. If clients will use another name, include it in THUNDERSTRIKE_TLS_NAMES in .env. Then generate the certificates.

docker compose run --rm tls-init

Give clients docker/tls/ca.crt so they can verify the server. Keep the signing key, docker/tls/ca.key, private.

START

Start the server in the background. Run docker compose ps until its status is healthy.

docker compose up -d
docker compose ps

VERIFY

The sample client uses eight connections to write values at five sizes, from 256 B to 16 MiB. It reads each value back and compares it byte for byte with the original.

docker compose run --rm sample
echo $?

Exit status 0 means all operations succeeded and every value matched. To save an agent’s state, run the Python checkpoint example or choose another language.

DIAGNOSTICS

Health check is still starting
The server reports healthy when all reactors have recovered their data and opened their ports. If it stays in starting, inspect docker compose logs thunderstrike.
TLS verification fails
Check that the client trusts this installation’s ca.crt and requests a name on the server certificate. The local defaults are address 127.0.0.1:7380 and TLS server name localhost.
Only some keys time out
Clients use the first port to discover the workers that own the keys. Run docker compose ps and check that the client can reach every published reactor port.

SEE ALSO