You can install the kernel by using:
This section walks you through installing the kernel from a package. You can either generate your own package by building the kernel from source, or you can download a pre-built package from GitHub.
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.
- Ubuntu 16.04 or later
- Open JDK 11
- Apache Ant 1.10
- CPU with
~100GB HDD/SSD spacefor Mainnet
~20GB HDD/SSD spacefor Amity testnet
- 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 the latest Aion Java kernel package to your computer if you haven't already. You can also use
wgetif you'd prefer:
- Unzip the package:
tar xvf oan-v1.0.674e4b5-2019-11-05.tar.bz2
- Navigate into the Aion kernel folder in the terminal from where you unzip the build:
- Launch the Java kernel with a specific network:
b. Amity Testnet
./aion.sh -n amity
The kernel will now begin to sync with the other nodes on the network. This process can take up to 7 hours for mainnet depending on the speed of your network and the size of the database you are syncing. Everything is complete once that's finished.
You have successfully installed the Aion Java kernel on your system.
This section covers how to configure and run the Aion Java kernel Docker container.
Follow these steps to get started quickly, or skip this section if you want to learn how to run the container in more detail.
# Pull the Java kernel image. docker pull aionnetwork/aion:latest # Create some local storage for the container: docker volume create aion-mainnet # Run the container: docker run -it -p 8545:8545 -p 8547:8547 -p 30303:30303 --mount source=aion-mainnet,destination=/aion/mainnet aionnetwork/aion:latest
To use this Docker image your system must meet the following requirements:
- 2 CPU cores
- 1GB HDD space
The HDD space required only takes the Docker image into account. You will need a significant amount of space for storing the blockchain itself. The database is currently around
22GB in size, although this can be pruned.
- Pull down the latest Java Docker image.
docker pull aionnetwork/aion:latest > latest: Pulling from aionnetwork/aion > 6cf436f81810: Pull complete > ... > Status: Downloaded newer image for aionnetwork/aion:latest
- Create local storage for Aion image.
docker volume create aion-mainnet > aion-mainnet
- Run the image.
docker run -it -p 8545:8545 -p 8547:8547 -p 30303:30303 --mount source=aion-mainnet,destination=/aion/mainnet aionnetwork/aion:latest
Take a look at the Running the Java Container section for more information on what arguments to supply with the
docker run command.
cto shut down and exit the container.
19-03-04 10:59:01.821 INFO GEN [shutdown]: Starting shutdown process... ... 19-03-04 10:59:05.887 INFO GEN [shutdown]: --------------------------------------------- 19-03-04 10:59:05.888 INFO GEN [shutdown]: | Aion kernel graceful shutdown successful! | 19-03-04 10:59:05.888 INFO GEN [shutdown]: ---------------------------------------------
There are several arguments that you can supply with the
docker run command.
Once the kernel Docker image is pulled you can configure it by running the
docker exec command in a separate terminal window:
docker exec -it <CONTAINER_NAME or CONTAINER_HASH> /bin/bash
A list of
CONTAINER_NAMEs can be found by running
docker container list
This starts a standard terminal session within the container. You will need to install a text editor before you can edit any files, as the container doesn't come with one pre-installed:
sudo apt install nano OR sudo apt install vim
Then you can edit the
config.xml file associated with the network you are running. For example, if you are running the Java kernel on Mainnet, then you should edit the
mainnet/config.xml file. If you are running the Java kernel on the Testnet (amity), then you should edit the
By default, running the image will start a node on the mainnet. To specify a network; for instance, the amity testnet, use:
docker run -it aionnetwork/aion:latest /aion/aion.sh -n amity
The Aion Docker image is configured to run the Java API and RPC servers, as well as allow connections from other Aion nodes. When running the Docker container, it is necessary to publish those ports if you use to wish these functionalities.
In most cases, storage should be attached so that configuration and blockchain sync state can be persisted between each time the kernel is launched. You will need a separate Docker volume for each Aion Network, so it is recommended to include the network name in the volume name. To create a volume:
docker volume create VOLUME-NAME
To start the Docker image with the volume, where VOLUME-NAME is the volume name and NETWORK is the Aion network name:
docker run -it --mount source=VOLUME-NAME,destination=/aion/NETWORK aionnetwork/aion:latest ./aion.sh -n NETWORK
For the list of network names, see:
docker run -it aionnetwork/aion:latest /aion/aion.sh -h
That's it, you're done! See the Kernel wiki pages on GitHub for more on installation and configuration.
Updated about 4 years ago