# Web Clipper API for CLI

**URL:** <https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725>\
**Category:** Features\
**Created:** [28 September 2018 12:04 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725 "2018-09-28T12:04:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [28 September 2018 12:04 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/1 "2018-09-28T12:04:41Z")

</div>

In the design document is written that both desktop and cli should be able to start a web clipper server.  
Am I correct to notice that the cli doesn’t support this yet?  
Are there concrete plans to add this?

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [29 September 2018 06:40 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/2 "2018-09-29T06:40:29Z")

</div>

At the moment, only the desktop app runs the service.

---

<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:** [29 September 2018 22:50 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/3 "2018-09-29T22:50:26Z")

</div>

@sciurius FYI:

> <https://github.com/laurent22/joplin/issues/649>

@laurent this would be a nice feature. the only problem could be, if both (desktop and CLI app) are running at the same time. This has to be guarded somehow.

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [30 September 2018 14:33 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/4 "2018-09-30T14:33:15Z")

</div>

If they both use port 41184 only one can be active at a time.

---

<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:** [30 September 2018 18:14 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/5 "2018-09-30T18:14:04Z")

</div>

@sciurius I'm aware of that. That's why I said _it had to be guearded_. 😉

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [1 October 2018 15:04 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/6 "2018-10-01T15:04:30Z")

</div>

In my setup all Joplin clients sync with a cloud (ownCloud) server. This makes it tempting to consider the cloud as the authorative repository for the notes. So a headless Joplin content server (that directly communicates with the cloud) running as a daemon would allow all kinds of (authorized) apps to exchange notes with Joplin.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [1 October 2018 15:22 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/7 "2018-10-01T15:22:46Z")

</div>

> [@sciurius](#):
>
> So a headless Joplin content server (that directly communicates with the cloud) running as a daemon would allow all kinds of (authorized) apps to exchange notes with Joplin.

For this, couldn't you use the desktop app in the background? You could set it up to start minimised in the system tray and make it auto-start with the system. Wouldn't that work?

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [1 October 2018 17:08 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/8 "2018-10-01T17:08:03Z")

</div>

Yes, except for a few details:

- I must not exit the app (as I’m used to).
- I’m not yet sure how many resources a resident Jopin will take.
- It cannot run headless on a server.

As a first step, yes, this is fine. For more serious purposes a real headless server would still be better.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [1 October 2018 19:31 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/9 "2018-10-01T19:31:43Z")

</div>

I see what you mean and I expect it’s easy to enable this since the desktop and CLI apps share most of the same boot code. [https://github.com/laurent22/joplin/issues/834](https://github.com/laurent22/joplin/issues/834)

---

<div class="post-metadata">

**Author:** ![zblesk](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/zblesk/32/11_2.png) [@zblesk](https://discourse.joplinapp.org/u/zblesk)\
**Post date:** [2 October 2018 20:49 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/10 "2018-10-02T20:49:07Z")

</div>

> [@sciurius](#):
>
> It cannot run headless on a server.

Exactly my problem. I'd like to run it in an Ubuntu Server.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [4 October 2018 17:00 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/11 "2018-10-04T17:00:49Z")

</div>

I’ve started looking at it [here](https://github.com/laurent22/joplin/tree/headless-server) but I’m wondering what would be your use case for the headless server? Is it so that you can host it somewhere and then access it from anywhere over the internet?

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [4 October 2018 19:39 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/12 "2018-10-04T19:39:46Z")

</div>

For me the use case would be to run the joplin server on a NAS, together with the ownCloud server that stores the notes. Or maybe on a small server like RaspberryPi.

---

<div class="post-metadata">

**Author:** ![zblesk](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/zblesk/32/11_2.png) [@zblesk](https://discourse.joplinapp.org/u/zblesk)\
**Post date:** [4 October 2018 19:55 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/13 "2018-10-04T19:55:55Z")

</div>

@laurent I don’t really want it accessible over the 'net. I’d only expose it to the local host. Then I can have a façade in front of it, that’ll let me create a note (and maybe append to an existing one).

That is, the one thing I still have set up with IFTTT and Evernote is that some stuff gets appended to a few notes, and occasionally a new one is created. Can’t do that with Joplin yet. But I definitely _will not_ expose any interface that’ll allow _reading_ of the notes.

Side note: not sure if you’ve read the discussion elsewhere, but I’m hoping I could maybe use Huginn for the façade, without having to write anything myself. If not, I do have an app already running that I could quickly update. (I want to avoid hosting a new service because of it, though.)

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [4 October 2018 20:12 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/14 "2018-10-04T20:12:38Z")

</div>

> [@zblesk](#):
>
> Side note: not sure if you’ve read the discussion elsewhere, but I’m hoping I could maybe use Huginn for the

you spoke of it with me [here](https://discourse.joplin.cozic.net/t/joplin-version-1-0-110/739/4) 😉

---

<div class="post-metadata">

**Author:** ![zblesk](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/zblesk/32/11_2.png) [@zblesk](https://discourse.joplinapp.org/u/zblesk)\
**Post date:** [5 October 2018 07:19 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/15 "2018-10-05T07:19:38Z")

</div>

> [@foxmask](#):
>
> you spoke of it with me [here](https://discourse.joplin.cozic.net/t/joplin-version-1-0-110/739/4) 😉

I know. That sentence was aimed at Laurent, though. 😉

---

<div class="post-metadata">

**Author:** ![Kassimleslie](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@Kassimleslie](https://discourse.joplinapp.org/u/Kassimleslie)\
**Post date:** [5 October 2018 10:43 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/16 "2018-10-05T10:43:03Z")

</div>

Oh dear. Hopefully, one day I get to understand all these techy terms and make a more meaningful contribution to this wonderful app. 😊

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [6 October 2018 08:59 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/17 "2018-10-06T08:59:59Z")

</div>

Thanks for the feedback, I wonder if it would make sense to convert it to a server right away, with auth, etc. so that it can be used remotely.

---

<div class="post-metadata">

**Author:** ![chrisb86](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/chrisb86/32/306_2.png) [@chrisb86](https://discourse.joplinapp.org/u/chrisb86)\
**Post date:** [6 October 2018 13:47 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/18 "2018-10-06T13:47:50Z")

</div>

That would open many possibilites. We could then create share sheets for mobile devices etc.

---

<div class="post-metadata">

**Author:** ![zblesk](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/zblesk/32/11_2.png) [@zblesk](https://discourse.joplinapp.org/u/zblesk)\
**Post date:** [6 October 2018 19:06 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/19 "2018-10-06T19:06:14Z")

</div>

One lingering doubt remains: even in the scenario I’ve described, I’m still not sure I’d be able to handle the encryption satisfactorily. As it is, I’d have to sync all my notes into the server where they’d be in plain text - even though it’d be unnecessary for its actual job. Perhaps I’ll try a different approach.

---

<div class="post-metadata">

**Author:** ![RenatoXSR](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/renatoxsr/32/374_2.png) [@RenatoXSR](https://discourse.joplinapp.org/u/RenatoXSR)\
**Post date:** [3 November 2018 13:22 UTC](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725/20 "2018-11-03T13:22:55Z")

</div>

I would very much like to run it headless, as it fits my workflow better and allows for a better integration into third-party md editors, so I may download a note anywhere, edit, and upload it back (maybe on a computer to which I may not download any software, for instance).

My notes are encrypted so I cannot download them from the upstream server (Nextcloud) and even if not encrypted I would still have to manually change the updated\_time fields.

Moreover, running a headless server would allow us to create a web client for editing and managing notes, maybe using the (already pretty good) electron codebase.

I’ll have a a look into it.

Cheers.

[Next page](https://discourse.joplinapp.org/t/web-clipper-api-for-cli/725.md?page=2)
