Skip to content

IMPORTANT NOTICE:

We received some bad news in September 2024: MongoDB has deprecated the database synchronisation feature without notifying our developers, and Paperlib's multi-device synchronisation heavily relies on this. Currently, new users can no longer follow the tutorial below to synchronise data across multiple devices. Existing users will still be able to use the synchronisation feature until Sep 2025.

We understand that this will have a significant impact on many users' experiences.

In response, we are developing our own synchronisation server. We will complete this feature as soon as possible.

Cloud Sync


We have two things to sync: 1. metadata of papers, 2. PDF files.

For metadata, we can use MongoDB Atlas as the cloud database backend. For PDF files, we recommand to use onedrive (or dropbox etc.) or webDAV to sync your PDF files accross devices.

About why can't you use webdav/dropbox... to sync metadata:

  1. Cloud storage services are designed for files, not for databases. They cannot merge conflict and the sync delay usually occurs. For example you modified something on PC A, then you modified something on PC B, but without the network connection. Once you connect PC B with network, how to merge these two databases?
  2. We need a powerful database for fast searching.
  3. When an APP is reading a database file, there is a file lock. It means that the cloud storage service such as OneDrive will never sync the database file until you exit the APP. So , even if conflict merging does not become a problem, you must ensure that you remember to exit the software in time on any computer. Imagine you forget to close the software on PC B, but leave PC B and go to PC A. You will never be able to access the changes you made on PC B.

Paperlib use MongoDB Atlas as the cloud database backend. You can create your own cloud database and use it to sync your Paperlib data across your devices. The free tier of MongoDB Atlas is enough for Paperlib. When everything is set up, you can safely store the metadata of your papers in the cloud without any maintenance operation.

Create a MongoDB Atlas DB

  1. Open https://account.mongodb.com/account/login, sign up and login to your account. Close all the guides and click Create.

  1. Choose the free dataset plan. Uncheck the two options in the red box. Select the best server location according to your country. Click Create Deployment.

  1. Close the popup window.

  1. Go to the App Services page, create an APP.

  1. Make sure the Data Source is the one you just created. Select the location for deployment. Click Create App.

  1. Close the popup window.

7.Since then, the MongoDB Atlas is ready.

Create a User

A User is a person who can access the cloud database.

  1. In App Services page, click App Users, click Authentication Providers.

  1. Turn on the Email Password Authentication. Choose Automatically confirm users as the user confirmation method. Password Reset URL is not required, just leave a random URL. Click Save Draft.

  1. Click the upper banner REVIEW DRAFT & DEPLOY to apply previous settings.

  1. Back to the User page, Click Add New User to create a user.

  1. Sinc then, you've created a user.

Create a Data Table.

The data schema can be automatically created based on the data sent by the Paperlib APP.

  1. In the Device Sync page, click Start Sync. It enables the your APP to sync data with the backend database cluster. In the popup dialog, click No thanks, continue to Sync.

  1. Open the Development Mode to allow MongoDB Altas automatically create data schema based on the data sent by the Paperlib APP. Other configurations are as shown below. Leave the Queryable Fields setting as default.

  1. Click Enable Sync.

  2. Click the upper banner REVIEW DRAFT & DEPLOY again.

  3. In the popup dialog, choose Users can read and write all data.

  4. Click the upper banner REVIEW DRAFT & DEPLOY again.

  5. Since then, the cloud database is ready.

Connect Paperlib to your MongoDB Atlas DB

  1. Open the preference window of Paperlib, click Cloud tab, input your MongoDB Atlas APP ID, email and password of the user you created.

  1. Turn on the Flexible Sync.

  1. Click Login. If the sync is successful, you can see some writing logs after importing a paper to Paperlib.


Now, everthing is ready, enjoy Paperlib with cloud sync.

Sync PDF Files

Since PDF storage may cost a lot of cloud space, we recommand to use onedrive (or dropbox etc.) or webDAV to sync your PDF files accross devices.

For example, on device A, choose C:/Onedrive/mypaperlib as your library folder. On the other device B, choose /user/xxx/Onedrive/mypaperlib as the library folder.

Created by Future Scholars. Contact: hi@paperlib.app