Manual Setup

Prerequisites

LeonaLog depends on MongoDB and Elasticsearch or OpenSearch to operate.

Downloading and Extracting the Server

Download the tar archive from the download pages and extract it on your system:

tar -xvfz leonalog-VERSION.tgz
cd leona-VERSION

Configuration

Now copy the example configuration file like this:

# Leona Server Configuration
## General
is_leader = true
node_id_file = ./server-node-id
password_secret = IHRzmjWfc0mh7D1Pepv7Od6NRL7jqNb0k9g8fvjwyX4Vq1KIHvQSFOHLf4BO1k3hdKdFWmceKwy46BGqIk2NurWAUYSedspb
root_username = admin
root_password_sha2 = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
rest_listen_uri = http://127.0.0.1:12900/

## Web & REST API
http_bind_address = 127.0.0.1:9000

## Elasticsearch / OpenElasticsearch
elasticsearch_max_docs_per_index = 20000000
elasticsearch_index_prefix = leonalog
elasticsearch_max_number_of_indices = 20
elasticsearch_shards = 1
elasticsearch_replicas = 0
elasticsearch_hosts = http://xxx:9200
elasticsearch_analyzer = standard
elasticsearch_disable_version_check = true

## Rotation
output_batch_size = 5000
processbuffer_processors = 5
outputbuffer_processors = 5
processor_wait_strategy = sleeping
ring_size = 1024

## MongoDB
mongodb_uri = mongodb://xxx:27017/leonalog
mongodb_max_connections = 100
mongodb_threads_allowed_to_block_multiplier = 5

You can leave most variables as they are for now. They all should be well documented.

Configure at least the following variables in ../server.conf:

  • is_leader = true: Set only one server node as the leader. This node will perform periodical and maintenance actions that follower nodes won't. Every follower node will accept messages just as the leader nodes. Nodes will fall back to follower mode if there already is a leader in the cluster.

  • password_secret: You must set a secret that is used for password encryption and salting here. The server will refuse to start if it's not set. Generate a secret with pwgen -N 1 -s 96 for example. If you run multiple leona-server nodes, make sure you use the same password_secret for all of them.

  • root_password_sha: A SHA2 hash of a password you will use for the initial login. Set this to a SHA2 hash generated with echo -n "Enter Password: " && head -1 </dev/stdin | tr -d '\n' | sha256sum | cut -d" " -f1 and you will be able to log in to the web interface with the username admin and password your-password.

  • elasticsearch_hosts: List of Elasticsearch hosts that should connect to.

  • mongodb_uri: Enter your MongoDB connection and authentication information here.

Starting the Server

You need to have Java Installed!

Start the server:

java -jar leona-xxx.jar server --configfile=../server/server.conf

Then open your browser with http://localhost:9000 🚀

Last updated