This Bash script simplifies and fully automates the setup of an ANNODE on Debian or RHEL-based Linux systems. Whether you are a novice, intermediate, or an expert Linux user, this script is for you.
It installs dependencies, configures MariaDB, restores the latest database snapshot, deploys the node software, and sets up a systemd service (for non-GUI environments) or creates a bash script (for GUI environments) you can use to run your ANNODE.
Root Access: Run the script with sudo or as root user.
Supported Distributions: Debian-based or RHEL-based (tested on Debian 11 & 12, Ubuntu 20 & 22, Rocky Linux 8 & 9, AlmaLinux 8 & 9).
ANNE Account: You need a Neuron ID (NID) and Secret (SEED). Generate your keys at https://www.anne.network:9116/aon.html if you don’t have them.
All ANNE accounts must be onboarded to be active. To use ANNE, every account must be onboarded by receipt of a transaction. You can get some annecoins at ADF Swaps or ask someone you know to send you a few annecoins. Doing a swap (for any amount) will automatically register your NID and public key, and deposit coins into your account.
https://www.anne.network:9116/aon.html?page=swaps
Download the Script:
wget https://raw.githubusercontent.com/annemedia/annode-install/main/annode-install.sh
WARNING:
DO NOT RUN THIS SCRIPT IF YOU HAVE EXISTING MARIADB DATABASES YOU CAN'T LOSE. If MariaDB is already installed, it will be reinstalled. Albeit, you’ll be prompted to purge it (losing existing databases) or abort.
NB: This script requires 'sudo -E' to preserve the user environment
sudo -E bash annode-install.sh your-nid your-seed [lite]
- your-nid: Your ANNE Neuron ID (nid) (required)
- your-seed: Your ANNE Secret (seed) (required)
- lite: Optional boolean flag to run annode in lite (spectator) mode (disables mempool).
sudo -E bash annode-install.sh mynid mysecret
sudo -E bash annode-install.sh mynid mysecret 1
Checks Permissions: Ensures root access.
Validates Input: Confirms NID and SEED are provided.
Installs Dependencies: Updates the system, installs Java 17, MariaDB 10.5+, and needed tools - wget, curl, and unzip.
Configures MariaDB: Sets up the annedb database with a root user and anneroot user, both with random passwords; restores the latest snapshot from https://anne.media/mirror/anne-node/annedb-latest.sql.zip
Deploys the Node: Downloads and configures the ANNE node in $HOME/annode, using your NID and SEED.
Sets Up Service: Creates a systemd service (annode.service) for automatic startup in non-desktop environments.
Configures Linux Firewall: Opens TCP port 9115 (or custom if you change the PORT variable at the top of the script) if csf, firewalld, or ufw is installed.
After running the script, you’ll see terminal output with important details:
MariaDB Passwords: The root password and anneroot user password for the annedb database.
Record these immediately - they are not saved elsewhere and are needed for database access.
If you're on LAN or behind a router, make sure the P2P port (9115 or custom) is open/forwarded to your LAN IP in your router firewall.
If you're on a VPN, the P2P port should be forwarded to your TUN interface IP at the VPN server level. Some VPN providers support this. If cannot forward port at the VPN server level, some annode functions will be limited, you will not get inbound connectivity with other peers. Nevertheless your annode will be able to keep up-to-date with blocks and will be able to send outbound transactions.
Headless environment: The annode is enabled to start on boot via systemd service automatically.
sudo systemctl start annode.service
systemctl status annode.service
For GUI mode, edit /usr/bin/annode.sh, remove the --headless flag, and restart:
sudo systemctl restart annode.service
GUI environment: Start manually from terminal
annode.sh
For headless mode, edit /usr/bin/annode.sh and add the --headless flag before running.
Debug Log:
Check $HOME/annode/annode.log with:
nano $HOME/annode/annode.log
or
tail -f $HOME/annode/annode.log
wget https://raw.githubusercontent.com/annemedia/annode-install/main/annode-upgrade.sh
sudo bash annode-upgrade.sh
Use your root password from the install output:
sudo bash annode-upgrade.sh restore 'your-mariadb-root-password'
Unsupported Systems: If your distribution isn’t Debian or RHEL-based, the script exits with manual install instructions.
MariaDB Conflicts: If MariaDB is already installed, you’ll be prompted to purge it (losing existing databases) or abort.
Port Issues: Ensure port 9115 or custom port (if you changed it) is open if using a custom firewall other than csf, uwf or firewalld; the script skips this if no supported firewall is detected. Also if you're on LAN or behind a router, make sure the port is open/forwarded to your LAN IP in your router firewall.
Password Info: The script generates and displays MariaDB passwords at the end.
You must note these down from the terminal output, as they’re not stored anywhere else.
Lite Mode: It is also possible to run the annode in Lite mode (Spectator mode), reducing memory usage by disabling mempool.
See the full annode documentation at https://anne.media/personal-server-setup-anne-installation-guide/
We welcome contributions! You can help by:
- Reporting bugs or suggesting features via GitHub Issues
- Submitting pull requests for bug fixes or improvements
- Improving documentation
For discussions, join our community at ANNE Forum - https://annetalk.org
The install script has a limitation if MariaDB is already installed and there are any existing databases present. On user confirmation, these databases would be lost. A pull request to the following specification will be accepted:
1)
-
If MariaDB is already installed and the version is 10.5+, prompt the user with three options.
- Purge & reinstall MariaDB
- Prompt for their MariaDB root password
- Abort
-
Adjust the related code to facilitate this feature.
2)
Compatibility adjustments for unsupported Linux distributions
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to https://unlicense.org