Running Nota
Nota is one program and one SQLite file, and you run it yourself.
One program
Section titled “One program”| Command | What it is |
|---|---|
nota init [dir] | set up a new installation |
nota serve | the core; with a probe.json beside it, the probe too |
nota probe [-check|-once] <config.json> | the probe alone — on a second machine, looking from outside |
nota token add|list|revoke | tokens |
nota pair, nota device list|revoke | phones |
Two small servers are enough
Section titled “Two small servers are enough”- On the first,
nota serve: the core and the probe in one process. - On the second,
nota probe: it checks from outside and watches the first. See a second probe.
One machine works too. It then cannot tell you that it is unreachable.
Behind a reverse proxy
Section titled “Behind a reverse proxy”The core listens locally, on 127.0.0.1:8080. In front of it belongs a reverse proxy that terminates TLS. Open / for the dashboard and sign in with a read or operate token.
The session is the token in an HttpOnly, SameSite=Strict cookie, and every request that changes something must come from the same origin.
Tokens and roles
Section titled “Tokens and roles”A token has one of three roles:
| Role | May |
|---|---|
ingest | report |
read | read |
operate | read, and send a Brief |
./nota token add laptop read./nota token list./nota token revoke laptopA token is shown once; only its hash is stored.
Environment
Section titled “Environment”| Variable | Meaning | Default |
|---|---|---|
NOTA_DB | database file | ./nota.db |
NOTA_LISTEN | listen address | 127.0.0.1:8080 |
NOTA_CONF | directory of *.json configuration files | ./conf.d |
NOTA_FORWARD_URL | optional sink: every accepted record, NDJSON over HTTP, best effort | — |
NOTA_FORWARD_TOKEN | bearer token for that sink | — |
NOTA_PUBLIC_URL | the address phones reach this core at; put into pairing links | — |
NOTA_RELAY_URL | push relay for paired phones; off disables push | https://relay.notabrief.com, which is not running yet |
NOTA_PROBE | the probe’s configuration to run inside serve; off for none | ./probe.json if it exists |
Configuration files
Section titled “Configuration files”Every *.json file in NOTA_CONF may hold rules, Brief templates (actions), notification targets, declared things and prices per event; the files are merged. SIGHUP reloads them; a broken configuration keeps the previous one.
kill -HUP $(pidof nota)There is no interface for the configuration. A coding agent writes it for you in a minute; the dashboard shows what is in force. The keys are in the reference.
Data and backup
Section titled “Data and backup”Everything is in one SQLite file (NOTA_DB). Nota stores states and transitions, not time series: of a measurement it keeps the last value and one day of history. Episodes are kept for 400 days.
To back it up, copy the file consistently, for example with SQLite’s own backup command:
sqlite3 nota.db ".backup 'nota-backup.db'"Keep the configuration folder, probe.json and your lists with it. Long-term history of measurements belongs in a sink (NOTA_FORWARD_URL), not in Nota.
Security by design
Section titled “Security by design”Nota reads. It executes nothing, changes no networks and searches no logs. The one thing it sends is a signed call with a text to an address you configured: a notification, or a Brief.
Found something? Security reports.