Docs
Run the server
avni-core with Docker, systemd, or from source.
Pick one of the three routes. They all run the same program, avni-core, and all end with it listening on port 7444. Keep that port off the public internet: reach it through Tailscale (next page).
Best for a VPS or any machine with Docker. The container runs as a normal user, with a read-only filesystem and no extra privileges.
Copy the two config files
They are git-ignored, so your secrets stay out of the repository.
bash cd deploy cp avni.example.toml avni.toml cp avni.env.example avni.envFill them in
In
avni.toml, replace the two<verify: ...>model ids with current ones from your provider. Inavni.env, setGROQ_API_KEY. Core refuses to start while a placeholder is left, on purpose.Start it
bash docker compose up -d --build docker compose logs -f avni-coreThe first build compiles the server and takes a few minutes. After that it is cached.
Check it is alive
bash curl -fsS http://127.0.0.1:7444/healthz # prints: ok docker compose ps # should say (healthy)
To publish the port on your Tailscale address only, set AVNI_BIND=100.x.y.z in deploy/.env before step 3. The default is loopback.
Upgrade with git pull && docker compose up -d --build. The ledger, memory and paired devices live in a volume and survive.
For development on your own PC. One script does the setup you would otherwise do by hand.
Create the config
bash cp dev/avni.example.toml dev/avni.tomlPut current model ids in it. Add your key to a git-ignored
.envasGROQ_API_KEY=....Start core
bash just up # or: scripts/dev-core.shThe script loads only the
GROQ_API_KEYline from.env, keeps an access token indev/.token(made on first run), checks the port is free, prints your addresses and a QR code, then starts core.
| Command | What it does |
|---|---|
scripts/dev-core.sh --release | An optimised build, for measuring latency. |
scripts/dev-core.sh --info | Only show the addresses and QR code. |
scripts/dev-core.sh --pair | Print a pairing QR code and exit (see pairing). |
scripts/dev-core.sh --port 7445 | Use another port. If 7444 is busy it offers the next free one. |
scripts/dev-core.sh --new-token | Replace the stored token. |
Best for a small Linux VPS where you would rather not run Docker. You need a Rust toolchain to build the binary once.
Build the binary
bash git clone <your repo> /opt/avni && cd /opt/avni cargo build --release --manifest-path core/Cargo.toml -p avni-coreInstall the service
bash sudo deploy/install.shIt installs the binary, creates a system user called
avni, puts a config and an env file in/etc/avni, and enables the service. It never overwrites a config you already edited, so running it again is safe.Edit the config
bash sudo $EDITOR /etc/avni/avni.toml /etc/avni/avni.envCurrent model ids in
avni.toml, yourGROQ_API_KEYinavni.env.Listen on your Tailscale address (optional) and start
bash sudo systemctl edit avni-core # [Service] # Environment=AVNI_LISTEN=100.x.y.z:7444 sudo systemctl restart avni-core journalctl -u avni-core -f curl -fsS http://127.0.0.1:7444/healthzUse the address core listens on in the
curl(loopback works if you did not change it).