others-how to write your notes in markdown and sync in your self-hosted personal cloud service?

1. Purpose

In this post, I will show you how to write your notes in markdown and sync in your self-hosted personal cloud service.

2. Solution

The total solution is as follows:

2.1 What is joplin?

In today’s world, there are so many notebook apps that you can choose, e.g. the evernote, onenote, etc. I recommend you to try joplin, an open source notebook app that you can use it as your private notebook service, without ads and fees:

  • It is completely open source and has a relatively active developer community. This means that problems can be reported to the community. Since I am a programmer myself, I can also locate and fix problems myself if necessary
  • It supports Markdown syntax
  • All data are stored locally, and notes can be exported at any time
  • Supports all terminals (windows / macOS / Linux / Android / iOS, even has a command line interface)
  • Synchronization is supported, you need to set up the synchronization server yourself. Joplin itself does not provide any server resources (but recently it also provides a paid Joplin Cloud service. If you are not interested, just ignore it and it will not affect any user experience). And when synchronizing, all content can be encrypted and then uploaded to the server
  • There is a browser plug-in that makes it easy to bookmark content on a web page

To summarize, it’s a note app that support markdown, all types of devices, and you can choose plugins to meet your personal requirements.

To install joplin, you can just download it by visiting https://joplinapp.org/download/ in your personal computer, or you can find the joplin app on iOS app store or Google play store.

2.2 What is webDAV?

Now you can joplin installed, then you can write down your first markdown note in it. But how to synchronize data between devices?

Here comes the webDAV.

What is webDAV? WebDAV is a set of technologies based on hypertext transfer protocol(http), which is conducive to collaborative editing and management of documents stored on World Wide Web servers among users.

In layman’s terms, WebDAV is an Internet method. Using this method, a storage space can be set aside on the server, and user names and passwords can be used to control access, allowing users to directly store, download, and edit files.

Here we choose the webdav as our private webDAV server. It’s a dedicated webDAV service that can run on your private VPS server. It’s very simple and easy to use.

Download it from : https://github.com/hacdias/webdav/releases , Extract the tar.gz to /opt/hacdias_webdav and create a directory :

mkdir /opt/hacdias_webdav/user_data

and then prepare a config file /opt/hacdias_webdav/config.yml:

# Server related settings
address: 0.0.0.0
port: 5432
auth: true
tls: false
cert: cert.pem
key: key.pem
prefix: /
debug: false

# Default user settings (will be merged)
scope: .
modify: true
rules: []


users:
  - username: admin
    password: "{bcrypt}xxxxx"
    scope: /opt/hacdias_webdav/user_data

You can generate your password online by using this site: https://bcrypt-generator.com/

Then start it:

./webdav --config /opt/hacdias_webdav/config.yml

2.3 How to synchronize notes between devices?

Just open preferences in joplin, and configure the synchronization settings as follows:

Now you can write note in one place and synchronize it in another device. Cool.

3. Summary

In this post, I demonstrated how to write markdown notes in joplin and syncronize it across devices using webdav service, the whole tech stacks are under your control. That’s it, thanks for your reading.