Skip to main content

Getting started on a Linux Server

This tutorial will guide you through the steps needed to install and run ionflow on a Linux machine.

Step 1. Download the Ionflow Server Binary

Manual Download

If you are using the manual download method to install Ionflow, make sure to download the correct binary file for your architecture (e.g. ARM64 or AMD64). You can check your architecture by running the uname -m command in a terminal window.

  1. Go to the GitHub Releases page for the ionflow project.
  2. Look for the ionflow-server release version you wish to run. The releases are usually listed in chronological order, with the latest release at the top.
  3. Once you have found the release you want to download, click on the "Assets" section to expand it.
  4. Look for the binary file called "ionflow-$ARCH". $ARCH should match the architecture you're running on e.g. ARM64 or AMD64
  5. Click on the binary file to start the download. Depending on your browser, you may be prompted to save the file to a specific location on your computer.
  6. Optionally if you want to be able to run the Ionflow binary from any location, you can add the location of the downloaded binary file somewhere to your PATH.

Step 2. Prepare The Environment

To prepare for installation, you will need to create the required directories and a user called "ionflow" that will own them. Here are the steps to do this:

  1. Open a terminal window and switch to the root user by running the following command:
sudo su
  1. Create the directories that will be used by ionflow by running the following commands:
mkdir -p /var/lib/ionflow/ionbay /var/lib/ionflow/ionrow /var/lib/ionflow/kutlass
chmod 755 /var/lib/ionflow/ionbay /var/lib/ionflow/ionrow /var/lib/ionflow/kutlass
  1. Create a user called "ionflow" that will own the directories created in step 2

    Before running the useradd command to create the "ionflow" user, you may want to check if the user already exists. You can do this by running the id ionflow command. If the user already exists, you can skip the useradd step and proceed to step 4.

    Assuming the user doesn't exist run the following:
useradd -d /var/lib/ionflow -s /bin/false ionflow

This will create a user called "ionflow" with the specified home directory and shell.

  1. Change the ownership of the directories created in step 2 to the "ionflow" user by running the following commands:
chown -R ionflow:ionflow /var/lib/ionflow

This will recursively change the ownership of all files and directories under /var/lib/ionflow to the "ionflow" user and group.

Step 3. Setup a Configuration File

Download the sample configuration

You will want to setup a configuration file for running Ionflow with system specific options. There is a sample configuration which can be found here.

Review the options

Review the configuration options in the file and make any necessary changes. For example, you may want to specify the address and port that the Ionflow server will listen on, or you may want to configure the database connection details.

!!! warning Note: The sample configuration file contains default values that may not be appropriate for your system. Please review the configuration file and modify it as needed before starting the Kuberkai/ionflow software.

Place the file

Copy the configuration file to the correct location on your Linux machine. The instructions below specify that the configuration file should be saved at /etc/ionflow/ionflow.yaml.

Step 4. Start ionflow

On your Linux machine, run the following commands to enable and start the ionflow server (assuming the binary is installed at /usr/lib/ionflow):

sudo -u ionflow -c /etc/ionflow/ionflow.yaml /usr/lib/ionflow

!!! tip

Everything in the configuration file can be set via environment variables e.g. 

``` bash
$ export IONFLOW_HTTP_LISTEN_ADDR=:8888
$ ionflow server -c /etc/ionflow/ionflow.yaml
```