Introduction
Spora is a peer-to-peer VPN. One person shares their Internet connection, another connects to it through a link. Traffic comes out at the sharer’s home connection, from a real residential IP, which makes it very hard to tell apart from the sharer’s own browsing.
This book covers the command-line client, spora. It is the same
networking core that powers the Spora apps, driven from a terminal. You can
use it to:
- share your connection with someone you trust, and keep a local log of what your connection was used for;
- connect through a friend’s shared connection, as a full VPN client on Linux, macOS, or Windows;
- run pieces of your own infrastructure, such as a relay, when you do not want to depend on the built-in one;
- automate any of the above: the CLI has a machine-readable mode designed for scripts and tests.
If you just want the two-command version, start with the Quickstart. The how-to guides walk through real setups, and the reference section describes every flag, event, and file.
A note on trust: the person who shares carries the traffic of the person who connects. Share with people you know, and connect through people who know you. The sharing guide explains the connection log that protects the sharer’s side of that bargain.
Quickstart
Two machines, two commands: share on the machine whose connection you want
to use, use on the machine that should tunnel through it.
Install
On Linux and macOS:
curl -fsSL https://spora.to/docs/install.sh | sh
On Windows, in PowerShell:
irm https://spora.to/docs/install.ps1 | iex
The script downloads the latest release for your system from GitHub, checks
it against the release’s checksums and installs it. On Linux and macOS the
binary goes to /usr/local/bin/spora, and sudo may ask for your password
for that one step. On Windows, spora.exe goes to
%LOCALAPPDATA%\Programs\Spora, which is added to your PATH. Run the same
command again to upgrade.
Both scripts are short, so read them first if you like: install.sh, install.ps1. The comment at the top of each says how to pin a version or install somewhere else.
Install by hand
Download the archive for your system from the releases page:
- Linux:
spora-<version>-linux-<arch>.tar.gz, a single static binary namedspora. - macOS:
spora-<version>-macos-<arch>.tar.gz(aarch64for Apple silicon,x86_64for Intel), a single binary namedspora. It is not notarized yet, so if a browser downloaded the archive, macOS will refuse to run the binary until you clear the quarantine flag (xattr -d com.apple.quarantine spora). - Windows:
spora-<version>-windows-<arch>.zip, containingspora.exepluswintun.dll.spora useloads the DLL from next to the executable, so keep the two files together, in a folder on yourPATH.
On Linux and macOS, unpack the archive and put the binary in
/usr/local/bin, where sudo finds it too (spora use runs as root):
tar -xzf spora-*.tar.gz
sudo install -m 755 spora /usr/local/bin/spora
Build from source
A Rust toolchain is the only requirement:
git clone https://github.com/Spora-VPN/spora.git
cd spora
cargo build --release -p spora-cli
# the binary is target/release/spora-cli; rename or alias it to `spora`
For a source build on Windows, spora use also needs wintun.dll from
wintun.net next to the executable.
Share
On the sharing machine:
spora share
It prints a link:
Share this URL with the peer that wants to connect:
https://spora.to/s/2m5cRp…?r=167.71.66.250:443
Send that link to the person who should connect. Treat it like a key to your connection: anyone who has it can use it. The link stays the same across restarts, and a local connection log records what your connection was used for. Leave the process running; Ctrl+C stops sharing.
Connect
On the connecting machine, paste the link (quote it, the ? matters to the
shell). The client needs privileges to set up the tunnel: root on Linux and
macOS, an elevated console on Windows.
sudo spora use "https://spora.to/s/2m5cRp…?r=167.71.66.250:443"
You will see something like:
Tunnel up on spora0 (10.11.0.2/24, fd00:5350::2/64), MTU 1280 (follows the path).
Routing all traffic through the tunnel.
Resolver: 100.64.0.53 (set via resolvectl; restored on exit).
Press Ctrl+C to disconnect.
That is a full VPN: all traffic now leaves through the sharer’s connection.
Check it with curl ifconfig.me: you should see the sharer’s IP. Behind
the scenes the two machines also try to establish a direct path to each
other and switch over when it works: your traffic then stops sharing the
relay’s bandwidth and usually takes a shorter path.
Ctrl+C disconnects and puts routing and DNS back exactly as they were.
Where to go next
- Share your connection: identities, the connection log, and running a share permanently.
- Connect through a friend: what the client changes on your machine and how to shape it.
- Find out why a connection failed: every run keeps a diagnostic record you can read afterwards.
Share your connection
spora share turns your machine into the exit for someone you trust. By
default the client connects straight to it, which suits a machine with a
public address, such as a server. Behind a NAT, share through a relay
instead: the sharer registers with it, and the client reaches it through
the relay until a direct path is punched.
spora share
Your share URL is a credential
The printed https://spora.to/s/… link is the whole secret: whoever has it
can route traffic through your connection. Send it over a channel you
trust, and to people you trust. If it leaks, run spora share --fresh to
make a new share (and a new URL); the old link stops working.
The URL stays stable across restarts because the share behind it is kept
at ~/.config/spora/share.bin, made under this machine’s device identity
(in ~/.local/state/spora/service/). Keep several shares with
--share-file. The relays are part of the share and of its URL: running
with other relay flags than the share was made with makes a new share,
with a new URL.
Without relay flags, a new share is relay-less. The first run asks STUN
services which public address this machine reaches the internet from,
picks a random UDP port between 10000 and 32767, and puts both in the URL
(an IPv6 address as well, where the machine has one). Every run prints the
port, and a firewall in the way must let it in. If the public address is
not one of the machine’s own, the run says it is behind a NAT: clients
then get in only if the NAT forwards that port to it, as a cloud server’s
usually does. An address family whose NAT changes the port is left out of
the URL, as long as another family remains. --direct host:port names the address and port instead (a
hostname, or a port your firewall already lets in). The address is fixed
when the share is made, so every later run without relay flags asks STUN
again once the share is up, and warns if the machine now reaches the
internet from another address than the URL names; spora share --fresh
then makes a share on the new one.
To share through relays instead, pass --spora-relays for Spora’s relays:
the first run registers this machine with Spora’s API and gets the relays
from it, with the token those relays want, which the CLI then renews while
it runs. Or pass --relay (and --relay-token for a relay that wants one)
to use relays of your own; see Run your own relay.
One share serves one client at a time. If a second client connects with the same URL, it replaces the first.
The connection log
You carry someone else’s traffic, so the CLI keeps a local, private record of what your connection was used for: which client session reached which destination IP and port, when, and how much data moved. If your IP is ever implicated in something you did not do, this is your answer to “what actually happened”.
spora log query --ip 203.0.113.5 --from 2026-08-01 --to 2026-08-28
spora log sessions
The log lives at ~/.local/state/spora/connlog/<routing-key>/ (in root’s
home for a share run with sudo, such as --os-routing below: read that
one with sudo spora log), keeps 90
days by default (--conn-log-retention-days), and never leaves your
machine. A new share (after --fresh, or with other relays) gets a log of
its own beside the old one, which stays; every spora share keeps
sweeping the old logs there by the retention each was kept with.
spora log hold pins a time range against retention if you have
been asked to preserve records. --no-conn-log disables logging entirely,
which also means you will have no record of what clients did with your IP.
--conn-log-sessions-only records who was connected and when, without
per-destination detail.
Be aware of the limits: destinations are IPs, not names, and a session that stayed on the relay path never directly observes the client’s own address. The log states what kind of evidence each recorded address is.
Your client’s DNS
By default the client resolves names through you. Its queries arrive at a
resolver address inside the tunnel (100.64.0.53), and the share answers
them from the resolvers your own machine uses (/etc/resolv.conf; the
adapters’ DNS servers on Windows), forwarding each query verbatim to one
of them and the answer verbatim back. The client never learns those
addresses, and it still cannot reach anything else on your LAN. Should
your resolvers stop answering, the share falls back to public ones
(8.8.8.8, 1.1.1.1) until they recover. spora share prints which
resolvers it is forwarding to.
--dns-upstream <ip[:port]> (repeatable) forwards to these servers
instead, and only to them: no public fallback. --no-dns-forwarder
switches the forwarding off; the client then needs public resolvers of
its own (spora use --dns).
Known limitation: if your system resolves over encrypted DNS configured in
the OS itself (DNS over TLS or HTTPS on Android, macOS, iOS or Windows,
as opposed to a local stub such as systemd-resolved doing it on the
machine’s behalf), the share still sends the client’s queries in plain
UDP to the same servers. They resolve, but not over the encrypted
transport you chose. With --os-routing the forwarder is wired in through
a DNAT rule, so it is unavailable under --no-nat.
Running it permanently
The share is a single foreground process, so a systemd unit is all it takes:
[Unit]
Description=Spora share
After=network-online.target
[Service]
ExecStart=/usr/local/bin/spora share
Restart=on-failure
User=spora
[Install]
WantedBy=multi-user.target
systemctl stop sends SIGTERM, which the CLI handles cleanly, as it
does Ctrl+C and the SIGHUP of a closed terminal or a dropped SSH
session.
The kernel exit
By default the sharer terminates client flows in a userland network stack and re-originates them from ordinary sockets. That needs no privileges and works everywhere. On Linux you can instead let the kernel route and NAT the client’s packets through a TUN device:
sudo spora share --os-routing
This performs better under load and behaves like a router rather than a
proxy. It changes the firewall (iptables) and sysctls while running and
undoes those changes on exit. See spora share --help for the
--tun-addr, --tun-mtu, and --no-nat knobs.
Connect through a friend
spora use <URL> is a full VPN client. With just the URL it will:
- bring up a tunnel interface (
spora0on Linux, autunon macOS, a wintun adapter on Windows); - connect to the sharer, first through the relay in the URL, then directly when a path can be punched;
- route your traffic into the tunnel, without ever touching your system’s own default route;
- send your DNS queries to the sharer, whose exit answers them from its own resolvers (or to public resolvers of your choosing);
- follow the network path’s real packet-size budget, so the interface MTU is what the path actually supports instead of a guess;
- put everything back the way it was when you disconnect.
It needs privileges for all of that: sudo on Linux and macOS, an elevated
console on Windows. Only one managed tunnel runs at a time.
sudo spora use "https://spora.to/s/…"
What it deliberately does not touch
Your default route stays untouched. On Linux the tunnel lives in its own routing table behind policy rules; on macOS and Windows it uses two half-width routes that take precedence by being more specific. Your LAN keeps working: destinations your machine has a direct route to (your printer, your NAS) are never pulled into the tunnel.
The tunnel’s own housekeeping traffic (the connection to the relay, the path discovery probes, the direct connection to the sharer) is pinned to your physical network, whatever addresses it goes to, so it does not loop into the tunnel. In the rare situations where it cannot be pinned (no detectable uplink, for example) spora warns loudly instead of failing silently.
DNS
While connected, name lookups go to the sharer. The tunnel carries them to
a fixed resolver address inside it (100.64.0.53), and the sharer’s exit
answers each one from whatever resolvers the sharer’s own machine uses,
so names resolve exactly the way the sharer’s network sees the world,
including the resolvers that network hands out, which are often the ones
that work best (or at all) from there. You never learn the sharer’s
resolver addresses, and the sharer still carries no traffic to its own
LAN. One honest exception: Windows may
still consult other adapters’ resolvers in parallel (its multi-homed name
resolution); the tunnel’s resolver is made the preferred one, but a
strict lockdown would need firewall-level filtering that spora does not
install.
On exit the previous resolver settings are restored. If the process is
killed outright, the next start repairs the common leftovers (a replaced
resolv.conf on Linux, the per-service settings on macOS).
Pick different resolvers with --dns (repeatable), or keep your own setup
with --no-dns. Any resolver other than the sharer’s must be a public
address: the sharer does not carry traffic to private ones. A sharer that
runs with --no-dns-forwarder does not answer the tunnel’s resolver
address at all; connect to one with --dns and public resolvers.
MTU
The two ends discover how large a packet the path between them can carry
and the client sets the tunnel interface to exactly that, typically 1414
bytes on an ordinary connection. When the tunnel later switches to a
direct path, the value is measured again and re-applied. Pin it manually
with --mtu if you must; below 1280 you also need --no-ipv6, because
IPv6 requires 1280.
IPv6
The tunnel carries IPv6 by default. If the sharer’s connection has no
IPv6, v6 connections are reset immediately at the sharer rather than
hanging; most applications (browsers in particular) then retry over v4 on
their own. --no-ipv6 keeps IPv6 out of the tunnel entirely; note that
on a v6-capable network your v6 traffic then goes around the tunnel, not
through it.
Disconnecting
Ctrl+C, SIGTERM, SIGHUP (the terminal closed, the SSH session dropped),
closing the console window on Windows: all of them restore routes,
resolver, and interface before the process exits. They work while
spora use is still connecting too, and stop the attempt there. If the
process is killed outright (or you press Ctrl+C a third time, which ends
it at once), the interface disappears with it, and the next spora use
cleans up whatever else was left.
Split tunnels and other client setups
The default spora use routes everything. These are the other shapes it
supports.
Split tunnel: only some destinations
Route only chosen prefixes through the sharer and leave the rest of your traffic alone:
sudo spora use "$URL" --route 203.0.113.0/24 --route 198.51.100.0/24
Only those networks go through the tunnel. Your machine’s more specific
routes still win, so a --route that overlaps your LAN does not cut you
off from it.
DNS still switches to the tunnel resolvers by default, and the resolvers
themselves are routed through the tunnel so lookups to them stay off your
uplink (with the Windows caveat described in
Connect through a friend). If you want your normal resolver instead, add
--no-dns; names will then resolve the way your local network sees them,
which may differ from what the routed destinations expect.
No routes at all
sudo spora use "$URL" --no-routes
Brings the interface up with its address and MTU and stops there: no
routes, no resolver changes. Add routes yourself with ip route, route,
or your tooling of choice. This is the “I know what I am doing” mode for
custom policy routing.
Attach to an interface you manage
spora use "$URL" --tun-name mytun0
Attach to a TUN device that already exists (Linux only). The CLI only moves packets; the interface’s address, MTU, routes, resolver, and cleanup are entirely yours, and nothing else on the machine is touched. This is the mode test harnesses drive. Two cautions: create the device and address it before starting, and never route the relay’s own address into the interface, or the tunnel’s transport would chase its own tail.
Addressing inside the tunnel
The client defaults to 10.11.0.2/24 and fd00:5350::2/64 inside the
tunnel. If those collide with networks you actually use, pick others with
--tun-addr and --tun-addr6. They must stay in private (RFC 1918 or
CGNAT) and ULA space respectively; sharers refuse other client addresses.
Choosing STUN servers
Direct-path discovery asks STUN servers for your public address. The
built-in list works for most people; override it with --stun host:port
(repeatable, tried in order) if your network filters them or you prefer
your own.
Keeping the relay path
--no-direct-upgrade disables the direct path entirely: the session stays
on the relay. Useful when a punched path is undesirable, for example when
testing relay behavior itself.
Run your own relay
A new share is relay-less by default: clients connect straight to the
sharing machine, so it needs a public address. A relay lets clients reach
a sharer behind a NAT. spora share --spora-relays uses Spora’s; running
your own instead is a small job: the relay is a deliberately dumb UDP
forwarder. It carries
encrypted packets between the two ends without being able to read them,
holds no keys, and speaks no protocol of its own beyond a registration
message.
The relay ships as its own tarball in the same GitHub release
(spora-relay-…, which contains the spora-relay binary) and builds from
the same repository (where a source build names the binary plain
relay).
# on a machine with a public address
spora-relay --port 51820
# on the sharing machine
spora share --relay your.host:51820
The relay’s address is baked into the share URL, so clients need nothing
extra. Repeat --relay to register with several relays; clients try them
IPv6-first, then in listed order, which makes a second relay a cheap
fallback. A hostname with
both A and AAAA records counts as one relay per address family, and gives
you IPv6 connectivity for free.
A relay for many sessions
All sessions share the relay’s one UDP socket, and the kernel drops what
arrives while that socket’s buffer is full. The relay keeps the buffer
empty by reading ahead of its sending, into a queue of its own, and asks
the kernel for a larger buffer besides (8 MiB; --udp-buffer <bytes> for
another size). A stock Linux grants 208 KiB, about a hundred datagrams,
unless the host’s limit is raised:
# /etc/sysctl.d/60-spora-relay.conf; apply with `sysctl --system`, then restart the relay
net.core.rmem_max = 8388608
net.core.wmem_max = 8388608
The relay logs the sizes it got when it starts, and warns when they are less than it asked for. A relay for a few people works without this; set it on a host that carries many busy sessions at once.
Skipping the relay entirely
If the sharing machine itself has a public, reachable address, no relay is needed at all. That is the default for a new share without relay flags: the sharer finds its public address with STUN and picks a port. To name the address and port yourself:
spora share --direct your.public.host:51820
Clients then dial the sharer directly. Combine with --relay to offer
both and let clients fall back.
Restricting who may use your relay
An open relay forwards for any sharer that registers. To limit yours to sharers you have given a token, start it with one:
spora-relay --port 51820 --token-file relay.token
spora share --relay your.host:51820 --relay-token relay.token
The token stays on the sharing machine, in the share; it is not part of the URL. The repository’s relay/README.md covers the alternative TCP and Noise carriers for networks that block UDP or fingerprint QUIC, and the relay’s own session log.
Drive the CLI from scripts
Everything the CLI reports has a machine-readable form. This is the same surface Spora’s own test infrastructure drives, so it is kept stable and exact.
JSON events
With --json, share and use emit one JSON object per line on stdout
instead of prose:
spora share --json | while read -r line; do
event=$(jq -r .event <<<"$line")
...
done
The first events you care about are share_ready (carries the URL) and
tunnel_ready (the tunnel interface is up). path_activated tells you
which transport is actually carrying traffic, and fires again when the
session upgrades to a punched direct path. The complete vocabulary, with
every field, is in the JSON events reference.
Events are additive: new event types and new fields may appear over time, so parse by name and ignore what you do not know.
A tunnel your harness controls
For tests you usually do not want the CLI touching routing at all. Create the TUN yourself, then attach:
ip tuntap add dev t0 mode tun user "$USER"
ip addr add 10.231.0.2/24 dev t0
ip link set t0 mtu 1280 up
ip route add 198.51.100.7/32 dev t0 # route the systems under test, never the relay
spora use "$URL" --tun-name t0 --json
In this mode the CLI guarantees it changes nothing on the host beyond
pumping packets; tunnel_ready reports "mode": "attached". The MTU the
path discovers is still reported (path_mtu) so your harness can apply it
if it wants to.
Clean shutdown
SIGTERM, SIGINT and SIGHUP all disconnect cleanly and restore any host
changes; processes exit zero. That holds at any point of a run, including
while spora use is still connecting: it stops the attempt, and its
stopping event then comes without a tunnel_ready. A second signal
skips the last diagnostics upload; a third ends the process at once
(exit status 130), without cleanup, as SIGKILL would. SIGKILL skips
cleanup by definition; the next spora use repairs the client-side
leftovers it finds. On Windows, closing the console counts as a clean
shutdown.
Records for assertions
Every run also writes a diagnostic record: a structured account of what
was attempted and how it ended, with stable reason codes rather than
message strings. spora record show --json prints it, --record-id lets
you tag a run with your own correlation id, and --record-dir puts the
records where your harness expects them. See
Find out why a connection failed.
Find out why a connection failed
You do not have to reproduce a failure with more logging: every run of
share and use keeps a diagnostic record of what it attempted, what
failed, and why. When someone says “it did not work”, the record is the
thing to look at, and spora report is how to send it (see below).
A run made with sudo (sudo spora use, sudo spora share --os-routing)
keeps its files in root’s home, so read them with sudo too: sudo spora record list. (Records that earlier versions left in your own home are
covered in Files and directories.)
spora record list
when id role outcome took first failure
2026-08-28 18:53:04Z 6a9ec9d2 client never_connected 8.0s relay_dial connect_timeout
2026-08-28 14:02:11Z 0c81d7a2 client closed_locally 541.2s punch punch_timeout
spora record show walks the newest record step by step; show <id>
picks one. Failures carry a reason code from a fixed vocabulary, so two
people looking at two records can compare them meaningfully.
spora record show 6a9ec9d2
spora record export -o run.json # one record, as JSON, for someone else
Reading the common outcomes
never_connected, with a failed relay_dial step. The client never
reached the sharer. The reason code says how it died: connect_timeout
means nothing answered at all (the share is not running, the relay in the
URL is unreachable, or the network drops UDP); handshake_timeout means
something answered but the session never completed. If the sharer
advertises a TCP carrier, the client falls back to it automatically;
otherwise ask the sharer to add one.
Connected, but the punch steps failed. The session worked but stayed
on the relay: the record ends closed_locally (or closed_by_peer), the
punch steps show punch_timeout or similar, and there is no
direct path after line in spora record show. That is the designed
fallback, not an error: some NAT combinations (notably symmetric NAT on
both ends) cannot be punched. Expect the relay’s bandwidth, not
direct-path bandwidth.
Outcome lost, or repeated reconnecting. The path keeps dying. Look
at the quality samples (spora record show --samples): probe loss and
round trip time while the tunnel was up are recorded, and tell you whether
the problem is the path or the endpoints.
closed_locally with reason permission_denied or misconfigured.
The tunnel came up, but this machine would not take it: a TUN interface
it may not attach, a route or resolver change that was refused. The
record’s detail quotes the error. The network is not at fault.
unknown (cut) in spora record list. The record has no ending: the
process was killed outright (SIGKILL, a crash of the whole machine, a
power cut) before it could write one. Ctrl+C, SIGTERM and SIGHUP all end
a run properly, at any point.
spora use refuses to start. The error names the cause directly:
missing privileges (run with sudo, or elevate the console), another
running instance (only one managed tunnel at a time), or on Windows a
missing wintun.dll.
When you report a problem
sudo spora report --note "use stopped connecting after the router restarted"
This writes one zip file with the records, the diagnostic log and any
crash reports of the last three days (--hours changes that), plus the
exact build. Email it to [email protected] with the command line you ran.
It needs no account and no network, and telemetry does not have to be on.
If uploads are on, the report names this machine’s device id, so support
can also find what has reached Spora already.
Run it the way you ran the failing command: sudo spora report for
sudo spora use (the zip then belongs to root, and the command prints how
to hand it to your own account), plain spora report for a spora share
started without sudo. On Windows an elevated console keeps your own
files, so plain spora report covers both. A run that kept its records
somewhere else (--record-dir) needs that directory named again:
spora report --record-dir ~/spora-runs. So do the records that runs
with sudo left in your own home under earlier versions (on macOS, say):
sudo spora report --record-dir ~/.local/state/spora/records.
If the report could not read a directory, it says which one and why, and
its manifest.json lists it as left out.
When you ask the person at the other end instead, send them the record
(spora record export), the exact command line, and spora build-info --json from both ends. The build info names the exact source the binary
was built from, so nobody debugs the wrong version.
Send diagnostics to Spora
Every run of share and use keeps three things on your machine: a
diagnostic record of each connection (what was attempted, what failed,
and why), a diagnostic log, and crash reports, if any. Telemetry is one
switch: whether these also go to Spora, in the background. They show
where and how networks block Spora, and help fix problems. It is off
unless you turn it on, or your account requires it (for example for a
promotion you signed up for; see Turning it off).
spora telemetry on
spora telemetry status
spora telemetry off
What is sent
The diagnostic records, the diagnostic log and the crash reports in the default directories (see Files and directories). They include network addresses: the public address your network shows, the addresses of the peers, relays and other servers your machine connects with, and the address each upload comes from.
What is not sent: the connection log a sharer keeps (which client reached
which destination) never leaves the machine, and the per-flow log lines
(one for each connection a client makes) are kept out of the diagnostic
log in the first place. Records a run kept elsewhere (--record-dir) are
not sent either.
When it is sent
spora share and spora use send what is pending when they start,
every 15 minutes while they run, and once more as they stop: for at most
5 seconds, and another Ctrl+C after the one that stopped the run skips
it. spora telemetry upload sends everything now and says what went. An
upload that is cut short resumes where it stopped the next time. Uploads
go out directly (they ignore HTTP_PROXY and similar settings), or
through the tunnel while one is up.
Turning it off
With uploads off nothing is uploaded. A machine that was registered
earlier still asks Spora once a day whether its account requires
telemetry; deleting service.json (see
Files and directories) stops that too, and
forgets the registration.
If your account requires telemetry, spora telemetry off is refused and
says so:
Your account requires that telemetry is enabled (most likely because you’ve signed up to a promotion). You can keep it enabled, sign in to a different account, or contact support.
Runs made with sudo
sudo spora use runs as root and uses root’s files in root’s home,
including root’s telemetry switch, also where sudo keeps your HOME (as
it does on macOS). So sudo spora telemetry on is the switch for runs
made with sudo, and sudo spora report bundles them. The commands print a
reminder of this when you run them without sudo. On Windows an elevated
console keeps your own files and switch.
Without telemetry
A bug report does not need telemetry, an account, or any Spora server:
spora report writes the same files into one zip for you to send. See
Find out why a connection failed.
Another API
--api (on spora telemetry upload) and the SPORA_API environment
variable point uploads at another API, such as a test server. A
SPORA_API that is set but empty, or not valid UTF-8, is an error rather
than Spora’s own API.
Without either, uploads go to Spora’s built-in API. A registration with it
keeps working at whatever addresses later versions of Spora use for that
API: its token goes to any of them, and nothing is registered or sent
again. An API named with --api or SPORA_API is another API, even at
Spora’s own address. Its token goes only to the exact addresses that
issued it, and the two never mix: the built-in registration’s token is
never sent to another API, nor another API’s token to the built-in one.
With another API the machine registers anew there, and the earlier
registration is kept, with what it has sent, for when its API is used
again: switching back neither registers again nor resends anything. An
account that requires telemetry binds only the API it belongs to: spora telemetry off under another API is not refused because of it. spora telemetry status names the API in use (built-in, or the addresses in
SPORA_API) and shows its registration and account, and the other
registrations kept.
Command reference
The complete surface of the spora command line, rendered from the same
definitions the binary is built from. spora <command> --help prints the
same text.
spora share
Share over a tunnel. Serves the share kept at $XDG_CONFIG_HOME/spora/share.bin (made on the first run), so the share URL stays the same across invocations. The relays are part of the share (and of its URL): relay flags that differ from the stored share’s make a new share, with a new URL. Without relay flags a new share is relay-less: clients connect straight to this machine, on a random UDP port, at the public address STUN services see it use
spora share [OPTIONS]
--share-file <SHARE_FILE>
Override the share file path
--fresh (default false)
Make a new share (a new URL) and overwrite the stored one
--os-routing (default false)
Bypass the userland netstack: write client packets to a TUN device and let the kernel route/NAT them. Requires root (or CAP_NET_ADMIN). Linux only
--tun-addr <TUN_ADDR> (default 10.213.0.1/24)
TUN interface address in CIDR form (with –os-routing)
--tun-addr6 <TUN_ADDR6> (default fd00:5350::1/64)
TUN interface IPv6 address in CIDR form (with –os-routing). Must be a ULA (fc00::/7): clients may only source inner v6 traffic from ULA space, so a global address here would shadow a real prefix without ever being reachable
--tun-mtu <TUN_MTU> (default 1280)
TUN MTU (with –os-routing)
--no-nat (default false)
With –os-routing: don’t touch ip_forward or iptables. You are responsible for forwarding + NAT; per-client return routes on the TUN are still installed
--relay <RELAY> (repeatable)
Override the relay address(es) (host:port) used for registration and baked into the share URL. Repeat the flag for multiple relays (the sharer registers with all; the client tries them IPv6-first then in order). A hostname with both A and AAAA records counts as two relays
--direct <DIRECT> (repeatable)
Advertise a relay-less DIRECT endpoint (host:port) clients can dial straight to this sharer: no relay, no relay bandwidth. The sharer binds this port, so it must be publicly reachable. Repeat for several advertised addresses (they must share one port). Combine with –relay for a mix, or use alone for pure relay-less sharing. A new share without relay flags is relay-less already, at the address STUN finds; this names the address and port instead
--spora-relays (default false)
Put the share on Spora’s relays, ahead of any given with the other relay flags. This machine gets them from Spora’s API (registering it there) along with the token they want
--tcp-relay <TCP_RELAY> (repeatable)
Advertise a TCP/TLS relay endpoint (host:port): a TCP relay carrying end-to-end TLS, for networks that block UDP/QUIC. The sharer connects out and parks connections at it. Repeat for several; combine with –relay to offer both (the client tries them in preference order)
--nz-relay <NZ_RELAY> (repeatable)
Advertise a Noise UDP (nz) relay endpoint (host:port): the dumb UDP relay carrying an end-to-end Noise datagram session, a high-entropy, non-QUIC-shaped transport for networks that fingerprint or throttle QUIC. Point it at a relay on a non-443 UDP port. Repeat for several; combine with –relay to offer both (the client tries them in order)
--stun <STUN> (repeatable)
Override the ordered STUN servers (host:port) used for direct-upgrade endpoint discovery. Repeat for fallbacks
--no-direct-upgrade (default false)
Keep the session on its initial relay/carrier path instead of attempting a direct upgrade
--relay-token <RELAY_TOKEN>
Token for the relays given with –relay, –tcp-relay and –nz-relay, when they want one (a self-hosted relay run with –token or –token-file). The token itself or a path to a file containing it; surrounding whitespace is trimmed. Kept in the share, never in its URL
--no-conn-log (default false)
Disable the connection log. By default the sharer keeps a local per-flow record (who connected to which destination, when) at $XDG_STATE_HOME/spora/connlog/<routing-key>/ (in root’s home for a run with sudo), the sharer’s own egress accountability record for answering abuse reports
--dns-upstream <DNS_UPSTREAM> (repeatable)
Answer clients’ DNS queries from these servers (ip or ip:port, repeatable, in preference order) instead of this host’s own resolvers. Used exclusively: no public fallback
--no-dns-forwarder (default false)
Don’t answer clients’ DNS queries at all: queries to the tunnel’s resolver address (100.64.0.53) are dropped like any other private destination, so clients must bring public resolvers of their own
--conn-log-dir <CONN_LOG_DIR>
Override the connection-log directory
--conn-log-retention-days <CONN_LOG_RETENTION_DAYS> (default 90)
Connection-log retention in days; older records are deleted (unless pinned by spora log hold)
--conn-log-sessions-only (default false)
Log sessions only (who was connected and when), without per-flow destination records
--no-record (default false)
Don’t keep a diagnostic record of how each connection went
--record-dir <RECORD_DIR>
Override the diagnostic-record directory (default: $XDG_STATE_HOME/spora/records/, in root’s home for a run with sudo). Uploads only take the default directory; spora report --record-dir bundles another
--record-label <RECORD_LABEL>
Label this machine in every record it writes
--record-id <RECORD_ID>
Tie the records from this run to something outside it: a ticket, a test run
--no-diag-log (default false)
Don’t write the diagnostic log to disk. By default it is also kept at $XDG_STATE_HOME/spora/log/ (in root’s home for a run with sudo; at most 16 MiB and 14 days, with any crash reports), so spora report can bundle it
--json (default false)
Emit newline-delimited JSON lifecycle events on stdout
spora use
Connect through a share URL. By default this is a full VPN client: it brings up the tunnel interface, routes traffic through it, sets the resolver, follows the path’s MTU, and restores everything on exit. Needs root (Administrator on Windows), except with –tun-name
spora use [OPTIONS] <URL>
<URL> (required)
The share URL (https://spora.to/s/…) received from the sharer
--stun <STUN> (repeatable)
Override the ordered STUN servers (host:port) used for direct-upgrade endpoint discovery. Repeat for fallbacks
--no-direct-upgrade (default false)
Keep the session on its initial relay/carrier path instead of attempting a direct upgrade
--tun-name <TUN_NAME>
Attach to this pre-created TUN instead of bringing up the tunnel interface yourself. The caller owns its address, MTU, routes and cleanup; nothing else on the host is touched (Linux only)
--tun-addr <TUN_ADDR> (default 10.11.0.2/24)
Address of the tunnel interface, in CIDR form. Must be private (RFC1918/CGNAT): sharers refuse other client sources
--tun-addr6 <TUN_ADDR6> (default fd00:5350::2/64)
IPv6 address of the tunnel interface, in CIDR form (must be a ULA, fc00::/7)
--no-ipv6 (default false)
Carry no IPv6 in the tunnel: no v6 address, no v6 routes. On a v6-capable host, v6 traffic then bypasses the tunnel
--route <ROUTE> (repeatable)
Route only this prefix into the tunnel (repeatable) instead of everything. The host’s more specific routes (its LANs) still win
--no-routes (default false)
Bring the interface up with its address and MTU but install no routes and leave the resolver alone: you route into it yourself
--dns <DNS> (repeatable)
Resolver to use while connected (repeatable). The default, 100.64.0.53, is the sharer’s DNS forwarder, which answers from the sharer’s own resolvers. Anything else is reached through the tunnel, so it must be public
--no-dns (default false)
Leave the host’s resolver configuration alone
--mtu <MTU>
Pin the interface MTU (576..=1500) instead of following the path’s discovered budget
--no-record (default false)
Don’t keep a diagnostic record of how the connection went
--record-dir <RECORD_DIR>
Override the diagnostic-record directory (default: $XDG_STATE_HOME/spora/records/, in root’s home for a run with sudo). Uploads only take the default directory; spora report --record-dir bundles another
--record-label <RECORD_LABEL>
Label this machine in every record it writes
--record-id <RECORD_ID>
Tie this run’s record to something outside it: a ticket, a test run
--no-diag-log (default false)
Don’t write the diagnostic log to disk. By default it is also kept at $XDG_STATE_HOME/spora/log/ (in root’s home for a run with sudo; at most 16 MiB and 14 days, with any crash reports), so spora report can bundle it
--json (default false)
Emit newline-delimited JSON lifecycle events on stdout
spora build-info
Print the source/build identity embedded in this executable
spora build-info [OPTIONS]
--json (default false)
Emit the complete build identity as JSON
spora log
Inspect the share’s connection log: which client reached which destination, and when. It stays on this machine
spora log <COMMAND>
spora log query
Query flows: “who connected to destination IP X during [from, to]”. Prints matching flows, the sessions they belong to (with everything known about the client’s outer address), and any log gaps or clock jumps overlapping the window
spora log query [OPTIONS]
--ip <IP>
Destination IP to match
--port <PORT>
Destination port to match
--from <FROM>
Window start: RFC3339 (2026-06-12T10:00:00Z), a date (2026-06-12), or unix seconds/milliseconds
--to <TO>
Window end (same formats as –from)
--json (default false)
Machine-readable JSON output (for export/handover)
--dir <DIR>
Log directory (default: derived from the share file; overrides –share-file when both are given)
--share-file <SHARE_FILE>
Share file used to locate the default log directory
spora log sessions
List sessions with their address records
spora log sessions [OPTIONS]
--dir <DIR>
--share-file <SHARE_FILE>
spora log hold
Manage legal holds: time ranges pinned against retention expiry (e.g. after receiving a preservation request)
spora log hold <COMMAND>
spora log hold add
Pin [from, to] against the retention sweep
spora log hold add [OPTIONS] --from <FROM> --to <TO>
--from <FROM> (required)
--to <TO> (required)
--note <NOTE>
Why this hold exists (e.g. the case/reference number)
--dir <DIR>
Log directory; overrides –share-file when both are given
--share-file <SHARE_FILE>
Share file used to locate the default log directory
spora log hold list
List active holds
spora log hold list [OPTIONS]
--dir <DIR>
--share-file <SHARE_FILE>
spora log hold remove
Remove a hold by id (records it pinned become subject to retention again on the next sweep)
spora log hold remove [OPTIONS] <ID>
<ID> (required)
--dir <DIR>
--share-file <SHARE_FILE>
spora log hold help
Print this message or the help of the given subcommand(s)
spora log hold help [COMMAND]
spora log hold help add
Pin [from, to] against the retention sweep
spora log hold help add
spora log hold help list
List active holds
spora log hold help list
spora log hold help remove
Remove a hold by id (records it pinned become subject to retention again on the next sweep)
spora log hold help remove
spora log hold help help
Print this message or the help of the given subcommand(s)
spora log hold help help
spora log help
Print this message or the help of the given subcommand(s)
spora log help [COMMAND]
spora log help query
Query flows: “who connected to destination IP X during [from, to]”. Prints matching flows, the sessions they belong to (with everything known about the client’s outer address), and any log gaps or clock jumps overlapping the window
spora log help query
spora log help sessions
List sessions with their address records
spora log help sessions
spora log help hold
Manage legal holds: time ranges pinned against retention expiry (e.g. after receiving a preservation request)
spora log help hold [COMMAND]
spora log help hold add
Pin [from, to] against the retention sweep
spora log help hold add
spora log help hold list
List active holds
spora log help hold list
spora log help hold remove
Remove a hold by id (records it pinned become subject to retention again on the next sweep)
spora log help hold remove
spora log help help
Print this message or the help of the given subcommand(s)
spora log help help
spora record
Read the diagnostic records of past connections: what was attempted, what failed, and why
spora record <COMMAND>
spora record list
One line per record: when, which end, how it ended, and the first thing that failed
spora record list [OPTIONS]
--dir <DIR>
Record directory (default: $XDG_STATE_HOME/spora/records/, in root’s home for a run with sudo)
--count <COUNT> (default 20)
How many records to list, newest first
--json (default false)
Machine-readable JSON output
spora record show
The full story of one record: every step, in order, with its verdict
spora record show [OPTIONS] [ID]
<ID>
Record id (or its first characters). Defaults to the newest
--dir <DIR>
--json (default false)
Machine-readable JSON output: the whole record, folded
--samples (default false)
Include the quality samples taken while the tunnel was up
spora record export
Write records out as JSON, for handing to someone else
spora record export [OPTIONS]
--dir <DIR>
--count <COUNT> (default 20)
How many records to export, newest first
--out <OUT>
Write to this file instead of standard output
spora record help
Print this message or the help of the given subcommand(s)
spora record help [COMMAND]
spora record help list
One line per record: when, which end, how it ended, and the first thing that failed
spora record help list
spora record help show
The full story of one record: every step, in order, with its verdict
spora record help show
spora record help export
Write records out as JSON, for handing to someone else
spora record help export
spora record help help
Print this message or the help of the given subcommand(s)
spora record help help
spora report
Bundle the recent diagnostic records, diagnostic log and crash reports of this machine into one zip file to send with a bug report. Works offline and whether or not telemetry is on; manifest.json inside lists everything included and everything left out. The files of runs made with sudo (such as sudo spora use) belong to root: bundle those with sudo spora report
spora report [OPTIONS]
--out <OUT>
Where to write the zip (default: spora-report-<time>.zip in the current directory)
--note <NOTE>
A few words for whoever reads the report: what you were doing, what went wrong
--hours <HOURS> (default 72)
How far back to look, in hours
--record-dir <RECORD_DIR> (repeatable)
Also bundle the records in this directory: one a run’s –record-dir pointed at. The default directory is always included
spora telemetry
Telemetry: whether this machine sends its diagnostic records, diagnostic log and crash reports to Spora. They show where and how networks block Spora, and help fix problems. They include network addresses: the public address your network shows, the addresses of the peers, relays and other servers this machine connects with, and the address each upload comes from. Off unless you turn it on. Either way everything is still kept on this machine, for spora report. For runs made with sudo (such as sudo spora use), use sudo spora telemetry
spora telemetry <COMMAND>
spora telemetry status
Whether uploads are on, whether your account requires them, this machine’s device id, and how the last upload went
spora telemetry status [OPTIONS]
--json (default false)
Machine-readable JSON output
spora telemetry on
Turn uploads on. spora share and spora use send what is pending in the background (running ones within 15 minutes) and once more as they stop
spora telemetry on
spora telemetry off
Turn uploads off: nothing more is uploaded. A machine registered earlier still asks the API once a day whether its account requires telemetry. Refused while your account requires telemetry
spora telemetry off
spora telemetry upload
With uploads on, send everything not sent yet, now, and say what went. Registers this machine with the API first if it has not been. Without –api or $SPORA_API that is Spora’s built-in API, and its registration keeps working at whatever addresses later versions give that API. –api and $SPORA_API name another API, even at the built-in address: this machine registers anew there, the token it gets goes only to the addresses that issued it, and the other registration is kept for when its API is used again
spora telemetry upload [OPTIONS]
--api <API> (repeatable)
API base URL (repeat for fallbacks, tried in order). Overrides $SPORA_API (a comma-separated list) and the built-in API
spora telemetry help
Print this message or the help of the given subcommand(s)
spora telemetry help [COMMAND]
spora telemetry help status
Whether uploads are on, whether your account requires them, this machine’s device id, and how the last upload went
spora telemetry help status
spora telemetry help on
Turn uploads on. spora share and spora use send what is pending in the background (running ones within 15 minutes) and once more as they stop
spora telemetry help on
spora telemetry help off
Turn uploads off: nothing more is uploaded. A machine registered earlier still asks the API once a day whether its account requires telemetry. Refused while your account requires telemetry
spora telemetry help off
spora telemetry help upload
With uploads on, send everything not sent yet, now, and say what went. Registers this machine with the API first if it has not been. Without –api or $SPORA_API that is Spora’s built-in API, and its registration keeps working at whatever addresses later versions give that API. –api and $SPORA_API name another API, even at the built-in address: this machine registers anew there, the token it gets goes only to the addresses that issued it, and the other registration is kept for when its API is used again
spora telemetry help upload
spora telemetry help help
Print this message or the help of the given subcommand(s)
spora telemetry help help
spora help
Print this message or the help of the given subcommand(s)
spora help [COMMAND]
spora help share
Share over a tunnel. Serves the share kept at $XDG_CONFIG_HOME/spora/share.bin (made on the first run), so the share URL stays the same across invocations. The relays are part of the share (and of its URL): relay flags that differ from the stored share’s make a new share, with a new URL. Without relay flags a new share is relay-less: clients connect straight to this machine, on a random UDP port, at the public address STUN services see it use
spora help share
spora help use
Connect through a share URL. By default this is a full VPN client: it brings up the tunnel interface, routes traffic through it, sets the resolver, follows the path’s MTU, and restores everything on exit. Needs root (Administrator on Windows), except with –tun-name
spora help use
spora help build-info
Print the source/build identity embedded in this executable
spora help build-info
spora help log
Inspect the share’s connection log: which client reached which destination, and when. It stays on this machine
spora help log [COMMAND]
spora help log query
Query flows: “who connected to destination IP X during [from, to]”. Prints matching flows, the sessions they belong to (with everything known about the client’s outer address), and any log gaps or clock jumps overlapping the window
spora help log query
spora help log sessions
List sessions with their address records
spora help log sessions
spora help log hold
Manage legal holds: time ranges pinned against retention expiry (e.g. after receiving a preservation request)
spora help log hold [COMMAND]
spora help log hold add
Pin [from, to] against the retention sweep
spora help log hold add
spora help log hold list
List active holds
spora help log hold list
spora help log hold remove
Remove a hold by id (records it pinned become subject to retention again on the next sweep)
spora help log hold remove
spora help record
Read the diagnostic records of past connections: what was attempted, what failed, and why
spora help record [COMMAND]
spora help record list
One line per record: when, which end, how it ended, and the first thing that failed
spora help record list
spora help record show
The full story of one record: every step, in order, with its verdict
spora help record show
spora help record export
Write records out as JSON, for handing to someone else
spora help record export
spora help report
Bundle the recent diagnostic records, diagnostic log and crash reports of this machine into one zip file to send with a bug report. Works offline and whether or not telemetry is on; manifest.json inside lists everything included and everything left out. The files of runs made with sudo (such as sudo spora use) belong to root: bundle those with sudo spora report
spora help report
spora help telemetry
Telemetry: whether this machine sends its diagnostic records, diagnostic log and crash reports to Spora. They show where and how networks block Spora, and help fix problems. They include network addresses: the public address your network shows, the addresses of the peers, relays and other servers this machine connects with, and the address each upload comes from. Off unless you turn it on. Either way everything is still kept on this machine, for spora report. For runs made with sudo (such as sudo spora use), use sudo spora telemetry
spora help telemetry [COMMAND]
spora help telemetry status
Whether uploads are on, whether your account requires them, this machine’s device id, and how the last upload went
spora help telemetry status
spora help telemetry on
Turn uploads on. spora share and spora use send what is pending in the background (running ones within 15 minutes) and once more as they stop
spora help telemetry on
spora help telemetry off
Turn uploads off: nothing more is uploaded. A machine registered earlier still asks the API once a day whether its account requires telemetry. Refused while your account requires telemetry
spora help telemetry off
spora help telemetry upload
With uploads on, send everything not sent yet, now, and say what went. Registers this machine with the API first if it has not been. Without –api or $SPORA_API that is Spora’s built-in API, and its registration keeps working at whatever addresses later versions give that API. –api and $SPORA_API name another API, even at the built-in address: this machine registers anew there, the token it gets goes only to the addresses that issued it, and the other registration is kept for when its API is used again
spora help telemetry upload
spora help help
Print this message or the help of the given subcommand(s)
spora help help
JSON events
With --json, share and use print one JSON object per line on stdout.
Every object has an "event" name and a "v": 1 schema version. The
vocabulary is additive: new events and new fields may appear, so match on
names and ignore unknown members. Log text goes to stderr and never mixes
into the stream.
Lifecycle
| event | emitted by | meaning |
|---|---|---|
share_ready | share | The share is up and registered. Fields: url, routing_hash, cert_hash, share_file, tun_name (with --os-routing, else null), record_dir, upgrade_enabled. |
tunnel_ready | use | The tunnel interface is up and pumping. Fields: mode ("vpn" or "attached"), tun_name, record_dir, upgrade_enabled; in vpn mode also tun_addr, tun_addr6 (null with --no-ipv6), mtu, mtu_policy ("auto" or "fixed"), routes, dns, dns_method (null when the resolver was left alone). |
stopping | both | Shutdown has begun (Ctrl+C, SIGTERM, SIGHUP, or console close). From use it can also come before any tunnel_ready: a signal stops a dial that is still under way. |
session_ended | share | The client session ended. Field: reason. |
Paths and transports
| event | emitted by | meaning |
|---|---|---|
relay_session_established | both | The relay-path session is up. Field: peer. |
path_activated | both | A transport can now carry tunnel traffic. Fields: carrier (quic, tcp_tls, nz), path (relay, direct_advertised, direct_punched), local, peer. Fires for the initial path and again after an acknowledged switch to a punched path, so automation never infers the active transport from log prose. |
direct_upgrade_succeeded | both | A direct path replaced the relay path. Fields: local, peer. |
direct_upgrade_failed | both | One direct-path attempt failed; the session stays on its current path and retries: after 15 s, then twice as long after each further failure, up to 5 minutes. A reconnect starts again at 15 s. Fields: code (a stable reason code), reason (human text). |
reconnecting | use | The transport died; the client is redialing. |
reconnected | use | The redial succeeded. |
MTU
| event | emitted by | meaning |
|---|---|---|
path_mtu | use | The path’s measured packet budget, reported after path discovery settles and again after a direct upgrade. Field: mtu. |
tun_mtu | use | The tunnel interface MTU was changed to match (VPN mode with the default --mtu policy). Field: mtu. |
Housekeeping
| event | emitted by | meaning |
|---|---|---|
conn_log_degraded | share | The connection log hit trouble (disk, overload) and marked a gap. Field: detail. |
The share URL
https://spora.to/s/<token>?r=<host>:<port>[&r=<host>:<port>…]
The URL is self-contained: everything a client needs is inside it, and possession of it is the only credential. Treat it accordingly.
<token>is 60 characters of base64url: a version byte, the sharer’s 20-byte cert hash (the hash of the certificate its device presents, which the client checks), the share’s 8-byte share id, and a 16-byte secret (proves to the sharer that the client was given the URL). The cert hash and share id make the share’s routing hash, the connection id clients dial relays with. Replace the share withspora share --fresh.- Each
?r=names a relay endpoint, in the order clients should try them. IPv6 literals are bracketed:?r=[2001:db8::1]:443. Endpoints advertised with--direct,--tcp-relay, or--nz-relayare encoded here too, marked with their protocol. - The
https://spora.to/s/prefix makes the link clickable and lets the apps claim it. The CLI never contacts the website; if the link is opened in a browser without the app installed, the site shows an install page and does not log the token path.
Clients resolve relay hostnames at every connection attempt, prefer IPv6 addresses, and fall back through the list until one works, so a multi-relay URL keeps working when a relay dies.
Files and directories
The CLI follows the XDG conventions on Linux and macOS and the profile
directories on Windows. Overriding environment variables (XDG_CONFIG_HOME,
XDG_STATE_HOME) are honored. The ~/.local/state/spora/ paths below are
root’s own for a run made with sudo (see the notes).
| what | Linux and macOS | Windows |
|---|---|---|
| Share (the secret behind the share URL, and its relays) | ~/.config/spora/share.bin | %APPDATA%\spora\share.bin |
| Connection log (per share) | ~/.local/state/spora/connlog/<routing-hash>/ | %LOCALAPPDATA%\spora\connlog\<routing-hash>\ |
| Diagnostic records | ~/.local/state/spora/records/ | %LOCALAPPDATA%\spora\records\ |
| Diagnostic log and crash reports | ~/.local/state/spora/log/ | %LOCALAPPDATA%\spora\log\ |
| Device identity, relay access and telemetry state | ~/.local/state/spora/service/ | %LOCALAPPDATA%\spora\service\ |
Notes:
- The share file is the secret behind a stable share URL: mode
0600, written atomically. It works only with the device identity it was made under, kept inservice/service.json(this machine’s key pair): with another, the CLI makes a new share. Copy both to move a share; use--fresh(or delete the share file) to revoke the URL.--share-fileselects another path. A run with sudo uses root’s state directory, and so root’s device identity: a share made by one is remade (a new URL) by the other. - The connection log is SQLite; read it with
spora log, not by hand, and note that deleting the share does not delete the log. It is your record of what your connection was used for, and it outlives the URL on purpose. Its records still expire: everyspora sharealso sweeps the logs of earlier shares inconnlog/by the retention each was kept with (a log moved elsewhere with--conn-log-diris swept only while its own share runs). - Records are plain JSON Lines, one file per run;
--record-dirmoves them and--no-recorddisables them. - The diagnostic log holds what
shareanduselog, as JSON Lines, at fixed levels that are more detailed than the terminal’s default (but not their printed banner, nor the per-flow lines, one for each connection a client makes: the connection log is the only per-flow record). A new file per run and per MiB, at most 16 MiB and 14 days in all. Crash reports sit beside it.--no-diag-logkeeps a run from writing either.spora reportbundles the log, the records and the crash reports of the last few days into one zip file for a bug report. service/service.jsonholds the telemetry switch (spora telemetry) and, once uploads have been on, this machine’s device registration with each API it has uploaded to (see Another API), access tokens included (mode0600). Delete it to forget the registrations: uploads are then off untilspora telemetry on, which registers a new device. Uploads only ever send the default records and log directories above, never a--record-direlsewhere (spora report --record-dirbundles one), and never the connection log.- Runs made with sudo (
sudo spora use,sudo spora share --os-routing) are root’s: their records, log, telemetry state and connection log live in root’s home,/root/.local/state/spora/on Linux and/var/root/.local/state/spora/on macOS. That holds where sudo keeps yourHOMEas well (macOS’s sudo does, and so doessudo -E): a run with sudo never writes its state into your home, unless it is handed anXDG_STATE_HOME, which is honored.sudo spora record,sudo spora report,sudo spora telemetryandsudo spora logreach those files; the same commands without sudo do not. The identity file is not part of this: a run finds it throughXDG_CONFIG_HOMEorHOME, as sudo leaves them. On Windows an elevated console keeps your own directories. - Earlier versions of the CLI kept the records and connection log of runs
made with sudo in your own
~/.local/state/spora/wherever sudo kept yourHOME(on macOS, withsudo -E, and on Ubuntu before 19.10). Those files stay there, owned by root. Name the directory to read them:sudo spora record list --dir ~/.local/state/spora/records,sudo spora report --record-dir ~/.local/state/spora/records,sudo spora log sessions --dir ~/.local/state/spora/connlog/<routing-key>. Or give the directory back to your account withsudo chown -R "$USER" ~/.local/state/spora, which is also what a command run without sudo suggests when it cannot read its state there. It suggests that for your own state directory only: a directory elsewhere that it cannot read (root’s home, a service’s directory) is not yours to take over, and the same command with sudo reads it. spora usein VPN mode also keeps small runtime files (an instance lock, resolver backups) under/run/spora/on Linux and/var/db/spora/on macOS; they are cleaned up automatically.- On Windows,
spora useexpectswintun.dllnext tospora.exe.