Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. In this tutorial, we will guide you on how to install Loki on Fedora Server Latest.
Before we start, ensure that the following prerequisites are met:
sudo dnf install docker docker-compose
We need to create a directory where we can store the Loki configuration file and data.
sudo mkdir -p /etc/loki /var/lib/loki
Download the Loki docker-compose file from the official GitHub repository.
sudo curl -L https://raw.githubusercontent.com/grafana/loki/main/production/docker-compose.yaml -o /etc/loki/docker-compose.yaml
Open the /etc/loki/docker-compose.yaml
file with your preferred text editor and adjust the following settings:
Replace 127.0.0.1
in the loki
service section under command:
with the IP address of the machine that will run the Loki service.
command:
- "-config.file=/etc/loki/local-config.yaml"
- "-target=127.0.0.1:9090"
You can start Loki by running the following command:
sudo docker-compose -f /etc/loki/docker-compose.yaml up -d
To verify that Loki is running correctly, open http://<ip address of the machine running Loki>:3100/metrics
in your web browser. You should see a page with Prometheus-style metrics.
Congratulations! You have successfully installed Loki on Fedora Server Latest. You can now start configuring the tool to suit your needs.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!