In developmentArcanum products are not released yet.Get launch updates →
ARCANUM
command line

Rune CLI

One program, rune, for everything you do to a cluster by hand: run Rune QL, define topics and views, manage users and namespaces, read counters, back up the catalog. It logs in like any client: a user, a password file, TLS.

Install

One program, rune. Pick your system below; then rune --version prints the installed version and rune with no arguments lists every command. Archives and a SHA256SUMS file are on the tap's releases.

macOS

macOS 13.3 or later, Apple Silicon or Intel.

brew install arcanumruna/tap/rune rune --version # rune X.Y.Z

Always type the full name arcanumruna/tap/rune: Homebrew has an unrelated program called rune; uninstall it first if you have it, since both install a rune command. Upgrade with brew update && brew upgrade arcanumruna/tap/rune.

without Homebrew

V=$(curl -fsS https://raw.githubusercontent.com/arcanumruna/homebrew-tap/main/bucket/rune.json | sed -n 's/.*"version": *"\(.*\)".*/\1/p') # the latest release A=$(uname -m | sed s/x86_64/amd64/) # arm64 or amd64 curl -fLO https://github.com/arcanumruna/homebrew-tap/releases/download/rune-v$V/rune-$V-darwin-$A.tar.gz curl -fLO https://github.com/arcanumruna/homebrew-tap/releases/download/rune-v$V/SHA256SUMS shasum -a 256 -c --ignore-missing SHA256SUMS # rune-…: OK tar xzf rune-$V-darwin-$A.tar.gz rune sudo install -d /usr/local/bin && sudo install -m 755 rune /usr/local/bin/

Linux

x86-64 or arm64 with glibc 2.34 or newer: Ubuntu 22.04 and later, Debian 12 and later, Fedora, RHEL, Rocky and Alma 9 and later, Amazon Linux 2023, Arch and openSUSE Tumbleweed. One build runs on all of them, so there is no per-distribution package. Not Alpine (musl) or Debian 11. It needs libuuid, present on standard installs; on a minimal image, apt install libuuid1 or dnf install libuuid.

brew install arcanumruna/tap/rune # with Homebrew on Linux

without Homebrew

V=$(curl -fsS https://raw.githubusercontent.com/arcanumruna/homebrew-tap/main/bucket/rune.json | sed -n 's/.*"version": *"\(.*\)".*/\1/p') # the latest release A=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') curl -fLO https://github.com/arcanumruna/homebrew-tap/releases/download/rune-v$V/rune-$V-linux-$A.tar.gz curl -fLO https://github.com/arcanumruna/homebrew-tap/releases/download/rune-v$V/SHA256SUMS sha256sum -c --ignore-missing SHA256SUMS # rune-…: OK tar xzf rune-$V-linux-$A.tar.gz rune sudo install -m 755 rune /usr/local/bin/

To upgrade without Homebrew, run the same commands again: they fetch the latest release.

Windows

Windows 10 or 11, x64. The examples on this page are bash: on Windows, run them in Git Bash, which comes with Git for Windows. rune itself also runs in PowerShell and cmd.

scoop bucket add arcanum https://github.com/arcanumruna/homebrew-tap scoop install arcanum/rune rune --version # rune X.Y.Z

No Scoop yet: install it, and Git, which Scoop needs for buckets, in PowerShell as yourself, not as administrator. Upgrade with scoop update rune.

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned Invoke-RestMethod https://get.scoop.sh | Invoke-Expression scoop install git

without Scoop, in PowerShell

$ProgressPreference = 'SilentlyContinue' $V = ((Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/arcanumruna/homebrew-tap/main/bucket/rune.json).Content | ConvertFrom-Json).version $Url = "https://github.com/arcanumruna/homebrew-tap/releases/download/rune-v$V" Invoke-WebRequest "$Url/rune-$V-windows-amd64.zip" -OutFile rune.zip Invoke-WebRequest "$Url/SHA256SUMS" -OutFile SHA256SUMS $Sum = ((Select-String "rune-$V-windows-amd64.zip" SHA256SUMS).Line -split ' ')[0] if ((Get-FileHash rune.zip).Hash -ne $Sum) { throw 'rune.zip: checksum mismatch' } $Dir = "$env:LOCALAPPDATA\Programs\rune" Expand-Archive rune.zip $Dir -Force $Path = [Environment]::GetEnvironmentVariable('Path', 'User') if (";$Path;" -notlike "*;$Dir;*") { [Environment]::SetEnvironmentVariable('Path', "$Path;$Dir", 'User') }

No administrator needed: it installs for you only. Open a new terminal, then rune --version. To upgrade, run it again: it fetches the latest release.

Windows Firewall drops incoming traffic it did not ask for, the way a home router does. The CLI gets its answers back on the connection it opened (see --gateway-response-port under Connect), so there is nothing to set.

Connect and log in

Each command connects, logs in, does its work and disconnects, like psql -c. Log in once with rune login and later commands need no options and no password. Rune QL is Rune's SQL-like language; rune console is its prompt and rune ql runs it from scripts.

rune console --broker localhost:40200 --user admin # asks for the password, then a rune> prompt

or save the login

rune login --broker localhost:40200 --user admin # asks for the password once rune ql -e 'show users;' # uses the saved login rune logout # removes it
rune loginAsks for the password, or reads --password-file, checks it with the broker and saves a profile: the broker, the user and the TLS and network options you gave. The password is never saved, only a key derived from it. It prints rune: logged in as admin@localhost:40200 (profile default); the key is kept in ….
where it is keptThe key goes in the macOS Keychain, the Windows Credential Manager or the Linux Secret Service. Without a Secret Service, as on a server with no desktop, it goes in a file only you can read, and rune login says where. The profile, which holds no secret, is in ~/Library/Application Support/rune/profiles on macOS, ~/.config/rune/profiles on Linux and %APPDATA%\rune\profiles on Windows.
--profile name
RUNE_PROFILE
Keeps several logins side by side, one per cluster for example: rune login --profile staging …, then rune ql --profile staging -e '…'. Letters, digits, ., _ and -.Default default
what winsOptions on the command line, then RUNE_* variables, then the profile. Another --broker, another --user or a password file is a different login: the saved key is not used for that command. A login needs TLS, so --insecure-plaintext is refused by rune login and never uses a saved one.
rune logoutRemoves the profile and its key; --profile name for another one. It prints rune: logged out (profile default), or rune: not logged in (profile default): nothing to remove.
not logged inA command that needs a broker, given none and with no saved login, stops with rune: not logged in: run rune login --broker <host:port> --user <name>. So does --profile name for a profile that does not exist.

in a script, with the password in a file

Every command that talks to a broker takes the same options: which broker, who you are, the password file, and which certificate to trust. Each option also has an environment variable, so you can set it once per shell. That saves typing; only rune login remembers anything between commands.

export RUNE_TLS_CA_FILE=secrets/tls.pem # only for a self-signed certificate, like the self-host one rune ql --broker localhost:40200 --user admin --password-file secrets/admin.pw -e 'show users;'

or the broker and your namespace in one address

export RUNE_URL=rune://rune.example.com:40200/acme # broker + namespace export RUNE_USER=ws1 # logs in as acme/ws1 export RUNE_PASSWORD_FILE=~/.rune/ws1.pw rune ql -e 'select * from account_stats where userId = 42;'

who and where

--broker host:port
RUNE_BROKER
The broker to call first: the host name and the client port of any node (40200 in the self-host setup). From there the CLI finds the leader by itself and follows its redirects. A full Aeron channel such as aeron:udp?endpoint=host:40200 also works. Without it, the CLI only reaches a broker on the same machine through shared memory.Default aeron:ipc: a broker on the same machine
--url rune://host:port/ns
RUNE_URL
The broker and your namespace in one value. It stands for --broker host:port and puts the namespace in front of your user name, so --user ws1 logs in as ns/ws1. The rules are below.Default unset
--user name
RUNE_USER
Who you log in as. A user of a namespace is written ns/name (or just name with --url). Leave it out only for a development broker without authentication.Default unset: no user is sent
--password-file path
RUNE_PASSWORD_FILE
A file holding your password on one line; the line break at the end is ignored. Make it readable only by you (chmod 600). There is no --password and no RUNE_PASSWORD: a password on a command line lands in your shell history and in the process list, so the CLI refuses the option and ignores the variable with a warning. Without a file, only rune console asks for the password on the terminal.Default unset

encryption

--tls-ca file
RUNE_TLS_CA_FILE
Which certificate to trust, as a PEM file. Leave it out for a certificate bought from a public authority: the ones your operating system trusts are used. For a self-signed certificate, like the self-host one, give that certificate's file.Default unset: the certificates your operating system trusts
--tls-host name
RUNE_TLS_HOST
The name the broker's certificate must carry. Set it when you connect by an IP address, or by a name the certificate does not list.Default the host in --broker
--insecure-plaintextConnect without encryption, only to a development broker started with RUNE_AUTH=disabled. It never sends a password: together with a user, a password file or security bootstrap it is refused before anything connects, and it cannot be combined with --tls-ca or --tls-host. When a broker has authentication off, every command prints a WARNING line saying so.Default off

networks

--gateway-response-port port
RUNE_GATEWAY_RESPONSE_PORT
How the broker's answers reach you. auto: they come back on the connection the CLI opened, through the broker's gateway response port (its client port + 1000: 41200 in the self-host setup), so a home router, a cloud NAT or Windows Firewall lets them through. If that port has not answered after half the connect timeout (2.5 s), the CLI falls back to 0 for that broker.

0: the broker sends its answers to your machine as new incoming traffic (see --cli-egress), which routers drop. A port number: that port, with no fallback, for a broker that binds another one.Default auto (also -1)
--cli-egress channel
RUNE_EGRESS
The address on your machine where the broker sends its answers. Set it, as aeron:udp?endpoint=myhost:40500, when the broker must reach you under another name, for example from inside a container or across a VPN. When the CLI cannot work an address out, it says so and asks for this option.Default the address your machine uses to reach the broker, with a free port the system picks, which is right on almost every network

rarely needed

--cli-stream-in n
--cli-stream-out n
Channel numbers inside the connection, like extensions on a phone line. --cli-stream-in must match the broker's RUNE_CLIENT_STREAM_ID; change them only if the broker's was changed.Default 1 (--cli-stream-in), 2 (--cli-stream-out)
--cli-data-dir dirA scratch folder for the networking library inside the CLI. A folder you name is used as it is and left in place.Default a fresh temporary folder, removed when the command ends (also --cli-data-dir "")
--cli-aeron-dir dirUse an Aeron media driver already running with that folder instead of the CLI's own. Only for machines that run a shared driver.Default unset: the CLI starts its own driver
the rules for --url
formExactly rune://host:port/ns: rune:// in lowercase; a host name, an IPv4 address or an IPv6 address in brackets ([::1]); a port from 1 to 65535; a namespace name (lowercase letters, digits and -; not default, which you reach with --broker). No user@, ?query, #fragment or trailing /. A mistake exits with code 2 and a message naming it.
userws1 becomes ns/ws1; ns/ws1 stays; other/ws1 is refused. No user: none is sent.
--url and --brokerNever both on one command line. Of the two variables, RUNE_URL applies when RUNE_BROKER is not set; with both set the CLI refuses to guess. An option always beats the other one's variable: --broker beats RUNE_URL, --url beats RUNE_BROKER.
position--url, --user and --broker may also come before the command: rune --url rune://… ql -e '…'.
offline commandscatalog diff, catalog replay and security gen-cluster-key ignore RUNE_URL; --url on them is an error.

Commands

login · logoutSave a login so later commands need no options and no password; remove it.
consoleAn interactive Rune QL prompt, or a .rql script run as one unit.
qlOne statement or a script, then exit. For shell scripts and CI.
statsA topic's or a view's counters, partition by partition.
schemaPrint a topic's schema; generate a C++ header for its records.
namespaceTenants: create them, set their limits, see their usage, suspend, resume, delete.
catalogThe history of every definition: list, export, compare, replay, serve.
securityMake a cluster key; create the first admin by hand.
versionrune version or rune --version prints rune X.Y.Z, the installed version.

rune console

A prompt for Rune QL. A statement ends at ;, so it may span lines. Everything runs over one session: a failing statement prints its error and the session goes on. exit, quit or Ctrl-D (on Windows Ctrl-Z, then Enter) leaves.

$ rune console --broker localhost:40200 --user admin password for admin: rune> create topic events ...> partitions 3 replicas 3; rune> show topic events; rune> exit

a script, all or nothing

rune console -f setup.rql --broker localhost:40200 --user admin --password-file secrets/admin.pw # setup.rql:statement 3: TopicExists (25) ... exit code 25
-f fileRun a script instead of the prompt; -f - reads it from standard input. Every statement is checked first, so nothing runs unless the whole script is valid. Then they run in order, and the first failure stops the run, naming the statement. The exit code is the broker's error code (25 TopicExists, 30 SchemaIncompatible, 31 SchemaConflict, …), 1 for a local error, 2 for a mistake on the command line.Default unset: the interactive prompt
--dry-runCheck each statement and print what it would do. No broker needed.Default off
--request-id hexMakes a script safe to run twice. Give 32 hex digits (not all zero); a second run with the same id gets the first run's answers instead of TopicExists. With -f, statement N uses the id plus N − 1. Without it, creating a topic that exists is an error.Default unset
--expected-version NFor alter topic changes to columns: apply the change only if the topic's schema is still at version N, so two people cannot overwrite each other's change. Not checked for alter topic … set, which changes settings. A stale N is SchemaConflict (31). From 0 to 65535.Default 0 = no check
--verbosePrint every redirect to the leader and every retry on standard error.Default off
passwordWith a user and no password file, the console asks for the password on the terminal and will not start without one. With no user (a development broker) it needs no terminal, so generate-ql | rune console works and the session stays alive between slow lines.
first loginAn admin created with a one-time password is told WARNING: password change required — run ALTER USER admin SET PASSWORD '…';. Until then only that statement is allowed.
ends the sessionOnly SessionRevoked (46): an admin revoked your session or changed your password with TERMINATE SESSIONS.

rune ql

One Rune QL statement with -e, or a script with -f, then exit. Any broker will do: a schema change sent to a follower is redirected to the leader (at most 3 hops).

rune ql -e "create topic events partitions 3 replicas 3;" rune ql -e "select name, gender from account_characters where userId = 42;" name gender Ada 1 Brin 0 (2 rows) rune ql -f users.rql # statements with passwords: from a file only rune ql -f topics.rql --request-id 0123456789abcdef0123456789abcd00 rune ql -e "create topic events partitions 3;" --dry-run # check it, no broker
-e "statement"One statement. A statement holding a password or a verifier is refused here, so it never shows in the process list or your shell history: put it in a file.Default none: give -e or -f
-f fileA script; -f - reads standard input. Nothing is sent unless every statement parses; then they run in order and stop at the first error, statement N: ….Default none: give -e or -f
--dry-run · --request-id · --expected-version · --verboseThe same as for console.
outputA select prints a header line, one line per row and (N rows); a point read that finds nothing prints (no row). Columns are padded to the widest cell, bytes values print as x'…' hex and an empty aggregate as NULL.
exit code0 done, 1 any failure, 2 a mistake on the command line. For the broker's own error code use rune console -f.

rune stats

The counters of a topic or a view, read from each partition's leader. Needs DESCRIBE on it.

$ rune stats topic character partition 0 rejectionsKeyExists 0 verdictLag 0 autoIncrementCounter 1049 … $ rune stats view account_stats --partition 0 --json {"view": "account_stats", "partitions": [{"partition": 0, "stats": {"scanRows": 0, …}, "constraints": []}]}
--partition NOnly that partition.Default all
--jsonOne line of JSON with the same names; constraints as {constraintId, label, rejections}.Default off
exit code0; 1 for an unknown name or a partition that could not be read (stats of partition N: not authorized); 2 a mistake on the command line.
what each counter means
rejectionsKeyExists · rejectionsKeyNotFound · rejectionsConstraintWrites the broker refused: an insert of a key that exists, an update of a key that does not, a broken view rule.
constraint view.rule NRefusals per rule, such as constraint account_stats.max_characters 1 or character_name.unique 3.
verdictLag · verdictWatermark · verdictMarkersWrittenHow far behind the newest record the checks are (0 = caught up), the offset below which every check is final, and how many results it wrote.
rejectedNotCompactedRefused records still on disk, waiting for compaction.
autoIncrementCounter · autoIncrementReservedThrough · autoIncrementIdsBurnedThe next id; the highest id reserved; ids taken but never stored (a refused batch, a reservation lost in a failover).
txnVotesYes · txnVotesNo · txnVotesNo…Transaction checks passed and failed, and why they failed: ConstraintViolation, KeyExists, KeyNotFound, TxnTooLarge.
txnVoteLatencyNsMax · txnVoteLatencyNsTotal · foldPausedOnTxnLockNsThe longest and total time a transaction check took, and time other writers waited on rows a transaction had locked, in nanoseconds.
txnMarkerWithoutVoteAn alarm: always 0. Anything else is a bug to report.
uniqueConflictsOn a unique view: extra records that claim a key someone already owns.
scanRows · scanPagesRows and pages served by scans of the view.
transientRecordsEvicted · transientSourceResetsOn a view over a transient topic: records dropped before the view read them, and times its source was reset.

A counter that does not apply is not printed: a topic without checks has no rejections, one without autoincrement no ids. A partition with none prints (no counters).

rune schema

Read a typed topic's schema, and turn it into a C++ header.

rune schema get player # the fields, as text rune schema generate player --out include/gen # writes include/gen/player.gen.h rune schema generate --from-file player.blob --out include/gen # offline, from a saved descriptor
get topicPrints the schema. An untyped topic says topic 'x' is untyped: it has no schema.
generate topic --out dirWrites dir/topic.gen.h: a type that reads records of every schema version up to the current one. A field name ending in _ is refused; that ending is reserved for the generated code.Default none: --out is required
generate --from-file blob --out dirThe same from a saved descriptor, without a broker. The blob is the descriptorBlob an app gets from the SDK's getTopicSchemaAndWait, written to a file. Add --lease when the blob is a lease topic's stored schema; it adds withLease() and LeasesRow.Default none: --out is required
list [--verbose]Lists only topics created by the same process, so from the command line it prints (no topics applied in this session). To list a namespace's topics, use catalog list.

rune namespace

A namespace is a tenant: its topics, views, users and groups are its own, named ns/name. default always exists. Creating, limiting, suspending and deleting needs ADMIN on the cluster; a namespace admin sees only its own namespace.

rune namespace create acme --max-topics 100 --max-users 50 # created namespace acme (nsId 1) rune namespace list [--json] # nsId, name, state (--json: every limit) rune namespace limits acme # print its limits rune namespace limits acme --set max-topics=200 --set produce-bytes-per-sec=10485760 rune namespace usage acme [--json] # each limit next to what is used rune namespace suspend acme --read-only # or --reject-all rune namespace resume acme rune namespace delete acme [--yes]
create name [--limit N …]A name of lowercase letters, digits and -, up to 63 characters. Limits you do not name take the broker's defaults (RUNE_NS_DEFAULT_<LIMIT>, normally unlimited).
limits name [--set limit=N …]Without --set, prints the limits. With it, changes the named ones and keeps the others. Lowering a limit deletes nothing: objects over it stay, and the next create is refused. Lowering a retention maximum is the exception: old data goes at the next retention pass.
usage nameEach limit next to its current use on the broker you asked; a limit with nothing to count prints -. Rates, disk and connections are per broker.
suspend name --read-onlyReads go on; writes, schema changes, transactions and offset commits are refused with NamespaceSuspended (51). Open transactions are aborted, sessions stay.
suspend name --reject-allEverything is refused and every session of the namespace is closed. A login with the right password gets NamespaceSuspended (51).
resume nameBack to active. Suspending a namespace twice in the same mode, or resuming an active one, is a harmless no-op. The cluster admin is never suspended.
delete name [--yes]Deletes the namespace with every topic, view, user and group in it. On a terminal it asks [y/N]; elsewhere (a script, CI) it refuses without --yes. The name is free at once; the data is removed in steps that survive a crash. default cannot be deleted.Default without --yes: ask on a terminal, refuse elsewhere

every limit · 0 = unlimited · rates, disk and connections are per broker

max-topics · max-views · max-schemas · max-groups · max-usersHow many topics, views, typed topics (schemas), consumer groups and users the namespace may have.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-partitions-per-topic · max-partitions-totalPartitions in one topic, and in all of them together.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-versions-per-schemaHow many times one topic's schema may change.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-disk-bytesDisk used by the partitions this broker leads. Past it, writes are refused; copying data between brokers never is.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-retention-ms · max-retention-bytesThe longest a topic may keep data, by age and by size. A topic asking for more is refused; existing ones are cut to this.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-message-bytes · max-batch-bytesThe largest single record and the largest batch of records a producer may send.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
produce-bytes-per-sec · produce-records-per-sec · fetch-bytes-per-sec · request-ops-per-sec · query-cycles-per-secRates. Over one, requests are answered Throttled (53) with a time to wait, and the client library waits and retries by itself. On a cluster of N brokers, set the total divided by N.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
burst-secondsLets a quiet namespace save up to this many seconds of each rate and spend it in a burst. From 0 to 3600.Default 0 = no saving
max-connections · max-connections-per-user · max-sessions-per-userOpen connections in the namespace, per user, and logged-in sessions per user.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-open-txns · max-txn-time-msTransactions open at once, and the longest one may stay open (at most 30 days, 2 592 000 000).Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-view-memory-bytesMemory the namespace's views may use. Past it, views pause and their reads answer ViewPaused (54) until memory falls or the limit rises.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0 = unlimited
max-leasesLive leases at once. The one limit not unlimited by default.Default 16 777 216
min-replication-factor · max-replication-factorThe fewest and most copies (replicas) a new topic may ask for.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0
lowest-acks · lowest-min-insyncThe weakest write confirmation allowed: lowest-acks 2 or more forces every write to wait for all in-sync copies (0 and 1 allow any). lowest-min-insync is the fewest in-sync copies a topic may require.Default the broker's RUNE_NS_DEFAULT_<LIMIT>, normally 0
feature-bitsWhich features the namespace may use, added together: compaction 1, transactions 2, QL 4, views 8, SQL 16, Redis 32, anonymous read 64, passwords 128. QL, SQL and Redis are stored only, not enforced yet.Default 0 = all of them

A refused create answers NamespaceLimitExceeded (52) with what was counted, for example namespace limit exceeded: topics (100 of 100).

rune catalog

The catalog is the cluster's history of every definition: topics, views, schemas, users, grants. Reading it needs DESCRIBE on the cluster. These commands work on the whole catalog; to see the changes to one topic or view, use show history topic NAME in the console.

rune catalog list --json --namespace acme # topics and views, as JSON rune catalog export > prod.rcat # a backup of every definition rune catalog diff --from prod.rcat --to staging-1:40200 # exit 0 same, 3 different rune catalog replay --from prod.rcat --into staging-1:40200 # recreate them on another cluster rune catalog serve --listen 127.0.0.1:55990 # a small read-only HTTP endpoint
list --json --namespace nsOne namespace's live topics (name, partitions, schema version, retention) and views (name, kind, source topics), as one JSON object. At most 2 000 entries; "truncated": true says when there were more.
export [--up-to offset]Writes the catalog as an .rcat file on standard output; --up-to stops at an offset.Default unset: the whole catalog
diff --from a --to bCompares two catalogs, each a file or a live broker. Exit 0 the same, 3 different (printed), 1 error, 2 usage.
replay --from a --into host:port [--up-to offset] [--cluster-id id]Issues every definition of a file or another cluster against --into, recording where each came from. --cluster-id names the source.Default the --from value
serve [--listen host:port] [--refresh-wait ms] [--cli-data-dir dir]Answers GET /internal/v1/namespaces/<ns>/catalog with the body of list --json and GET /healthz with ok. --refresh-wait bounds each read of the catalog (at most 15 000). Ctrl-C or SIGTERM stops it.Default 127.0.0.1:55990 (address), 5 000 ms (--refresh-wait)

rune security

The two steps before anyone can log in. Users, roles and grants afterwards are Rune QL statements.

rune security gen-cluster-key --out secrets/cluster.key # one per cluster rune security bootstrap --admin admin --cluster-key-file secrets/cluster.key --broker localhost:40200 # one-time password for admin: … change it at the first login
gen-cluster-key --out pathWrites a new cluster key, 64 hex characters, readable only by you (mode 0600). Every broker of the cluster needs the same key. An existing file is never overwritten.Default none: --out is required
bootstrap --admin nameCreates the first security admin of a new cluster, once. Not needed when the broker sets RUNE_ADMIN_PASSWORD_FILE (Self-host). Without --password-file it makes a 24-character one-time password and prints it once. Either way the admin must change the password at the first login. A second bootstrap is refused: the cluster already has an admin.Default none: --admin is required
--cluster-key-file pathProves you hold the cluster key.Default RUNE_CLUSTER_KEY_FILE
--password-file pathSets the admin's password from a file instead of a printed one-time password. It too must be changed at the first login.Default unset: a printed one-time password

Exit codes and common errors

0done
1it failed; the message says why
2a mistake on the command line: an unknown option, a missing value, an option given twice
3catalog diff: the two sides differ
otherconsole -f and schema get: the broker's error code

when something goes wrong

AuthenticationFailed (44)Wrong user or password, or a user of a namespace written without ns/.
NotAuthorized (45)Logged in, but without the grant this needs. An admin runs GRANT … TO USER you.
PasswordChangeRequired (47)A one-time password: run ALTER USER you SET PASSWORD '…'; from a file first.
HandshakeFailed (29)TLS failed: the certificate is not trusted (a self-signed one needs --tls-ca) or carries another name (add --tls-host).
connects, then times outAnswers do not reach you. Behind a router, a NAT or Windows Firewall, add --gateway-response-port; inside a container or VPN, set --cli-egress.
TopicExists (25)The topic is already there. Re-running a setup script? Give it a --request-id.
SchemaConflict (31)Someone changed the topic since the version you passed in --expected-version. Look again with show topic.
NamespaceLimitExceeded (52) · Throttled (53)A namespace limit. See rune namespace usage.

Environment variables

Each one stands in for an option; an option on the command line wins.

RUNE_BROKER · RUNE_URL--broker · --url
RUNE_USER · RUNE_PASSWORD_FILE--user · --password-file
RUNE_TLS_CA_FILE · RUNE_TLS_HOST--tls-ca · --tls-host
RUNE_GATEWAY_RESPONSE_PORT · RUNE_EGRESS--gateway-response-port · --cli-egress
RUNE_PROFILE--profile
RUNE_CLUSTER_KEY_FILEsecurity bootstrap --cluster-key-file
RUNE_PASSWORDIgnored, with a warning. Use a password file.