{"id":1493,"date":"2025-04-06T19:31:07","date_gmt":"2025-04-06T19:31:07","guid":{"rendered":"https:\/\/www.labiol.xyz\/?p=1493"},"modified":"2025-04-06T19:31:07","modified_gmt":"2025-04-06T19:31:07","slug":"nginx-configuration-for-joplin-note-taking-app","status":"publish","type":"post","link":"https:\/\/www.labiol.xyz\/index.php\/2025\/04\/06\/nginx-configuration-for-joplin-note-taking-app\/","title":{"rendered":"Nginx configuration for joplin note taking app"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Joplin may not be the most perfect note-taking application, but it is open-source, well-known, has a long release history, works on multiple operating systems, and supports plugins. It\u2019s not perfect, but it\u2019s good enough and highly usable. In case of this type of application, it is important to have an easy way to do export to migrate to another application (which is quite rare) and import using various format. It is possible that author, in the future, can change license or scope of free tier where next tier level price is not easy to accept. <\/p>\n\n\n\n<p>In case of Joplin, there is possibility to export your notes to the following format:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"448\" height=\"306\" src=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image.png\" alt=\"\" class=\"wp-image-1494\" style=\"width:259px;height:auto\" srcset=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image.png 448w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-300x205.png 300w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/figure>\n\n\n\n<p>Where it is possible to do import from formates as presented below. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"770\" src=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-1.png\" alt=\"\" class=\"wp-image-1495\" style=\"width:366px;height:auto\" srcset=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-1.png 724w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-1-282x300.png 282w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/figure>\n\n\n\n<p>Spoiler, Import from some applications can be very difficult (like OneNote) or surprisedly easy  like Apple Notes (where convert application can do export to md files).<\/p>\n\n\n\n<p>Joplin has two ways how you can create notes, using MarkDown (md) or\/and (wyswyg) editor. md editor has also live view version. Both use autosave. In addition for mobile app, Joplin can use draw mode, and pen can be used in separated mode.<\/p>\n\n\n\n<p>Another very useful function is synchronisation between many devices. By default it is possible to use Joplin cloud services which is the most optimised transfer option. Another few supported option contains tested by me Dropbox and Microsoft OneDrive (check below). Few self hosted options are also possible, including WebDav which was inspiration to that article. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"416\" src=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-3.png\" alt=\"\" class=\"wp-image-1501\" style=\"width:157px;height:auto\" srcset=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-3.png 320w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-3-231x300.png 231w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<p>It is possible encrypt data on the destination. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Nginx preparation as webdav.<\/h2>\n\n\n\n<p>I have prepared needed configuration using lxc and debian 11. Lxc container itself has debian 12 image version. <\/p>\n\n\n\n<p>Inside lxc container install required software:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install libnginx-mod-http-dav-ext apache2-utils nginx-full nginx-extra nginx-core<\/code><\/pre>\n\n\n\n<p>and all the other required software you like.<\/p>\n\n\n\n<p>apache2-utils is not expected in that set but it is required for htpasswd binary. <\/p>\n\n\n\n<p>Create target directory, like &#8220;\/webdav&#8221; and set required permissions<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code> mkdir -p \/webdav\/client_temp\n chown -R www-data:www-data \/webdav\n sudo chmod -R 755 \/webdav<\/code><\/pre><\/div>\n\n\n\n<p>Check if the nginx has plugin:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nginx -V 2&gt;&1 | grep -o with-http_dav_module<\/code><\/pre><\/div>\n\n\n\n<p>Create password file and user:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>htpasswd -c \/etc\/nginx\/.htpasswd user<\/code><\/pre><\/div>\n\n\n\n<p>Generate certificates:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout \/etc\/ssl\/private\/nginx-selfsigned.key -out \/etc\/ssl\/certs\/nginx-selfsigned.crt<\/code><\/pre><\/div>\n\n\n\n<p>Copy ctl content of the file and set permissions:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cat \/etc\/ssl\/certs\/nginx-selfsigned.crt\nchmod 660 \/etc\/ssl\/private\/nginx-selfsigned.key \nchmod 644 \/etc\/ssl\/certs\/nginx-selfsigned.crt <\/code><\/pre><\/div>\n\n\n\n<p>Create required config in \/etc\/nginx\/sites-enabled\/default<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>server {\n\tlisten 80 default_server;\n\tlisten [::]:80 default_server;\n\tserver_name _;\n\treturn 301 https:\/\/$host$request_uri;\n}\n\nserver {\n\tlisten 443 ssl;\n\tserver_name 192.168.22.35;\n\tssl_certificate \/etc\/ssl\/certs\/nginx-selfsigned.crt;\n\tssl_certificate_key \/etc\/ssl\/private\/nginx-selfsigned.key;\n\troot \/webdav;\n\n\tlocation \/webdav\/ {\n\t\troot \/webdav;\n\t\tclient_body_temp_path \/webdav\/client_temp;\n\t\tdav_methods PUT DELETE MKCOL COPY MOVE;\n\t\tdav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;\n\t\tcreate_full_put_path on;\n\t\tdav_access user:rw group:rw all:r;\n     \tauth_basic &quot;Restricted Access&quot;;\n\t\tauth_basic_user_file \/etc\/nginx\/.htpasswd;\n\t\tautoindex on;\n\t}\n\taccess_log \/var\/log\/nginx\/webdav_access.log;\n\terror_log \/var\/log\/nginx\/webdav_error.log;\n}\n<\/code><\/pre><\/div>\n\n\n\n<p>Check your configuration with command:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>nginx -t<\/code><\/pre><\/div>\n\n\n\n<p>Restart nginx<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>systemctl restart nginx\nsystemctl status nginx<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Joplin configuration<\/h2>\n\n\n\n<p>Copy certificate to local file where Joplin is running. <\/p>\n\n\n\n<p>Example of the configuration:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"988\" src=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-4-1024x988.png\" alt=\"\" class=\"wp-image-1505\" srcset=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-4-1024x988.png 1024w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-4-300x289.png 300w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-4-768x741.png 768w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-4.png 1248w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"1024\" src=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-5-857x1024.png\" alt=\"\" class=\"wp-image-1506\" srcset=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-5-857x1024.png 857w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-5-251x300.png 251w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-5-768x918.png 768w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-5-1286x1536.png 1286w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-5.png 1448w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<p>File joplin-webdav.crt contains certificate file.<\/p>\n\n\n\n<p>Also in case you&#8217;re using self-signed certificate (as specified in this article) set &#8220;Ignore TLS certificate errors&#8221;.<\/p>\n\n\n\n<p>In addition use Encryption to not store files on plain text files.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"362\" height=\"232\" src=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-6.png\" alt=\"\" class=\"wp-image-1507\" style=\"width:179px;height:auto\" srcset=\"https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-6.png 362w, https:\/\/www.labiol.xyz\/wp-content\/uploads\/2025\/04\/image-6-300x192.png 300w\" sizes=\"auto, (max-width: 362px) 100vw, 362px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p>Joplin is not a perfect note-taking tool, but it is good enough. Since it is opensource with planty of export\/import options. It is software I can definitely recommend. <\/p>\n\n\n\n<p>Known issues are around editor (wyswyg) which not always behave as expected (for example some html marks are visible when switching to md editor). <\/p>\n\n\n\n<p>Joplin iPad do not support self signed certificate (it is more how iPad iOS works).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Joplin may not be the most perfect note-taking application, but it is open-source, well-known, has a long release history, works on multiple operating systems, and supports plugins. It\u2019s not perfect, but it\u2019s good enough and highly usable. In case of this type of application, it is important to have &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1],"tags":[52,8,53],"class_list":["post-1493","post","type-post","status-publish","format-standard","hentry","category-linux","category-uncategorized","tag-joplin","tag-linux","tag-webdav"],"_links":{"self":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=1493"}],"version-history":[{"count":8,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1493\/revisions"}],"predecessor-version":[{"id":1508,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1493\/revisions\/1508"}],"wp:attachment":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=1493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=1493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=1493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}