Install and upgrade#
NeuralUI is a Synapse service. It runs as its own cell next to a Cortex, connects to it with a service account, and serves the UI over HTTPS. Analysts log in with their Cortex accounts.
Requirements: a Synapse 2.x Cortex, 2.256.0 or later (NeuralUI 1.x is for Synapse 2 only). The service runs on Python 3.11, the version Synapse supports; the container image has it.
Try it on one machine#
The dev stack starts a Cortex and NeuralUI in one process, with demo data:
git clone https://github.com/gormaniac/neuralui && cd neuralui
make setup # pip install -e '.[dev]' into the current Python 3.11
make demo # then open https://localhost:4443/ (a self-signed certificate)
Log in as analyst / analyst, or root / root. It listens on 127.0.0.1 only, because those logins
are known. Its data is in ./dev-data.
Install#
The container image (recommended)#
docker run -d --name neuralui -v neuralui-data:/vertex/storage -p 4443:4443 ghcr.io/gormaniac/neuralui:latest
Images are tagged with each release’s version (ghcr.io/gormaniac/neuralui:0.12.0) and latest. The
service directory is the /vertex/storage volume: its cell.yaml, certs/ and the HTTPS certificate
(sslcert.pem / sslkey.pem) go there. The image runs as an unprivileged user, has a health check and
opens no telepath listener unless cell.yaml asks for one.
With pip#
pip install neuralui # into a Python 3.11 environment
python -m neuralui /path/to/svcdir
Each release’s wheel is also attached to its GitHub release.
Connect it to a Cortex#
For production, follow Deployment: both telepath connections (NeuralUI to the
Cortex, and the Cortex to NeuralUI for service.add) use ssl:// with mutual TLS, and NeuralUI refuses to
start with a plain tcp:// address that leaves the machine. In short:
Make a CA, a server certificate for each side, and client certificates:
neuraluifor NeuralUI andcortexfor the Cortex. Put them in each cell’scerts/directory.Have the Cortex listen with TLS and create the service account. It must be an admin (not
root): the telepath APIs for checking passwords and API keys are admin-only, as for Optic. It logs in with its certificate and needs no password:storm> $user = $lib.auth.users.add(neuralui) $user.setAdmin($lib.true)Write the service directory’s
cell.yaml:cortex: ssl://cortex.internal:27492/?hostname=cortex.internal&certname=neuralui # or an aha:// url dmon:listen: ssl://0.0.0.0:27495/?hostname=neuralui.internal&ca=nuica https:port: 4443 neuralui:origin: https://neuralui.example.com
Every setting can also be an environment variable (
SYN_NEURALUI_CORTEX, …). All of NeuralUI’s own settings are in Settings.Register the service with the Cortex, so its Storm package (saved queries, scrape sessions, the built-in right-click actions) loads. Create a plain user
cortexon NeuralUI for it first:python -m synapse.tools.service.moduser --svcurl cell:///path/to/svcdir --add cortexstorm> service.add neuralui ssl://neuralui.internal:27495/?hostname=neuralui.internal&certname=cortexPut NeuralUI on its own host name behind HTTPS (a reverse proxy is fine: see Deployment for
neuralui:proxy:trusted).
Permissions for analysts#
NeuralUI uses the Cortex’s own permissions: what an analyst may do in NeuralUI is what they may do in the Cortex. For example:
querying and editing:
node, or narrower rules such asnode.add.inet:fqdnandnode.tag.add.rep;saved queries:
node.add.it:exec:query,node.prop.set.it:exec:query,node.del.it:exec:query,node.tag.add.meta.neuralui.queryandnode.add.it:query;notes and scrape sessions:
node.add.meta:note,node.prop.set.meta:note,node.del.meta:note,node.edge.add.about(notes),node.edge.add.refs(scrape sessions), andnode.add.meta:note:type:taxonomythe first time a note type is used;new tag properties from the tag dialog:
model.tagprop.add;files:
axon.uploadandaxon.get;scripts and imports in a fork:
view.addandview.fork;the Admin and Automation pages: the Cortex’s own
auth.*,pkg.*,cron.*,trigger.*,storm.macro.*anddmon.*.
Upgrade#
Container: pull the new image and restart. The service directory carries over, and the service migrates its store on start.
pip:
pip install --upgrade neuralui, then restart the service.The
neuraluiStorm package in the Cortex is updated by the service when it reconnects; nothing to do in the Cortex.Open browsers show a “NeuralUI has been updated” banner and reload with their tabs kept.
Back up the service directory first. Downgrading is not supported once a newer release has migrated the store: an older NeuralUI refuses a store from a newer one.
Each release’s changes, including anything to do when upgrading, are in the changelog. What stays the same across 1.x releases is in Stability.