# Run headless server, access remotely

**URL:** <https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328>\
**Category:** Support\
**Created:** [26 February 2020 18:55 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328 "2020-02-26T18:55:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_dan](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/_dan/32/2780_2.png) [@\_dan](https://discourse.joplinapp.org/u/_dan)\
**Post date:** [26 February 2020 18:55 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/1 "2020-02-26T18:55:53Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![marcush](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marcush/32/1824_2.png) [@marcush](https://discourse.joplinapp.org/u/marcush)\
**Post date:** [26 February 2020 21:01 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/2 "2020-02-26T21:01:08Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![\_dan](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/_dan/32/2780_2.png) [@\_dan](https://discourse.joplinapp.org/u/_dan)\
**Post date:** [26 February 2020 22:01 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/3 "2020-02-26T22:01:27Z")

</div>

Great, thanks.

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

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [27 February 2020 03:44 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/4 "2020-02-27T03:44:11Z")

</div>

> [@marcush](#):
>
> The endpoints used by the web clipper are unauthenticated

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

---

<div class="post-metadata">

**Author:** ![marcush](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marcush/32/1824_2.png) [@marcush](https://discourse.joplinapp.org/u/marcush)\
**Post date:** [27 February 2020 03:51 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/5 "2020-02-27T03:51:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [27 February 2020 03:52 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/6 "2020-02-27T03:52:24Z")

</div>

ok

---

<div class="post-metadata">

**Author:** ![marcush](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marcush/32/1824_2.png) [@marcush](https://discourse.joplinapp.org/u/marcush)\
**Post date:** [28 February 2020 02:02 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/7 "2020-02-28T02:02:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![\_dan](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/_dan/32/2780_2.png) [@\_dan](https://discourse.joplinapp.org/u/_dan)\
**Post date:** [28 February 2020 19:59 UTC](https://discourse.joplinapp.org/t/run-headless-server-access-remotely/6328/8 "2020-02-28T19:59:32Z")

</div>

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 🙂
