|
| 1 | +#+hugo_base_dir: ~/development/web/jslmorrison.github.io |
| 2 | +#+hugo_section: posts |
| 3 | +#+options: author:nil |
| 4 | + |
| 5 | +* Synchronizing Joplin notes between devices |
| 6 | +:PROPERTIES: |
| 7 | +:EXPORT_FILE_NAME: joplin-server |
| 8 | +:EXPORT_DATE: 2024-11-16 |
| 9 | +:END: |
| 10 | + |
| 11 | +After doing a bit of research on several of the note taking apps available, I decided on [[https://joplinapp.org/][Joplin]] to be the next one I intend to use for several reasons. |
| 12 | + |
| 13 | +#+begin_quote |
| 14 | +Joplin is an excellent open source note taking application with plenty of features. You can take notes, make to-do list and sync your notes across devices by linking it with cloud services. The synchronization is protected with end to end encryption. |
| 15 | +#+end_quote |
| 16 | + |
| 17 | +#+hugo: more |
| 18 | + |
| 19 | +Having the ability to sync notes between devices is one of the main reasons I wanted to learn more about taking notes using Joplin, which can use more than one sync target, that being either a Joplin server, WebDAV server or Nextcloud instance. |
| 20 | + |
| 21 | +I decided to go with Joplin server installed on a machine in my internal network. These are the steps required to get that up and running, assuming dedicated LXC container already exists and has [[https://www.docker.com/][Docker]] installed: |
| 22 | + |
| 23 | +- Create a =compose.yaml= file with the following default content: |
| 24 | +#+begin_src yaml :no-expand |
| 25 | +services: |
| 26 | + db: |
| 27 | + image: postgres:16 |
| 28 | + volumes: |
| 29 | + - ./data/postgres:/var/lib/postgresql/data |
| 30 | + ports: |
| 31 | + - "5432:5432" |
| 32 | + restart: always |
| 33 | + environment: |
| 34 | + - POSTGRES_PASSWORD=strong-password |
| 35 | + - POSTGRES_USER=joplin-user |
| 36 | + - POSTGRES_DB=joplindb |
| 37 | + app: |
| 38 | + image: joplin/server:latest |
| 39 | + container_name: joplin-server |
| 40 | + depends_on: |
| 41 | + - db |
| 42 | + ports: |
| 43 | + - "8080:8080" |
| 44 | + restart: always |
| 45 | + environment: |
| 46 | + - APP_PORT=8080 |
| 47 | + - APP_BASE_URL=https://joplin.example.com |
| 48 | + - DB_CLIENT=pg |
| 49 | + - POSTGRES_PASSWORD=strong-password |
| 50 | + - POSTGRES_DATABASE=joplindb |
| 51 | + - POSTGRES_USER=joplin-user |
| 52 | + - POSTGRES_PORT=5432 |
| 53 | + - POSTGRES_HOST=db |
| 54 | +#+end_src |
| 55 | + |
| 56 | +Modify the database credentials and base url to suit your own setup. |
| 57 | + |
| 58 | +- Start the container services: |
| 59 | +#+begin_src bash :no-expand :noeval |
| 60 | +docker compose up -d |
| 61 | +#+end_src |
| 62 | + |
| 63 | +- Login to the web UI via browser on the url defined in =APP_BASE_URL=. The default username and password are [email protected]= and =admin= respectively. |
| 64 | + At this point you can and should change the default credentials to something more secure. |
| 65 | + |
| 66 | +** Syncing between devices |
| 67 | +In order to sync notes between devices, go to =Tools > Options > Synchronisation= from within the Joplin app on each device and enter the appropriate Joplin server url and user credentials. |
| 68 | + |
| 69 | +More details on the synchronization process can be found in the [[https://joplinapp.org/help/dev/spec/sync][official docs here]]. |
0 commit comments