Stirling PDF Installation

Switched off the VPN and tried again but still no good:

could there be any firewall settings perhaps that could be interfering?

Mmmm, I don't think so. Docker is known for being able to punch holes through the firewall on its own. But it would be really strange that there's any rules blocking connections to localhost anyway. Did you enable the firewall or made any changes to it?

Let's see also the output of:

ss -ntlp

Is this with the container running? Check with docker container ls. Both commands should show that port 8080 is in use:

is this what you wanted?

I wonder if this "dockge" is somehow interfering with things. I just looked it up and it seems to be some sort of management tool for containers. If you visit "localhost:5001" in your browser, does that work?


Well, since it's already in place, let's try to use it. First, stop any remaining containers for good measure as we've been doing thus far:

docker container stop stirling-pdf
docker container prune

Create a new file named "compose.yml" with the following contents:

services:
  stirling-pdf:
    image: stirlingtools/stirling-pdf:latest
    ports:
      - '8080:8080'
    volumes:
      - /opt/stacks/stirling-pdf/StirlingPDF/trainingData:/usr/share/tessdata # Required for extra OCR languages
      - /opt/stacks/stirling-pdf/StirlingPDF/extraConfigs:/configs
      - /opt/stacks/stirling-pdf/StirlingPDF/customFiles:/customFiles/
      - /opt/stacks/stirling-pdf/StirlingPDF/logs:/logs/
      - /opt/stacks/stirling-pdf/StirlingPDF/pipeline:/pipeline/
    environment:
      - DOCKER_ENABLE_SECURITY=false
      - LANGS=en_GB

Following dockge's instructions, we need to create a new folder at a specific location, and move this newly created file over there:

NOTE: If any of the following commands result in a permission error, repeat them but adding the word sudo in front of them.

mkdir -p /opt/stacks/stirling-pdf/
mv compose.yml /opt/stacks/stirling-pdf

You'll have to create a new folder structure for Stirling PDF, as usual, but at this new location:

mkdir -p /opt/stacks/stirling-pdf/StirlingPDF/{trainingData,extraConfigs,customFiles,logs,pipeline}

In your browser, go to localhost:5001. If that page loads it should a dashboard with a dropdown menu on the top-right, which contains a button to "Scan Stacks Folder". Click that and, hopefully, you will now see a new item on left hand side that says "stirling-pdf" or something around those lines.

When you click that, you should see a "deploy" button. And that's all you should need to do, in theory, let's see what happens.

Lots of "shoulds" because I've never used this tool in particular. But if it's somehow taking over the Docker commands that you've been running, this may actually be an easier alternative.

I'm afraid nothing worked :joy:

What is going on with my system! It really doesn't like Stirling PDF.

Tried going straight to localhost:5001

Nothing.

and this is the history of my terminal:

Oh, no! This one isn't a command you run, but a file that you need to create. Just a plain text file, using the text editor of the same name already installed.

Although I agree that something smells funny, so to speak :joy: It should've worked earlier... so it's either this "dockge" that is installed (do you remember setting it up yourself?) or how Docker itself is installed.

So, take a closer look at my previous post. Everything is a command except that big chunk of text that is supposed to be a file named "compose.yml".


Also, just curious, what is the output of:

cat /etc/apt/sources.list.d/docker.list

It may return an error saying that it doesn't exists, that's also fine.

Ah man, sorry! I was rushing! Ok, let me try that again creating that file.

This is the return of the command you requested:

I'm sorry, maybe I screwed it up again but still no good... I created that text file with the code:

I didn't know where to save it so just saved it to the desktop.

I then repeated the commands you mentioned but still no result:

That's fine, but then you'll have to adjust the command to move the file accordingly. This caused an error, as per your screenshot, saying that it couldn't move the "compose.yml" file because it didn't find it in your current directory. If it's in the desktop, this should do it:

sudo mv /home/admin/Desktop/compose.yml /opt/stacks/stirling-pdf

But, it still is strange that you cannot access localhost:5001. Did you try to disable the VPN?

Ok! something happened!!

It was to do with the VPN.

This is what my terminal came back with:

This is when I visited localhost:5001 with the VPN on:

This was it when I turned the VPN off:

So it was the VPN all along... which provider is it, if you don't mind sharing? I would very much like to know why they're blocking connections to localhost :joy:

I can disclose the VPN provider, but is there any security or privacy threat by me doing so in addition to any of the info I've shared above?

So what do I do now? I turn off the vpn and enter localhost:5001 to reach the Dockge page but then what next?

Shouldn't it just be coming up with Stirling PDF from there? Shouldn't Stirling PDF be appearing whenever I navigate to locahost:8080 already each time?

Just that you are a client of that particular provider. The reason I ask is because, clearly, I was wrong earlier in the conversation when I said this wouldn't matter.

One possible solution is split the traffic that goes to the localhost address, or exclude this interface from the VPN traffic. How to do this may differ from one provider to another, so we would need to consult their documentation.

It's not a big risk to share this but if you prefer you can send me a PM (click on my avatar picture, there you will see a button to send a Message).

Once you have that loaded, follow the instructions as per my previous response (taken from the dockge documentation):

You can use that dashboard to control the starting and stopping of StirlingPDF from there. But you to access it you will go to localhost:8080 as expected.

Ok, well VPN was Mullvad.

So I turned off VPN again and navigated to localhost:8080. Nothing.

I then navigated to localhost:5001 and it shows this page again:

There is no dashboard with a drop down menu or anything else described. Do I have to complete the Dockge set up?

Is there a way to get rid of this Dockge and just have the normal Docker system? Or whatever the most straightforward way is of accessing it?

Thanks, I'll look into it to see if there's an easy way to bypass this for connections to localhost. For now, let's just get this running.

I have never used this, I only suggested since I saw that you had already downloaded and when I looked into it, it appears to be a nice and convenient way to handle it. I was not aware that they used authentication but it's all stored locally on your machine so there's no harm in doing that. I would recommend you to create an account, then you will have access to the dashboard.

ok, do you think there's an easier way of setting up stirling pdf? turning the VPN on and off every time is a little cumbersome.

There is a Unix guide on their website but I couldn't get this to work either:

https://docs.stirlingpdf.com/Installation/Unix%20Installation

They have been talking about creating either a flatpak or appimage but the creator apparently isn't familiar with how to do that and has asked the community for help:

If there's anyone in the Zorin community that knows how to do this it would be a major boost to the linux community. If you've not used Stirling Pdf before its worth checking out. For anyone using PDFs its a pretty awesome all in one tool!

The problem is how Stirling PDF works at its core, which is by running a web server that you access via a web browser. I don't disagree that more options to install it would be beneficial, but you'd still experience this same issue as long a you're using a VPN.

Based on what I've found about Stirling PDF, it looks like it's meant as a self-hosted solution that you'd keep running on a server or a separate machine on the same network.

As per the Mullvad VPN documentation you can make split traffic generated by specific programs that you launch directly from their app. This means that those particular programs would be excluded from the VPN and would use your regular network settings. You will most likely want to have a separate browser for that.

It's possible there is a way to apply this same concept based on IP addresses or network interfaces. That would be ideal, but I would suggest you contact Mullvad VPN and ask them about this.

1 Like