Use the Daemon as a Local Service
Keep the local daemon running with a service manager so your applications can use it without an open terminal. Autonomi's daemon, antd, is a background service that manages the connection to the Autonomi Network.
Use this setup if you want:
A persistent local REST and gRPC endpoint
One daemon shared by more than one app or tool
Service-manager supervision instead of manually starting
antdin a terminal
Prerequisites
antd v0.14.0built on the target machine using the source-build instructions in Start the Local DaemonA Linux host with
systemdfor the service example belowAn optional wallet key if
antdwill handle paid uploads directly
Steps
1. Create a service account and install the binary
Run antd as an unprivileged system user and keep its writable files under /var/lib/antd:
sudo useradd --system --create-home --home-dir /var/lib/antd \
--shell /usr/sbin/nologin antd
sudo install -o root -g root -m 0755 \
/absolute/path/to/ant-sdk/antd/target/release/antd \
/usr/local/bin/antd2. Create an environment file
Keep the wallet key outside the unit file.
Create a root-owned file that only the antd group can read:
For a daemon that performs paid writes directly, add:
Leave the file empty for read-only use or external-signer uploads. On the default network, antd v0.14.0 selects the Arbitrum One preset and canonical payment contracts. Do not add individual EVM_RPC_URL, EVM_PAYMENT_TOKEN_ADDRESS, or EVM_PAYMENT_VAULT_ADDRESS overrides; those activate custom payment handling that default-network storage nodes reject.
3. Create a systemd unit
Create /etc/systemd/system/antd.service:
This binds antd to localhost instead of exposing it on every interface. antd has no built-in authentication, so do not expose its REST or gRPC ports directly to another machine without a firewall or authenticated proxy.
The service user can access only files permitted by normal Linux ownership and mode rules. Grant that user access to any host paths you pass to file upload or download endpoints.
4. Start and enable the service
5. Check health and logs
If you need more detail in the logs, change --log-level info to debug or trace and restart the service.
6. Use fixed or dynamic ports
For a stable local service, keep explicit addresses as shown above. If another supervisor needs OS-assigned ports, antd also supports:
In this systemd setup, the port file is written under the service account's data directory at /var/lib/antd/.local/share/ant/sdk/daemon.port. Applications running as another user do not discover that file automatically. Prefer fixed loopback ports for a shared service, or configure each application with the selected endpoint explicitly.
Verify it worked
/health returning status: "ok" confirms that antd responds, not that uploads will succeed or the wallet has funds. Confirm that your application can connect to the configured REST or gRPC endpoint. See the health reference for connectivity diagnostics.
Common errors
Port already in use: Change --rest-addr, --grpc-addr, --rest-port, or --grpc-port.
503 on direct write endpoints: antd is running without AUTONOMI_WALLET_KEY. Add the key for antd-signed writes, or use the external-signer prepare and finalize flow.
Startup loop in systemd: Inspect journalctl -u antd -f for invalid addresses, missing binaries, or bad environment variables.
Next steps
Last updated