@@ -8,7 +8,7 @@ A standalone REST API server for [Neutrino](https://github.com/lightninglabs/neu
88- ** Lightweight** : No need to download full blockchain, only block headers and compact filters
99- ** REST API** : Simple HTTP endpoints for blockchain queries, transaction broadcasting, and UTXO scanning
1010- ** Multi-Network** : Support for mainnet, testnet, regtest, and signet
11- - ** Docker Support** : Easy deployment with Docker and docker-compose
11+ - ** Docker Support** : Easy deployment with Docker and docker-compose (linux/amd64, linux/386, linux/arm64, linux/arm/v7, linux/arm/v6)
1212- ** Production Ready** : Includes health checks, graceful shutdown, and comprehensive logging
1313
1414## Quick Start
@@ -47,6 +47,16 @@ docker run -d \
4747 -e LOG_LEVEL=debug \
4848 -e NO_AUTH=true \
4949 ghcr.io/m0wer/neutrino-api:1
50+
51+ # Run for signet (using conventional signet API port 38334)
52+ docker run -d \
53+ -p 38334:38334 \
54+ -v neutrino-signet-data:/data/neutrino \
55+ -e NETWORK=signet \
56+ -e LISTEN_ADDR=0.0.0.0:38334 \
57+ -e LOG_LEVEL=info \
58+ -e ADD_PEERS=bitcoin.sgn.space:38333 \
59+ ghcr.io/m0wer/neutrino-api:1
5060```
5161
5262### Building from Source
@@ -92,7 +102,7 @@ Anyone can reproduce and verify a release locally with one command:
92102| Variable | Default | Description |
93103| ----------| ---------| -------------|
94104| ` NETWORK ` | ` mainnet ` | Bitcoin network (mainnet, testnet, regtest, signet) |
95- | ` LISTEN_ADDR ` | ` 0.0.0.0:8334 ` | REST API listen address |
105+ | ` LISTEN_ADDR ` | ` 0.0.0.0:8334 ` | REST API listen address (for signet, ` 0.0.0.0:38334 ` is a common convention) |
96106| ` DATA_DIR ` | ` /data/neutrino ` | Data directory for headers and filters |
97107| ` LOG_LEVEL ` | ` info ` | Log level (trace, debug, info, warn, error) |
98108| ` ADD_PEERS ` | | Comma-separated list of preferred peers (e.g., ` node1:8333,node2:8333 ` ) while still allowing peer discovery |
@@ -452,6 +462,47 @@ volumes:
452462 neutrino-data :
453463` ` `
454464
465+ ### systemd Service Example (binary install)
466+
467+ If you run the standalone binary directly on a host (including Raspberry Pi),
468+ this unit file starts ` neutrinod` at boot and restarts it on failures:
469+
470+ ` ` ` ini
471+ # /etc/systemd/system/neutrinod.service
472+ [Unit]
473+ Description=Neutrino API daemon
474+ After=network-online.target
475+ Wants=network-online.target
476+
477+ [Service]
478+ Type=simple
479+ User=neutrino
480+ Group=neutrino
481+ Environment=NETWORK=signet
482+ Environment=LISTEN_ADDR=0.0.0.0:38334
483+ Environment=DATA_DIR=/var/lib/neutrinod
484+ Environment=LOG_LEVEL=info
485+ Environment=ADD_PEERS=bitcoin.sgn.space:38333
486+ ExecStart=/usr/local/bin/neutrinod --network=${NETWORK} --listen=${LISTEN_ADDR} --datadir=${DATA_DIR} --loglevel=${LOG_LEVEL} --addpeer=${ADD_PEERS}
487+ Restart=always
488+ RestartSec=5
489+ NoNewPrivileges=true
490+ ProtectSystem=full
491+ ProtectHome=true
492+ ReadWritePaths=/var/lib/neutrinod
493+
494+ [Install]
495+ WantedBy=multi-user.target
496+ ` ` `
497+
498+ ` ` ` bash
499+ sudo useradd --system --home /var/lib/neutrinod --shell /usr/sbin/nologin neutrino
500+ sudo mkdir -p /var/lib/neutrinod
501+ sudo chown -R neutrino:neutrino /var/lib/neutrinod
502+ sudo systemctl daemon-reload
503+ sudo systemctl enable --now neutrinod
504+ ` ` `
505+
455506**Note:** TLS and API token authentication are enabled by default. After first start, find the auth token in the data volume at `auth_token` and the TLS certificate at `tls.cert`. Clients must use HTTPS and include `Authorization: Bearer <token>`.
456507
457508# ## Security Considerations
0 commit comments