Major breaking change in coming Joplin Server 2.0

The next version of Joplin Server (not yet released) will introduce a feature to share a notebook with other Joplin users on the same server. Implementing this correctly was tricky and unfortunately required a major architectural change in the way data is stored, and it means if you try to migrate from a version 1.x it won't work at all. Creating an automatic migration from v1 to v2 would have been error prone, with the risk of losing data, so instead the migration will have to be manual.

It's not too complicated but it does require re-uploading your data to the server. Here are the steps:

  • Sync all your notes, from all devices
  • From the desktop client, synchronise again to make sure you have your complete dataset
  • Export as JEX for backup
  • Upgrade the Docker image to v2
  • Upgrade the desktop client to v2
  • From the desktop client, go to Config > Synchronisation > Advanced, and click "Re-upload local data to sync target"
  • Synchronise and wait for it to complete.

Optionally, on the server, you might want to drop the "files" table to save space. Before, all Joplin data was in this table, but now it's in the "items" table, and the "files" table is no longer used so it's safe to drop it. It's not done automatically so that in case of a problem you can still get your data back from this table.

If you have any question, let me know. Note that this manual migration is exceptional and for future upgrades we'll be back to automatic migrations.

14 Likes

It's a pretty fast sync from memory so that doesn't bust balls anywhere near as much as this would have on WebDav!

Great news file sharing is in the pipeline. Any more features planned for the future for the server you can tell us about?

1 Like

At the moment, not much else is planned for the server because I think there's still a bit of work to really complete the sharing feature. In particular it would be good to allow setting user permissions - like who can read, write or delete notes. Also support for E2EE while allowing sharing hasn't been implemented yet.

1 Like

Glad to hear this is happening! When can we expect v2 to be on docker hub?

I'd like to make sure: all data is stored in the database, there are no files stored in the filesystem of the app container, right?

Yes it's all in the database, and I don't know yet when it will be released but probably in the coming days.

1 Like

Is single note public sharing (non-collaborative) supported yet?

这种需求基于现有框架(例如 hexo)就已经可以实现了,参考:Joplin note sharing tool

Yes sharing a note by link was actually already supported since previous version, and will still work in v2.

2 Likes

Is there any plan to build v2 for ARM64? @florider did it for v1, so it's possible :slight_smile:

I just wondered if the "official" build will support it. I ask as the Raspberry Pi 4 is quite capable as a sync target server and there is a RasPiOS64 image available.

I'm not familiar with ARM64, but if it can run Docker, shouldn't it just work?

Yes, we can build and push a multi architecture image for armhf and amd64 under the same tag.

1 Like

I assume that @JackGruber has given a better answer than I ever could!

I was just going by what Docker Hub shows about the two Joplin containers (yours and @florider)and the bug report on GitHub where someone reported the "official" container errors on ARM.

2021-05-12 18_09_13-Window

Happy to test a build on arm64 if it's not going to be officially supported as soon as the code's available on Github.
However, if the plan is to support it on the official image, I won't bother and just deprecate my image :slight_smile:

1 Like

How do you make it support arm64? Maybe we could indeed add it to the official Docker file if it's not too complicated.

I use buildx on Github Actions. I had to change up some of the dependencies on the current version to make the build work.
Both the dockerfile and github actions are in the repo: GitHub - flosoft/docker-joplin-server: Joplin Server docker image

2 Likes

Is it possible to beta test this right now?

The feature is merged now, so I should release the beta quite soon.

Looks like 2.0.1-beta is now on DockerHub.

Yes I'm trying it now. It seems to synchronises fine although I feel it's a bit slow but it could be my connection. You'll also need the desktop app v2 (now in pre-release) to sync with it.