Make sure you're running Ubuntu 16.04 or higher. Currently we cannot support all Unix, however, it may be possible to run the kernel on other Linux distributions. Sadly the kernel will not work on a Mac. Take a look at the community made Docker image if you want to test things out on other systems.
Use one of the pre-compiled packages to get up and running faster. We have used the latest build as an example on this page. If you want to use a different version of the Aion kernel you will need to change the commands to fit the version you are using. We do not recommend always using the latest Aion kernel version.
- Connect to your machine via SSH or open a terminal if you are working on a local installation.
- Change to your root
~directory and update your system:
cd ~ sudo apt update -y && sudo apt upgrade -y
- Download and validate the latest build from Github:
wget https://github.com/aionnetwork/aion/releases/download/v0.3.2/aion-v0.3.2.2cfa29c-2018-11-28.tar.bz2 https://github.com/aionnetwork/aion/releases/download/v0.3.2/SHA1SUMS sha1sum -c SHA1SUMS
If the terminal outputs
aion-v0.3.2.2cfa29c-2018-11-28.tar.bz2: OK then the package passed the validation.
If it failed, stop here and reboot your machine - you may have been a victim to a man-in-the-middle attack. Consult your administrator to find out the next course of action.
- Unzip the package and move the
aiondirectory to your home
tar xvjf aion-v0.3.2.2cfa29c-2018-11-28.tar.bz2 mv aion ~/
- Move to your
aiondirectory and create an address & keystore:
cd ~/ ~/aion/aion.sh -a create
- Enter a password. You should write this down, you'll need it later.
- The terminal shows an account address. Copy it down somewhere, as you'll need this later.
user@local:~$ ~/.aion/aion.sh -a create Please enter a password: Please re-enter your password: A new account has been created: 0xa09... user@local:~$ _
- The build script creates a keystore file in
aion/keystore. Create a backup of the file:
cp ~/aion/mainnet/keystore/* ~/Documents/aion-keystore
# exit your remote machine exit # copy the aion keystore to your local machine scp user@node_ip_address:~/aion/mainnet/keystore/* ~/Desktop
- Reconnect to your remote machine (if you disconnected) and start syncing your node:
This process can take up to 72 hours depending on the speed of your network.
If you want to compile your own package, follow these steps. You do not have to do this if you have downloaded one of the pre-compiled packages from Github.
- Update your
aptcache and install required dependencies:
sudo apt sudo apt-get install -y git g++ cmake wget llvm-4.0 lsb-release libjsoncpp1 libjsoncpp-dev libboost1.58-all-dev libzmq5 libstdc++6 libgcc1 libpgm-5.2-0
- Clone the Aion repository:
git clone --recursive https://github.com/aionnetwork/aion
- Move into the
- Check that your environment settings are correct:
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 export JAVA_HOME=/usr/lib/jvm/jdk-11.0.1 export ANT_HOME=$HOME/IDE/apache-ant-1.10.3 PATH="$ANT_HOME/bin:$JAVA_HOME/bin:$PATH"
- Link the Java executable to the JDK folder:
ln -s YOUR/JDK/INSTALLATION/PATH /usr/lib/jvm/jdk-11.0.1
- Load in the changes you just made to your
- Build the package:
- Verify the code by running through the test cases:
./gradlew test -x aion_api:test
- Pack everything up:
- Inside the
packfolder you should see a file similar to
ls pack > aion-v0.1.12.2c5119a-2018-02-28.tar.bz2
This is your kernel build.
- To pack everything into a Docker image run
To build the FastVM and the Solidity compiler native library from source code run
ant full_build before running
./gradlew build. This will take quite a while and requires Ubuntu 16.04.