Introduction

Shlink is an open-source URL shortener that allows you to shorten long URLs and track clicks. In this tutorial, you will learn how to install Shlink on the latest Fedora CoreOS version.

Prerequisites

Before starting, make sure you have the following:

Step 1: Install Docker

Shlink uses Docker for running its services, so you need to install Docker on your Fedora CoreOS. You can install Docker by running the following command:

sudo rpm-ostree install docker

Once the installation is complete, start Docker and enable it to start at boot time with the following command:

sudo systemctl start docker
sudo systemctl enable docker

Step 2: Install Docker Compose

Docker Compose is a tool that allows you to define and run multi-container Docker applications. It is required for running Shlink, so you need to install it. You can install Docker Compose on Fedora CoreOS by running the following command:

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Step 3: Clone the Shlink Repository

You need to clone the Shlink repository to your Fedora CoreOS system. You can do this by running the following command:

git clone https://github.com/shlinkio/shlink.git

Step 4: Configure the Shlink Environment

To configure the Shlink environment, you need to create a file named .env in the shlink directory. You can do this by running the following command:

cd shlink
nano .env

Add the following lines in the .env file:

COMPOSE_PROJECT_NAME=shlink
MYSQL_ROOT_PASSWORD=your_root_password
MYSQL_USER=shlink_user
MYSQL_PASSWORD=your_user_password
MYSQL_DATABASE=shlink_db

Replace your_root_password and your_user_password with your own passwords.

Step 5: Run Shlink

You can now run Shlink by running the following command:

sudo docker-compose up -d

This command will start the Shlink containers in the background.

Step 6: Access Shlink

To access Shlink, open your browser and enter the URL http://your_server_ip:8080. You should see the Shlink login page.

Conclusion

In this tutorial, you learned how to install Shlink on the latest Fedora CoreOS version. With Shlink, you can now shorten long URLs and track clicks.

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!