Run headless server, access remotely

Hi all, I'm hoping to move to Joplin proprely, and at the moment, I'm trying to work out if it fits what I need.

I understand I can run a headless server, like so:
joplin --profile ~/.config/joplin/ server start &

I'll be syncing between various machines, but I don't want to sync all my notes to my work PC. I was hoping to tunnel port 41184 over SSH to my server, so I can just use the web clipper in work if I see a link I'd like to save. Will the web clipper be able to communicate with a remote server, or does the Joplin process need to be running locally for it to work?

Is what I'm suggesting achievable easily? Open to any alternatives too.

Thanks in advance :slight_smile:

Assuming you get the tunnel set up correctly, it should work. The web clipper only communicates with Joplin via the api so not having Joplin running locally should be fine.

I’ve had a bit of success getting the web clipper pointed at a remote instance in the past and the hardest parts for me were:

  1. Joplin only listens on 127.0.0.1 and only does http
  2. The endpoints used by the web clipper are unauthenticated

Given you’re trying an ssh tunnel I think these shouldn’t be an issue for you!

Great, thanks.

Out of curiousity, what have you done to get around those two issues you mentioned?

Can you please elaborate on that? You need a token for all endpoints but two.

Poor phrasing. My bad. I meant to say not all the endpoints are authenticated.

ok

To answer your question, I didn’t. I was going to throw it behind nginx to solve the HTTP issue and it was after that that I realized that those two APIs were unauthenticated.

The next thing was actually going to be trying an ssh tunnel instead, but I’ve been too busy with other things to fiddle with the project that needed it.

I got the SSH tunnel working. With the headless server running on the host machine, from my laptop I ran:
ssh -L 41184:localhost:41184 dan@host_ip

This created the tunnel as hoped. This was verified by running the following from the remote machine:
curl http://localhost:41184/ping

The string JoplinClipperServer will be returned if the tunnel is working.

Initially, trying to use the web clipper wasn't working. Turns out you need to create a notebook on the server beforehand. I created one using the Joplin CLI interface, restarted the server and could use the clipper successfully.

Hope this is helpful for people :slight_smile:

2 Likes