NS8-Joplin Server App

In relation to this: Joplin Server Edition - Feature - NethServer Community

Hello Nethserver Community,

We have a New Toy to Play with On Nethserver 8.

ShoutOut to @danb35 Who got me using this App on Nethserver, and Since we are migrating to NS8, it was only fair i got this app on NS8 as well.

The module can be found here: joplin versions · compgeniuses (github.com)

Installing: add-module ghcr.io/compgeniuses/joplin:latest 1

For Testing: add-module ghcr.io/compgeniuses/joplin:1.0.0-beta1 1

After installing, go to the App Setting Screen

Enter your Domain

You should be presented with the login Screen

Default Credentials Are:

  • Email: admin@localhost
  • Password: admin

You SHould be presented with A Dashboard

**Test Cases Before Release**
Test Case 1 - Confirm if Sync is happening

Change Admin Login Credentials
Confirmation Emails will be Under Emails…
adjust Sync location on your Joplin Client Instance


Works great on my end
image

Test Case 2 - Confirm Backup Restore works

Backup the Module, then try to restore.

Test Case 3 - Clone Module
Confirm if Module cloning works Fine.

Todo
Figure out SMTP for sending of Emails

I know these are the settings, need to pass smarthost settings, and or Add option for user to configure

MAILER_ENABLED=1
MAILER_HOST=smtp.gmail.com 12
MAILER_PORT=587
MAILER_SECURITY=starttls
MAILER_AUTH_USER=my_email_address
MAILER_AUTH_PASSWORD=my_password
MAILER_NOREPLY_NAME=JoplinServer
MAILER_NOREPLY_EMAIL=my_email_address
8 Likes

:clap: Thank you for this module, Martin!

I never tested https://joplinapp.org/ but looks a nice collaborative tool, “open source note taking application”!

I can’t test it now, but I’m sure other Nethserverians want to lend an hand to validate the module before adding it to NethForge.

2 Likes

its a wonderful note taking application available on your desktop as well as on your phone.

the bet features are being able to collaborate on the same document ith someone else on your server

and the ability to publish Notes that you have been working on. they will be available on the internet for users to see, and you can unpublish them when no longer required.

1 Like

Could someone Else kindly help test backup restore, Update upgrade procedure for this App kindly

1 Like

Note: update/upgrade: untested

ns8-joplinserver v1.0.3

:white_check_mark: Test Case 1 - Synchronization
image


𐄂 Test Case 2 - Backup Restore
In-place Restore / Restore to new instance: both failed in the same way (new empty instance created alongside the original one and same errors on logs):
image

image

restic dump latest state/environment
Assertion failed
  File "/var/lib/nethserver/cluster/actions/restore-module/50restore_module", line 93, in <module>
    agent.assert_exp(restore_task_result['exit_code'] == 0)
<7>dump_env() is deprecated and implemented as a no-op
restic restore latest --target . --exclude state/environment
Trying to pull ghcr.io/nethserver/restic:2.5.5...
Getting image source signatures
Copying blob sha256:ccd15ec35a55c72323b554c3bde65171991ba9bb19a7175aba75f96714761a4b
Copying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf
Copying config sha256:fd6e01af38514f98c338ef39a62c22388754a95fd7c9a14291123e16c696c08e
Writing manifest to image destination
restoring <Snapshot 6fc22c67 of [/srv/volumes/postgres-data /srv/state/database.env /srv/state/environment] at 2024-03-22 20:15:43.448719877 +0000 UTC by root@test1> to .
mkdir: created directory 'restore'
/home/joplin2/.config/actions/restore-module/40restore-postgres.sh: line 23: joplin.pg_dump: No such file or directory
2024-03-22T21:19:19+01:00 [1:joplin2:agent@joplin2] mkdir: created directory 'restore'
2024-03-22T21:19:19+01:00 [1:joplin2:agent@joplin2] /home/joplin2/.config/actions/restore-module/40restore-postgres.sh: line 23: joplin.pg_dump: No such file or directory
2024-03-22T21:19:19+01:00 [1:joplin2:agent@joplin2] task/module/joplin2/6f7970dc-415f-40e1-9254-36acfc6bc414: action "restore-module" status is "aborted" (1) at step 40restore-postgres.sh

𐄂 Test Case 3 - Clone Module: Failed (new “empty” instance created alongside the original):
image

cluster/clone-module
Task module/joplin5/clone-module run failed: {'output': '', 'error': '<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5\nTrying to pull ghcr.io/nethserver/rsync:2.5.5...\nGetting image source signatures\nCopying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c\nCopying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf\nCopying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\nWriting manifest to image destination\n046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\n<7>podman volume create restic-cache\nrestic-cache\n<7>podman volume create postgres-data\npostgres-data\n<7>podman run --rm --privileged --network=host --workdir=/srv --env=RSYNCD_NETWORK=10.5.4.0/24 --env=RSYNCD_ADDRESS=cluster-localnode --env=RSYNCD_PORT=20030 --env=RSYNCD_USER=joplin4 --env=RSYNCD_PASSWORD=10486f8dbcdaa-87f9-471d-8602-171229ecb245 --env=RSYNCD_SYSLOG_TAG=joplin5 --volume=/dev/log:/dev/log --volume=/home/joplin5/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5\nImporting APP_BASE_URL from source instance\nImporting APP_PORT from source instance\nImporting TRAEFIK_HOST from source instance\nImporting TRAEFIK_HTTP2HTTPS from source instance\nImporting TRAEFIK_LETS_ENCRYPT from source instance\nTraceback (most recent call last):\n  File "/home/joplin5/.config/actions/clone-module/50traefik", line 14, in <module>\n    renv = request[\'environment\']\n           ~~~~~~~^^^^^^^^^^^^^^^\nKeyError: \'environment\'\n', 'exit_code': 1}
Task module/joplin4/transfer-state run failed: {'output': '', 'error': '<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5\nTrying to pull ghcr.io/nethserver/rsync:2.5.5...\nGetting image source signatures\nCopying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c\nCopying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf\nCopying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\nWriting manifest to image destination\n046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a\nDialling 10.5.4.1:20030...\n<7>[Errno 111] Connection refused\nConnection with 10.5.4.1:20030 established: the server is ready.\n<7>cp -v environment environment.clone-module\n\'environment\' -> \'environment.clone-module\'\n<7>systemctl --user show default.target -p Wants --value\n<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-payload --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/\n<7>systemctl --user isolate transfer-state.target\n<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --delete-after --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/\nfile has vanished: "/srv/volumes/postgres-data/postmaster.pid"\nrsync warning: some files vanished before they could be transferred (code 24) at main.c(1336) [sender=3.2.7]\n<3>[ERROR] rsync transfer error 24\n<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD ghcr.io/nethserver/rsync:2.5.5 rsync -q rsync://joplin4@10.5.4.1:20030/terminate\n<7>systemctl --user isolate default.target\n', 'exit_code': 1}
cluster/clone-module
<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5
Trying to pull ghcr.io/nethserver/rsync:2.5.5...
Getting image source signatures
Copying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c
Copying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf
Copying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
Writing manifest to image destination
046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
<7>podman volume create restic-cache
restic-cache
<7>podman volume create postgres-data
postgres-data
<7>podman run --rm --privileged --network=host --workdir=/srv --env=RSYNCD_NETWORK=10.5.4.0/24 --env=RSYNCD_ADDRESS=cluster-localnode --env=RSYNCD_PORT=20030 --env=RSYNCD_USER=joplin4 --env=RSYNCD_PASSWORD=10486f8dbcdaa-87f9-471d-8602-171229ecb245 --env=RSYNCD_SYSLOG_TAG=joplin5 --volume=/dev/log:/dev/log --volume=/home/joplin5/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5
Importing APP_BASE_URL from source instance
Importing APP_PORT from source instance
Importing TRAEFIK_HOST from source instance
Importing TRAEFIK_HTTP2HTTPS from source instance
Importing TRAEFIK_LETS_ENCRYPT from source instance
Traceback (most recent call last):
  File "/home/joplin5/.config/actions/clone-module/50traefik", line 14, in <module>
    renv = request['environment']
           ~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'environment'
cluster/transfer-state
<7>podman-pull-missing ghcr.io/nethserver/rsync:2.5.5
Trying to pull ghcr.io/nethserver/rsync:2.5.5...
Getting image source signatures
Copying blob sha256:12d5f4ef1f93597dd37040f3fb0e0ccb751db7afa0bda1b507f5a9586c05b17c
Copying blob sha256:82e94dfc42a5139b349717d0ef16203b01c32a0a5c61b3b3c034e6a329868fbf
Copying config sha256:046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
Writing manifest to image destination
046c033bcb0782399a373c81d6504ae383dca7d686efb03ddfb478dd8079ec0a
Dialling 10.5.4.1:20030...
<7>[Errno 111] Connection refused
Connection with 10.5.4.1:20030 established: the server is ready.
<7>cp -v environment environment.clone-module
'environment' -> 'environment.clone-module'
<7>systemctl --user show default.target -p Wants --value
<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-payload --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/
<7>systemctl --user isolate transfer-state.target
<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD --volume=/home/joplin4/.config/state:/srv/state --volume=postgres-data:/srv/volumes/postgres-data --volume=restic-cache:/srv/volumes/restic-cache ghcr.io/nethserver/rsync:2.5.5 rsync -a --info=progress2 --delete-after --exclude=/state/agent.env --exclude=/state/environment --exclude=/state/apitoken.cache ./ rsync://joplin4@10.5.4.1:20030/data/
file has vanished: "/srv/volumes/postgres-data/postmaster.pid"
rsync warning: some files vanished before they could be transferred (code 24) at main.c(1336) [sender=3.2.7]
<3>[ERROR] rsync transfer error 24
<7>podman run -i --workdir=/srv --rm --network=host --privileged --name=transfer-state-send --env=RSYNC_PASSWORD ghcr.io/nethserver/rsync:2.5.5 rsync -q rsync://joplin4@10.5.4.1:20030/terminate
<7>systemctl --user isolate default.target

Confirmation that notes and uploaded files are stored:

Sharing works: image

3 Likes

Same here, simply installed it and left it. BUT, I saw many log entries that bothered me because I needed a cleaner log, so I removed it for now. It seems it claims a bit of attention.

1 Like

thanks for the test,s let me look into them see how to resolve

To put it on this topic as well: You no doubt knew I was running Joplin server on my NS7 server using docker-compose. That stores the Postgres database in the filesystem. It’d be very nice to have a way to migrate that data to your app.

I don’t know PostgreSQL well at all–with MySQL/MariaDB, the simple way to do this would be mysqldump, followed by importing the resulting text file. But I don’t know what the equivalent would be with pgsql.

Hi @danb35

A sample from Zabbix, using PGSQL…

pg_dump -h localhost -U zabbix zabbix > zabbix-cleaned-db.sql

psql -h localhost -U zabbix zabbix < zabbix-cleaned-db.sql

→ Not that much different from MariaDB… :slight_smile:

Hope this helps

My 2 cents
Andy

2 Likes

Can anyone show me the steps on how to configure the SMTP server for Joplin so that I can use my own mail server on NS8?

Thanks in advance…

Uwe

Can’t anyone help?

cc: @oneitonitram

1 Like

Hi @transocean we have hard mixed results with the SMTP settings for the JoplinApp.
At the moment, you can get the code sent on the admin dashboard under sent messages.

other than that, We will be looking into the matter more deeply to understand the disconnect source.

We should be good to go, once we re-deploy our testing server

Hi @oneitonitram

Ok… But there is another question. If I change the password for the admin, this works, but has to be repeated after rebooting the server. What is the reason for this?

Edit:

And every new created user also ended up in Nirvana after a reboot of the server.

am not sure, might have to look at default defined country if available for config via env

@oneitonitram

Any new information regarding the problem?

Regards…

Uwe

we do not at the moment have a testin server, thats why most responses and actions n our side are abit slowed.

Working to have it availed, to resume on the works we’ve been doing.