Shlink is a self-hosted URL shortener and link management platform that allows you to create short links and keep track of clicks. This tutorial will walk you through the installation of Shlink on Ubuntu Server Latest.
Before starting, you need to have the following:
The first step is to clone the Shlink repository:
git clone https://github.com/shlinkio/shlink.git
Navigate to the cloned directory:
cd shlink
Create a copy of the .env.dist
file and rename it to .env
:
cp .env.dist .env
Open the .env
file with a text editor:
nano .env
Set the environment variables based on your preferences. At a minimum, you need to set the SHLINK_BASE_URL
to your server domain or IP address:
SHLINK_BASE_URL=https://example.com
Save and exit the file by pressing CTRL+X
, then Y
, and finally ENTER
.
Start the Shlink container:
sudo docker-compose up -d
Wait a few seconds until the container starts and check its status:
sudo docker-compose ps
You should see the following output:
Name Command State Ports
----------------------------------------------------------------------------------
shlink /docker-entrypoint.sh apac ... Up 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp
Open your web browser and visit https://example.com
. You should see the Shlink homepage:
Click on the login button in the top right corner:
Use the default credentials to log in:
admin@shlink.io
password
You should be redirected to the dashboard:
Congratulations! You have successfully installed Shlink on Ubuntu Server Latest.
In this tutorial, you learned how to install Shlink on Ubuntu Server Latest using Docker Compose. You should now be able to create short links and manage clicks from the Shlink dashboard.
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!