User Tools

Joplin, the Note taking app

NOTE: i don't use Joplin anymore, this page might get outdated over time.

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.

I am not using Joplin anymore, because it's too complex for my use case. Right now i am using SyncThing with custom Markdown editors on different devices.

A few CAVEATS first

First of all, be aware that when you first setup sync 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 sync. 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 sync 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 Sync 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 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:

https://yourdomain.com/webdav/common/notes

and tap sync!

Installing Jopin Web Client

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. Of course, you will be using Podman.

So, for proper organization, create a dedicated home folder and user for Joplin Web 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:

useradd -d /data/daemons/joplin-web -m joplin-web
su - joplin-web
git clone https://github.com/joplin-vieweb/joplin-vieweb.git
ln -s joplin-vieweb/docker-compose-joplin-only.yml docker-compose.yml

Edit the linked composer file to specify a proper port (i choose 7999) and the URLs that will be allowed:

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: {}

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.

You might have to create the joplin-net and ensure the container is spun automatically at boot. Refer to Using Containers on Gentoo for more details.

Starting it is easy:

 > cd /data/daemons/joplin-web
 > podman compose up -d

as well as future upgrades:

 > cd /data/daemons/joplin-web
 > podman compose down
 > podman compose pull
 > podman compose up -d

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:

        # 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
        }

and add also the new subdomain to the HTTP section of NGINX config, then extend your Let's Encrypt certificate:

 > certbot --nginx certonly -d mydomain.com -d notes.mydomain.com

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.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information