Running the Alert System
The following instructions describe running the Bitcoin SV Alert System using tools available in most mainstream Linux distributions. The assumption has been made that you are using a Bourne-like shell such as bash
.
Infrastructure Considerations
Hosting an Alert System that uses a P2P IPFS layer on some infrastructure providers like Hetzner could lead to problems due to their abuse detection mechanisms. The IPFS layer involves port scanning to find peers, which Hetzner might mistake for malicious activity. This can trigger Hetzner's automated systems to block or restrict your account.
Since continuous operation is crucial for an Alert System, Hetzner's sensitivity to port scanning makes it an unsuitable hosting choice for such an application. Please note that the Alert System only requires RPC access to a node and as such can run on different infrastructure than your node. Make sure to configure the proper security rules to restrict access to the RPC interface, for example using Hetzner's firewall rules.
Running the Alert System
In order to run the Alert System for each given network, there are some environment variables that should be set.
Server Configuration
Environment Variable | Description | Example Values |
---|---|---|
| The environment to start the Alert System with. Set this to the network type you'd like to run on. |
|
| Path to a valid |
|
| If this is set to true, then the Alert System will not attempt to verify the provided RPC credentials on startup. This is useful if |
|
| Webhook URL for the Alert System to send human readable alert messages to. See later in the doc for details. |
|
| Port for libp2p to serve on. (Defaults to |
|
| Port for the local apiserver to serve on. (Defaults to |
|
| Rather than logging to stdout, configure the server to log directly to a file on disk. |
|
| Path to where the SQLite3 database for the alert-system should be saved. (Defaults to |
|
With the proper environment variables set, the alert-system
binary can be run directly without any arguments.
Systemd
To start the install of the Alert System, make sure you use an account that can use su
or sudo
to install software into directories owned by the root user.
Download the zipped release of your choosing from the Github release page, for this example we are using 0.1.1 which is the latest release at the time of writing:
Locate the file you downloaded and extract it using the unzip
command:
Create a symbolic link from a new directory called alert-system
to the alert-system-0.1.1 directory you just made by unzipping for easier use and updates:
To run the alert system, pass in the location of the bitcoind configuration file so that it can connect over RPC:
Create the alert-system.service
file:
Then start:
Follow the logs using journalctl
Multiple nodes and remote Alert Systems
If you are hosting the Alert System on the same host as the bitcoind
, make sure only 1 instance of the Alert System is running on that host.
You can host multiple Alert Systems on a single instance or Kubernetes cluster, but then you will need to make sure they all run on a unique port and take care of any firewall considerations. For these setups it's easier to use a config.json
to define the port and RPC credentials for the nodes. An example config can be found in the alert-system repo at app/config/envs/mainnet.json.
Docker images for the Alert System can be found on Docker Hub.
Last updated