All docsStellar LinkRF bench · by Stellar Systems v0.4.0

Configuration

Daemon Configuration

Where stellarlinkd's configuration file lives, how to check a change, and the keys of each section with their shipped values.

stellarlinkd, the daemon on the unit, is configured by one TOML file. The unit ships with a complete configuration; the tables below list the keys you may want to change, with the value shipped on the unit and the built-in default used when a key is omitted.

Where your configuration lives#

The unit's SD card has two partitions: the software, which an update replaces, and a data partition that belongs to you and that no update touches. Your configuration is kept on the data partition:

FileWhat it is
/mnt/data/stellarlinkd/stellarlinkd.tomlYour configuration. Edit this one. It survives restarts and software updates
/etc/stellarlinkd/stellarlinkd.tomlThe shipped configuration. Rewritten at every start; changes made here are lost

At its first start with a data partition, the unit copies the shipped configuration to /mnt/data/stellarlinkd/stellarlinkd.toml, and from then on uses your copy. Later updates do not overwrite it; to return to the shipped settings, delete the file and restart.

To change a setting:

Shell
vi /mnt/data/stellarlinkd/stellarlinkd.toml
stellarlinkd --config /mnt/data/stellarlinkd/stellarlinkd.toml --dry-run   # check it
/etc/init.d/S99stellarlinkd restart                                        # or restart the unit

If your file is invalid, the unit does not stay without a daemon: it starts with the shipped configuration instead and writes the reason to /mnt/data/stellarlinkd/CONFIG-REJECTED.txt (also in the daemon log). Fix the file and restart.

Profiles pushed with PUT /api/v1/profiles/{name} and scenarios saved with POST /api/v1/scenarios are kept on the data partition too, under /mnt/data/stellarlinkd/profiles/ and .../scenarios/, and are loaded at every start. A profile or scenario there takes precedence over a shipped one of the same name.

Command line#

text
stellarlinkd [-c|--config <FILE>] [-l|--log-level <FILTER>] [--dry-run]
OptionEnvironmentMeaning
-c, --configSTELLARLINKD_CONFIGThe configuration file. Without it, ./stellarlinkd.toml then /etc/stellarlinkd/stellarlinkd.toml are searched
-l, --log-levelSTELLARLINKD_LOG_LEVELA log filter (info, debug, stellarlink_api=debug,info, …). When given, it overrides [observability] log_filter
--dry-run—Load and validate the configuration, then exit without starting any service

Check a modified configuration with --dry-run before restarting the daemon with it:

Shell
stellarlinkd --config /etc/stellarlinkd/stellarlinkd.toml --dry-run

If the configured log filter would hide the daemon's own info messages, the daemon says so on standard error, so a filter that matches nothing is not mistaken for a quiet daemon. The daemon log is also shown on the System page of the Web Console.

[daemon]#

KeyMeaning
profiles_dirDirectory of profiles, *.yaml directly in the directory
scenarios_dirDirectory of scenarios, loaded recursively
user_dirYour own profiles and scenarios (profiles/, scenarios/), loaded after the shipped ones and taking precedence on a shared name; where pushed profiles and saved scenarios are written. Shipped as /mnt/data/stellarlinkd. Ignored, with a log line, when it is not on persistent storage
campaigns_dirDirectory of campaigns
campaign_state_dirCampaign cursors. Must be on storage that survives a restart. With the shipped value, cursors are kept in user_dir/campaigns when the data partition is present (cursors found in the old location are moved there at start), else on the unit's internal flash

The shipped values point to the unit's own storage; leave them unchanged unless you relocate these files.

[api]#

KeyShippedDefaultMeaning
bind0.0.0.0:80800.0.0.0:8080REST and WebSocket listener
cors_origins["*"]["http://localhost:5173"]Allowed browser origins; "*" allows any
auth_required—falseRequire a token on every change and on the /ws/tx transmit stream. See Using the API
auth_secret—emptySecret the tokens are signed with. Required when auth_required is set: at least 32 characters, not an example value, or the unit refuses to start
max_body_bytes—20 MiBLargest request body. Hex payloads double in size, and a transmit request uses about 11× its useful bytes in memory while it is processed. Use /ws/tx for large transfers

[pl_driver]#

This section connects the daemon to the unit's modem. It must be present; leave it exactly as shipped.

[telemetry]#

KeyShippedMeaning
poll_interval_ms200Telemetry cadence (5 Hz as shipped). See Telemetry and Metrics

[store]#

KeyMeaning
sqlite_pathThe run store (reports, run history, profile revisions). With the shipped value or an empty one, it is user_dir/stellarlink.db on the data partition and survives restarts and power cuts; without a data partition it is kept in memory and lost at restart. Any other path is used as given
report_payloads_keptHow many runs keep their full report; older runs keep their summary. Default 100 on the data partition, 3 in memory
report_payloads_max_mbSpace the full reports may take, in MiB; the newest report is always kept. Default 16 on the data partition, unbounded in memory
disabledtrue opens no store

GET /api/v1/system/status reports, under storage, where run reports and campaign progress are kept and whether they survive a restart.

[observability]#

KeyShippedDefaultMeaning
metrics_bind0.0.0.0:90900.0.0.0:9090Prometheus exporter
log_filterinfoinfoLog filter (overridden by --log-level)
json_logs—falseJSON log lines
journald—falseLog to journald

[datapath]#

KeyShippedDefaultMeaning
autostartfalsefalseClaim the modem at startup. Leave it off: while the daemon holds the modem, loopback measurements and captures cannot claim it. The daemon claims it on demand (stellarlinkctl datapath enable)
buffer_length40964096Block length in samples; each block carries buffer_length useful bytes

[radio]#

Any key left out takes its default.

KeyShippedDefaultMeaning
condition_at_starttruefalseRun the AD9361 calibration and interface tuning once at startup, beside the API. A later chain up then skips the calibration. A failure or a timeout is logged and leaves chain status showing what is unmet; set it to false to condition the chain only on demand with stellarlinkctl chain up
boot_profilehc_air_qpsknoneThe profile whose rate the startup tuning targets. A profile at another rate re-tunes when it is applied
condition_timeout_s180180Give up on the startup conditioning after this long (the API comes up regardless)
settle_after_calibrate_ms20002000Wait between calibration and tuning

[monitor] and [iq]#

KeyDefaultMeaning
[monitor] synthetic_fftfalseProduce a synthesised spectrum when no samples are available. Responses are then marked synthetic: true
[iq] allow_syntheticfalseAllow IQ captures to fall back to a synthesised tone, marked synthetic: true
KeyShippedDefaultMeaning
enabledtruefalseRun the ZeroMQ link service
kindzmqzmqTransport: zmq
bind_address0.0.0.00.0.0.0Listen address
tx_port55555555PULL: frames in
rx_port55565556PUB: frames received
telemetry_port55575557PUB: telemetry; 0 disables it
frame_slot_bytes000 publishes whole blocks; N parses N-byte slots. Must match the profile's mtu_bytes and divide 4096
tx_unauthenticated—falseWith [api] auth_required, the transmit port listens on 127.0.0.1 only, since the link has no authentication. true keeps it on bind_address, so any host can transmit

See ZeroMQ Link Service.

↑↓ to moveEnter to open