byeCloud: Hosting Notes with Nextcloud

published on in category , Tags: byecloud selfhosted nextcloud

Table of contents

Notes, besides photos, are the pieces of data I care most about. I want to review them even after years, have them available on the go and make sure I never lose them. Up until now, I stored my Notes in iCloud alongside Apples Notes app. This article is part of the byeCloud series in which I try to replace iCloud with self-hosted services.

The Apple Approach To Notes

Initially, I wanted to retain this app and thought of going with IMAP Notes, which is what Apple does: They basically devote one IMAP folder to a list of mails with special headers. Those mails store the notes. While this would also work on a self-hosted mail server, I had many problems over the years, including:

  • Notes got lost moving them between mail servers (which should not be a problem at all)
  • Some mail clients don’t show the notes
  • Notes are available on one device or the other, but not on both and there’s no way to force-sync them
  • Using iCloud Notes on icloud.com is slow and ugly (this is what I would use at work to access my notes)

Since I generally try to tackle problems with the simplest possible solution, I decided to do the same here. Nextcloud has a Notes app that basically stores all notes as Markdown in plain-text files. This gives me plenty advantages:

  • Can view and edit them in almost any client
  • Force-sync possible by just syncing the Notes folder
  • Easy to backup
  • Interoperable with many other services and apps
  • No need for additional components, since I already run a Nextcloud instance. This also lets me use Nextcloud’s Trash, Versions, Sharing etc.

However, there’s also a problem. Since notes are plain-text files then, I’m not able to embed images, which I do quite often. There’s an issue open on the GitHub page of nextcloud/notes called support for attachments / images, so hopefully this will be implemented some day. Until then I just use markdown image links and put the images in the same directory. At least the Notes app I use on the desktop can understand and render this.

Installing The Notes App

Installing the notes app in Nextcloud its pretty straight forward. It’s an official app, just go to the “Apps” section, search for “Notes” and click install. Afterwards you’ll have a new menu item. There you can start creating notes. By default, Nextcloud creates a folder called Notes in your file system and also synchronizes it with your desktop & mobile using the Nextcloud Client.

Installing the Notes app in Nextcloud

Data Migration

My Notes.app contains like 50 recent notes that I use frequently. I didn’t want to copy & paste all the contents over to new files. In the Mac App Store, I found “Exporter”, which does just this:

"Export notes from Notes.app, Notes are converted to markdown & stored in plain-text format"

Some people complained that it is unable to export notes with certain contents and I also had some issues: I don’t use tables, which seem to be a problem, but I use embedded links (shows a preview of the page). Those were not exported, they were just missing in the resulting notes afterwards. So be sure to either backup your original Notes.app collection or look through the exported files to make sure you’re not missing any information!

Client side: macOS (also Windows, Linux)

At work, I currently just use the web interface to browse and write notes, since it doesn’t involve setting up any syncing on my work machine. At home I use the Nextcloud Client to synchronize all files to a local folder. For browsing and editing notes, I use iA Writer, which I bought a long time ago from the Mac App Store. It’s a simple markdown editor with many features and a great distraction-free user interface.

iA Writer on macOS editing notes from Nextcloud

Client side: iOS

I currently use CloudNotes on iOS. I’m not completely satisfied with it since it’s missing category support (subfolders in Nextcloud) and it does not render images that are linked in the note. But still it’s sufficient. In general any Markdown editor that can sync with WebDAV would work, so if you have any particular recommendation, please let me know.