Shlink.io Great Docker to short urls !

Currently reading
Shlink.io Great Docker to short urls !

1,418
612
NAS
DS220+ : DS1019+ : DS216+II : DS118 : DS120j : APC Back UPS ES 700 — Mac/iOS user
It’s working now. It shows the predefined server and I just need to click it.
This is nice. It has expiry settings too.

Thanks a lot @Rusty and @magefesa :)
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Hi everyone,

after spending a lot of hours understanding and setting up the shlink server on my own, I almost get it working. It stuck at adding server in web interface. I can´t add any server or may be it get corrupted anyhow. I'm really boring and frustrated with the situation.

I tried to add a server via myip address in the browser, with following error:
1600115474038.png

Pressing take me backup blinks the screen rapidly and brings me back to this same screen.

When entering via app.shlink.io, the following happens:
1600115630707.png

1600115710226.png


If I fresh reload with solely the ip address and port (192.168.1.76:88 + enter), the following screen shows up:

1600115874741.png

By pressing either of the servers, this happens (again)

1600116030678.png


What to do next? Could anyone please help me out on this?

Thanks in advance.
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Hi everyone,

after spending a lot of hours understanding and setting up the shlink server on my own, I almost get it working. It stuck at adding server in web interface. I can´t add any server or may be it get corrupted anyhow. I'm really boring and frustrated with the situation.

I tried to add a server via myip address in the browser, with following error:
View attachment 2094
Pressing take me backup blinks the screen rapidly and brings me back to this same screen.

When entering via app.shlink.io, the following happens:
View attachment 2095
View attachment 2096

If I fresh reload with solely the ip address and port (192.168.1.76:88 + enter), the following screen shows up:

View attachment 2097
By pressing either of the servers, this happens (again)

View attachment 2098

What to do next? Could anyone please help me out on this?

Thanks in advance.
From the looks of it you are trying to add your own Shlink instance to the official app.shlink.io? I wouldn't recommend that.

If 192.168.1.76:88 is your shlink web UI whats your shlink container then (the one that will actually serve up links)? If that IP address is in fact your shlink container whats the shlink web UI container then?

So just to recap make sure that you have 2 shlink containers (one for links and one for web ui).

Can you explain your Shlink container setup?
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Greetings,

For the shlink server container I run this command line:
Code:
docker run \
    --name shlink \
    -p 8080:8080 \
    -e SHORT_DOMAIN_HOST=bjsa.cc \
    -e SHORT_DOMAIN_SCHEMA=http \
    -e DB_DRIVER=mysql \
    -e DB_NAME=shlink \
    -e DB_USER=butala \
    -e DB_PASSWORD=******** \
    -e DB_HOST=192.168.1.76 \
    -e DB_PORT=3306 \
    -e DISABLE_TRACK_PARAM="no-track" \
    -e DELETE_SHORT_URL_THRESHOLD=30 \
    -e VALIDATE_URLS=true \
    -e WEB_WORKER_NUM=16 \
    -e TASK_WORKER_NUM=16 \
    -e DEFAULT_SHORT_CODES_LENGTH=6 \
    -e GEOLITE_LICENSE_KEY=*********** \
    -e ANONYMIZE_REMOTE_ADDR=true \
    -e REDIRECT_STATUS_CODE=301 \
    -e REDIRECT_CACHE_LIFETIME=90 \
    shlinkio/shlink:stable
The server runs well except for some notice lines (see log attached).
The shlink web interface was also installed without issues, it runs smooth.

I installed it with following parameters:
Local port: 88
container port: 80

Log is also attached.

Hope it answers your question.
 

Attachments

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Greetings,

For the shlink server container I run this command line:
Code:
docker run \
    --name shlink \
    -p 8080:8080 \
    -e SHORT_DOMAIN_HOST=bjsa.cc \
    -e SHORT_DOMAIN_SCHEMA=http \
    -e DB_DRIVER=mysql \
    -e DB_NAME=shlink \
    -e DB_USER=butala \
    -e DB_PASSWORD=******** \
    -e DB_HOST=192.168.1.76 \
    -e DB_PORT=3306 \
    -e DISABLE_TRACK_PARAM="no-track" \
    -e DELETE_SHORT_URL_THRESHOLD=30 \
    -e VALIDATE_URLS=true \
    -e WEB_WORKER_NUM=16 \
    -e TASK_WORKER_NUM=16 \
    -e DEFAULT_SHORT_CODES_LENGTH=6 \
    -e GEOLITE_LICENSE_KEY=*********** \
    -e ANONYMIZE_REMOTE_ADDR=true \
    -e REDIRECT_STATUS_CODE=301 \
    -e REDIRECT_CACHE_LIFETIME=90 \
    shlinkio/shlink:stable
The server runs well except for some notice lines (see log attached).
The shlink web interface was also installed without issues, it runs smooth.

I installed it with following parameters:
Local port: 88
container port: 80

Log is also attached.

Hope it answers your question.
No, it doesn't. You said a lot, but not even close to what I have asked. So what container is running on 80 and what on 88? Are you using your local webUI to register your shlink? Why do you have app.shlink.io URL in the images above?
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
No, it doesn't. You said a lot, but not even close to what I have asked. So what container is running on 80 and what on 88? Are you using your local webUI to register your shlink? Why do you have app.shlink.io URL in the images above?
Containers running on port 80:
- nextcloud - off
- phpmyadmin - on
- shlink web client - on
- wordpress - off
- yourls - off

On port 88 is shlink client (192.168.1.76:88)

After those issues by running 192.168.1.76:88, I gave it a try on app.shlink.io, but it makes things more erratic.
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Containers running on port 80:
- nextcloud - off
- phpmyadmin - on
- shlink web client - on
- wordpress - off
- yourls - off

On port 88 is shlink client (192.168.1.76:88)

After those issues by running 192.168.1.76:88, I gave it a try on app.shlink.io, but it makes things more erratic.
Sorry but this just makes me ask more questions.

When you say shlink client (192.168.1.76:88) you mean shlink container (main one) or the webUI one?

Don't use app.shlink.io, you want to use your own setup not some 3rd party hosted one.
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Sorry but this just makes me ask more questions.

When you say shlink client (192.168.1.76:88) you mean shlink container (main one) or the webUI one?

Don't use app.shlink.io, you want to use your own setup not some 3rd party hosted one.
The web UI
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
The web UI
Ok if webUI is on 88 then you need to log into its web ui and for configuration enter URL for your shlink container (what port is it running on?).

So you need to enter its URL and API using the webUI on port 88.

Not app.shlink.io and there enter again url of your webUI, makes no sense.
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Ok if webUI is on 88 then you need to log into its web ui and for configuration enter URL for your shlink container (what port is it running on?).

So you need to enter its URL and API using the webUI on port 88.

Not app.shlink.io and there enter again url of your webUI, makes no sense.
Sorry, I tried to understand what you want to say with "log into its web ui", 'cause I cant see any place where I could log into. Please, could you explain with other words?
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Sorry, I tried to understand what you want to say with "log into its web ui", 'cause I cant see any place where I could log into. Please, could you explain with other words?
Well, you have 2 containers. One is shlink for handling short urls, and the other one is shlink web UI. This container is to manipulate the 1st container via UI.

So log into your webUI container (the one on port 88, its the one that looks like app.shlink.io) and inside it configure your main shlink container (on another port, you still haven't listed what port it is using) and connect it using its local op and API key.
 
1,418
612
NAS
DS220+ : DS1019+ : DS216+II : DS118 : DS120j : APC Back UPS ES 700 — Mac/iOS user
@butala

In @Rusty guide. Did you cover step 01?
You should have a text file in a folder under Docker.
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Well, you have 2 containers. One is shlink for handling short urls, and the other one is shlink web UI. This container is to manipulate the 1st container via UI.
This was clear from the beginning, ok.

So log into your webUI container (the one on port 88, its the one that looks like app.shlink.io) and inside it configure your main shlink container (on another port, you still haven't listed what port it is using) and connect it using its local op and API key.
If I did unterstand what you meant here by "configure" is modifying something in the "shlink web client container" (the one with port 88 set), but don't know under which sections in that container I have to add/alter?
1600266825852.png
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
@butala

In @Rusty guide. Did you cover step 01?
You should have a text file in a folder under Docker.
Hi fellow,
I followed all the steps as described in that guide. Now, I'm not sure what you mean by this "text file". Is this mentioned in the guide, or do I have overseen it?
 
1,418
612
NAS
DS220+ : DS1019+ : DS216+II : DS118 : DS120j : APC Back UPS ES 700 — Mac/iOS user
Is this mentioned in the guide, or do I have overseen it?
Go back to the guide and check:
STEP 01 - setting up servers.json file.
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Go back to the guide and check:
STEP 01 - setting up servers.json file.
Now I see it. Reasons why I don´t follow this step is because on the title it says "Optional web client configurations", so I skipped quickly to save my eyesight providing that I have issue looking to high contrast screens mainly white on black. This white letters are like beams in my eyes.
Now I copy the text to the notepad and will follow the instructions from there. I'll give feedback.
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Now I see it. Reasons why I don´t follow this step is because on the title it says "Optional web client configurations", so I skipped quickly to save my eyesight providing that I have issue looking to high contrast screens mainly white on black. This white letters are like beams in my eyes.
Now I copy the text to the notepad and will follow the instructions from there. I'll give feedback.
My configuration in shlink web client (as step 1)

1600273892231.png


This is what I entered by adding a server in the web ui (the same data entered in servers.json):
1600273976692.png


And this is the result:

1600273794555.png
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
My configuration in shlink web client (as step 1)

View attachment 2105

This is what I entered by adding a server in the web ui (the same data entered in servers.json):
View attachment 2106

And this is the result:

View attachment 2104
Second picture is wrong. In the URL parameter, enter http:// 192.168.1.76 : port. Keep in mind that the port number needs to be the one that you have mapped for that main shlink container.
 
27
2
NAS
DS918+
Operating system
Windows
Mobile operating system
Android
Second picture is wrong. In the URL parameter, enter http:// 192.168.1.76 : port. Keep in mind that the port number needs to be the one that you have mapped for that main shlink container.
Finally it works! Thank you.

I already have registered one url as seen below.
1600284562366.png


But issues continues:

1) the short link generated does not access the long link registered. I think I have to do some configuration at bjsa.cc.
1600284656407.png


2) How to delete the early failed server added, despite the problem to edit and display them (refuses to show).
1600284987817.png


Some guidance will be again appreciated.
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Finally it works! Thank you.

I already have registered one url as seen below.
View attachment 2107

But issues continues:

1) the short link generated does not access the long link registered. I think I have to do some configuration at bjsa.cc.
View attachment 2108

2) How to delete the early failed server added, despite the problem to edit and display them (refuses to show).
View attachment 2109

Some guidance will be again appreciated.
Regarding issues 1) yes you will have to add a CNAME record towards your public ip address or DDNS name of your NAS. This is the first step that you have to do in order to push visitors towards your NAS and shlink instance.

Next, you will have to set up a reverse proxy for your bjsa.cc domain and redirect it to your shlink container.

More on this here: Synology Reverse Proxy

Regarding question 2). Can’t you simply log into those servers and use the delete link on the page to remove them?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Trending threads

Top