User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:joplin [2024/02/27 08:37] willyservices:joplin [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Joplin, the Note taking app ====== 
- 
- 
-[[https://joplinapp.org/|Joplin]] is one of many note taking apps but, i think, it has quite a few interesting points: 
-  * It's **really** Open Source 
-  * It has no //freemium// features nor any kind of //pay-per-use// approach 
-  * It has mobile, desktop and web clients 
-  * It support many types of synchronization, including WebDAV and it's own synch server. 
-  * It supports plugins 
-  * It is a **note taking** solution, not a brain-dump/make-coffee/jizz-fuzz-extra whatnot. 
- 
-There are plenty of note taking apps, but most of them are either commercial or even if supposedly Open Source, they are dependent on one or more freemium subscriptions / features. There is nothing bad in that, but it makes me wonder what will happen to the note taking app itself after the monetization approach fail (hoping not of course for them!) and you are left with an unmaintained mess. 
- 
-Joplin at least it's not only fully Open Source and 100% free (as in beer), but has a strong community support and many additional tools built by the community to extend it's functionalities, and the Web interface is one of those. 
- 
-In it's basic form Joplin is a desktop app (windows/linux) and also a native mobile app (Android, etc). You can go ahead and install those yourself, it's out of scope here. What i will detail here is how to properly **synchronize** all your Joplin instances and how to self-host the Joplin web client, so that you can access your notes simply from any internet browser too. 
- 
-There is also a console based client, but i didn't installed it as of yet. 
- 
-===== A few CAVEATS first ===== 
- 
-First of all, be aware that when you first setup synch to any Joplin client it will clear your local notes and import all the remote ones. This has the nasty consequence that if you already have a client with many notes, those **will be deleted**. So pay extra attention on you first initial synch. The client will warn you tough, so it's hard to lose all your notes by mistake. But you need to be aware or be sorry. 
- 
-Second, the Joplin Web client is not official and is not maintained by the main developers. Nonetheless it seems pretty solid and of great quality, so i will show you how to install. 
- 
-Third, Joplin Web Client is provided only as docker images, which sucks, but that's what is provided, and getting into a manual build of such a complex piece of software was, and still is, outside my concept of fun, so there you go, i will show you how to setup properly the docker images for Joplin Web. 
- 
-Fourth, there is a synch server for Joplin, but since synching Joplin itself via WebDAV is so easy, and i have shown you already how to create a nice fileserver that includes WebDAV support, i will not bother with Joplin Synch Server. 
- 
-Last, it seems that the Joplin Web client does not play well with a sub path, so you will need to spin a dedicated sub-domnain for it to work. 
- 
-===== Joplin Synchronization on WebDAV ===== 
- 
-There is not much to say. Remember that [[selfhost:fileserver|File Server]] you created? Well, that's your sync target. 
- 
-Just create a subfolder under the //common// share (let's call it //common/notes//) and add this path to all your clients: 
-<code> 
-https://yourdomain.com/webdav/common/notes 
-</code> 
- 
-and tap sync! 
- 
- 
- 
-===== Installing Jopin Web Client ===== 
- 
-[[https://github.com/joplin-vieweb/joplin-vieweb/|Joplin View Web]] is the de-facto browser-based client for Joplin. The core devs of Joplin have stated clearly that developing a web-based app is not in their goals, but somebody stepped up and created this not-so-little jewel of app. Unfortunately enough, the underlying architecture is pretty complex and i found myself forced to use the provided docker image via docker compose. 
- 
-So, for proper organization, create a dedicated home folder for Joplin Web (you don't need a user since it will run in docker) and clone the repository. Then you need to select the specific docker-compose file that do not include a reverse-proxy, since you will be using your NGINX, and edit it: 
-<code bash> 
- > mkdir /data/daemons/joplin-web 
- > cd /data/daemons/joplin-web 
- > git clone https://github.com/joplin-vieweb/joplin-vieweb.git 
- > ln -s joplin-vieweb/docker-compose-joplin-only.yml docker-compose.yml 
-</code> 
- 
-Edit the linked composer file to specify a proper port (i choose 7999) and the URLs that will be allowed: 
-<file txt docker-compose.yml> 
-version: '3.4' 
- 
-x-common-variables: &common-variables 
-   ORIGINS: "'http://localhost', 'http://127.0.0.1'" 
- 
-services: 
-  django-joplin-vieweb: 
-    image: gri38/django-joplin-vieweb:latest 
-    depends_on: 
-      - joplin-terminal-xapi 
-    environment: 
-       <<: *common-variables 
-    restart: unless-stopped 
-    ports: 
-      - 7999:8000 
-    volumes: 
-      - joplin:/root/.config/joplin:ro 
-      - joplin-vieweb:/root/.config/joplin-vieweb 
-    networks: 
-      - joplin-net 
- 
-  joplin-terminal-xapi: 
-    image: gri38/joplin-terminal-xapi:latest 
-    restart: unless-stopped 
-    volumes: 
-      - joplin:/root/.config/joplin 
-    networks: 
-      - joplin-net 
- 
-volumes: 
-  joplin: 
-  joplin-vieweb: 
- 
-networks: 
-  joplin-net: {} 
-</file> 
-  
-since you will be accessing it only via the reverse proxy, it is fine to leave 127.0.0.1 and localhost as only allowed sources. Https will be handled by the reverse proxy, so do not worry about certificates. 
- 
-Starting it is easy: 
-<code bash> 
- > cd /data/daemons/joplin-web 
- > docker compose up -d 
-</code> 
- 
-as well as future upgrades: 
-<code bash> 
- > cd /data/daemons/joplin-web 
- > docker compose down 
- > docker compose pull 
- > docker compose up -d 
-</code> 
- 
-Now, you need to setup the reverse proxy. 
- 
-===== NGINX configuration ===== 
- 
-Since it is not working properly on a sub path, you need to provide a true subdomain for it. I will assume its **notes.mydomain.com**. 
- 
-Add the following to your **/etc/nginx/nginx.conf**: 
-<code> 
-        # Joplin web must be on it's own subdomain and will handle authentication 
-        server { 
-                server_name notes.mydomain.com; 
-                listen 8443 ssl; # managed by Certbot 
-                listen 443 ssl; # managed by Certbot 
-                client_max_body_size 50000M; 
-                large_client_header_buffers 4 32k; 
-                location = / { 
-                        return 301 https://notes.mydomain.com/joplin; 
-                } 
- 
-                location / { 
-                        proxy_pass http://127.0.0.1:7999/; 
-                } 
-                ssl_certificate /etc/letsencrypt/live/mydomain.org/fullchain.pem; # managed by Certbot 
-                ssl_certificate_key /etc/letsencrypt/live/mydomain.org/privkey.pem; # managed by Certbot 
-                include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 
-                ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 
-        } 
-</code> 
- 
-and add also the new subdomain to the HTTP section of NGINX config, then extend your Let's Encrypt certificate: 
-<code bash> 
- > certbot --nginx certonly -d mydomain.com -d notes.mydomain.com 
-</code> 
- 
-make sure you are listing ALL the domains for your cert! 
- 
-NOTE: move all this into the updated NGINX page 
- 
- 
- 
- 
-===== Initial setup for the web gui ===== 
- 
-You first need to login to the Joplin Vieweb admin interface at **https://notes.mydomain.com/amdin** (default login is admin/admin) and change the admin password. Then, add your own users. 
- 
-Last step is login in the web interface at **https://notes.mydomain.com/joplin** with your newly created user and go to settings and add the WebDAV synch backend and perform your first sync. 
- 
- 
- 
- 
- 
-====== Joplin ====== 
- 
-[[https://joplinapp.org/|Joplin]] is a neat open-source note-taking application that offers native clients for all major platforms including, but not only, Android and PC (both windows and linux) and even a text-based client. It's mark-down based and quite complete as features goes. Ah, also Joplin is fully free as in beer, there are no paywalled features like most of the other open-source solutions out there. 
- 
-Don't get me wrong, i respect any monetization attempt from any open-source porject but as i have already stated, i tend to prefer leaning on the true-to-the-spirit Open Source projects that do it for fun and don't push for monetization. This is not because i think less of them, but because i think long term sustainability could be at risk if, or when, monetization fails to reach goals for the project, and the world is full of abandoned great Open Source repositories nobody cares reviving. 
- 
-The main drawback of Joplin is that it does not provide a web interface natively but, luckly, there a community driver project to fill that gap which works quite nicely, with a few caveats. 
- 
-===== Synchronization ===== 
- 
-Joplin synchronization is a bit unlogical to me, as it will **delete** all your  notes  when you sync a client with existing notes to an empty server. Basically, your server will always be dominating on first sync.  
- 
-My suggestion is to setup the synchronization first, then link clients as you install them. Just don't sync for the first time a client with many notes already in it! 
- 
-Jopin provide a [[https://joplinapp.org/help/apps/sync/|sync]] service, but i think it's overkill specially since it can sync easily via many protocols, including WebDAV, and i have shown you how to create a WebDAV server [[services:fileserver|here]], so you will be using WebDAV as sync backend. 
- 
-So, here is what you need to do: 
-  * Create a folder in your WebDAV share (ex: **Notes-Sync**) 
-  * Install the Joplin client of your choice 
-  * Set-up sync in the client using WebDAV and **https://mydomain.com/webdav/Notes-Sync** 
-  * Sync! 
- 
-===== Installation ===== 
- 
-Go ahead and install your preferrend clients on your phone, tablets and PC. Refer to [[https://joplinapp.org/help/install/|Joplin download page]]. 
- 
- 
-===== Web Client Installation ===== 
- 
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information