Error restoring Joplin

What app is this about, and its version: Joplin, v3.4.12~ynh2
What YunoHost version are you running: 12.1.32
What type of hardware are you using: VPS bought online

Describe your issue

Hi there,

(sorry for using the _other tag, but for some reason, the joplin tag does not seem to be available).

I am trying to migrate my Yunohost installation from a VPS to another one. To that aim, I used Borg to backup the config and the individual applications. After a successful config restoration on the new VPS, I started restoring every app individually. Everything worked fine, except the restoration of Joplin.

The error logs of the restoration are available below.

Here is a selected extract of the last lines:

2025-10-24 12:32:03,798: DEBUG - + systemctl start joplin
2025-10-24 12:32:03,831: DEBUG - + [[ -n App: Call this for testing ]]
2025-10-24 12:32:33,130: WARNING - (this may take some time)
2025-10-24 12:37:04,853: DEBUG - + '[' 300 -ge 3 ']'
2025-10-24 12:37:04,853: DEBUG - + '[' 300 -eq 300 ']'
2025-10-24 12:37:04,853: DEBUG - 
2025-10-24 12:37:04,853: DEBUG - + ynh_print_warn 'The service joplin didn'\''t fully execute the action start before the timeout.'
2025-10-24 12:37:04,854: DEBUG - + ynh_print_warn 'Please find here an extract of the end of the log of the service joplin:'
2025-10-24 12:37:04,854: DEBUG - + journalctl --quiet --no-hostname --no-pager --lines=20 --unit=joplin
2025-10-24 12:37:04,854: WARNING - The service joplin didn't fully execute the action start before the timeout.
2025-10-24 12:37:04,854: WARNING - Please find here an extract of the end of the log of the service joplin:
2025-10-24 12:37:04,860: WARNING - Oct 24 11:57:11 systemd[1]: Started joplin.service - Joplin server.
2025-10-24 12:37:04,860: WARNING - Oct 24 11:57:11 (node)[137143]: joplin.service: Failed to locate executable /opt/node_n/n/versions/node/22.20.0/bin/node: No such file or directory
2025-10-24 12:37:04,860: WARNING - Oct 24 11:57:11 (node)[137143]: joplin.service: Failed at step EXEC spawning /opt/node_n/n/versions/node/22.20.0/bin/node: No such file or directory
2025-10-24 12:37:04,860: WARNING - Oct 24 11:57:11 systemd[1]: joplin.service: Main process exited, code=exited, status=203/EXEC
2025-10-24 12:37:04,860: WARNING - Oct 24 11:57:11 systemd[1]: joplin.service: Failed with result 'exit-code'.
2025-10-24 12:37:04,861: WARNING - Oct 24 12:17:48 systemd[1]: Started joplin.service - Joplin server.
2025-10-24 12:37:04,861: WARNING - Oct 24 12:17:48 (node)[140160]: joplin.service: Failed to locate executable /opt/node_n/n/versions/node/22.20.0/bin/node: No such file or directory
2025-10-24 12:37:04,861: WARNING - Oct 24 12:17:48 (node)[140160]: joplin.service: Failed at step EXEC spawning /opt/node_n/n/versions/node/22.20.0/bin/node: No such file or directory
2025-10-24 12:37:04,861: WARNING - Oct 24 12:17:48 systemd[1]: joplin.service: Main process exited, code=exited, status=203/EXEC
2025-10-24 12:37:04,861: WARNING - Oct 24 12:17:48 systemd[1]: joplin.service: Failed with result 'exit-code'.
2025-10-24 12:37:04,862: WARNING - Oct 24 12:32:03 systemd[1]: Started joplin.service - Joplin server.
2025-10-24 12:37:04,862: WARNING - Oct 24 12:32:03 (node)[2475]: joplin.service: Failed to locate executable /opt/node_n/n/versions/node/22.20.0/bin/node: No such file or directory
2025-10-24 12:37:04,862: WARNING - Oct 24 12:32:03 (node)[2475]: joplin.service: Failed at step EXEC spawning /opt/node_n/n/versions/node/22.20.0/bin/node: No such file or directory
2025-10-24 12:37:04,862: WARNING - Oct 24 12:32:03 systemd[1]: joplin.service: Main process exited, code=exited, status=203/EXEC
2025-10-24 12:37:04,862: WARNING - Oct 24 12:32:03 systemd[1]: joplin.service: Failed with result 'exit-code'.

It seems to me that the restoration script does not install nodejs appropriately.

As a workaround, I tried installing & removing the app by hand beforehand

If my diagnosis is correct, I can happily report a bug on the app’s repo (GitHub - YunoHost-Apps/joplin_ynh: Joplin server package for YunoHost). But maybe I am missing something.

Any help of insight would be greatly appreciated :slight_smile:

Share relevant logs or error messages

https://paste.yunohost.org/raw/acokofiyeh

Hello @sssammm
Could you try this

N_PREFIX=/opt/node_n/ /usr/share/yunohost/helpers.v2.1.d/vendor/n/n install 22.20.0

and try restoring joplin.
Could you share here the output of

yunohost tools regen-conf apt --dry-run --with-diff
1 Like

Hi @otm33

Thanks a lot for your help & your very quick reply!

Unfortunately, running the command (as root) and try restoring Joplin again didn’t work. Here is the output of the command:

# N_PREFIX=/opt/node_n/ /usr/share/yunohost/helpers.v2.1.d/vendor/n/n install 22.20.0
  installing : node-v22.20.0
       mkdir : /opt/node_n/n/versions/node/22.20.0
       fetch : https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-x64.tar.xz
     copying : node/22.20.0
   installed : v22.20.0

And the full log of the restoration is here:

https://paste.yunohost.org/raw/yevajinuni

The command yunohost tools regen-conf apt --dry-run --with-diff returned nothing.

Well…
Try installing 22.21.0 and restoring (don’t think it will work but…)

N_PREFIX=/opt/node_n/ /usr/share/yunohost/helpers.v2.1.d/vendor/n/n install 22.21.0

and share the output of ls -l /opt/node_n/n/versions/node/

Thanks for your patience @otm33. Unfortunately, this didn’t work either. Noe 22.20.0 seems to be required anyway:

https://paste.yunohost.org/raw/aqugowoyib

I basically get nothing when running the command after installation:

ls -l /opt/node_n/n/versions/node/
total 0

But node seems to be installed correctly beforehand:

root@host:~# N_PREFIX=/opt/node_n/ /usr/share/yunohost/helpers.v2.1.d/vendor/n/n install 22.21.0
  installing : node-v22.21.0
       mkdir : /opt/node_n/n/versions/node/22.21.0
       fetch : https://nodejs.org/dist/v22.21.0/node-v22.21.0-linux-x64.tar.xz
     copying : node/22.21.0
   installed : v22.21.0
root@host:~# ls -l /opt/node_n/n/versions/node/
total 4
drwxr-xr-x 6 root root 4096 Oct 24 15:35 22.21.0

I understand that backup installs 22.21 and removes 22.20 but service conf file is not updated and expects 22.20… a vicious cycle.

I can suggest a risky operation that I’ve only tested with another app (Etherpad): going into the service file inside the archive and changing the version of Node.js it expects to find on the server.

  1. Make a copy of the archive (in the folder /home/yunohost.backup/archives):
cp -pr archive.tar joplinarchivecopy.tar
  1. Check the Node version used by the archive:
tar -xOf joplinarchivecopy.tar apps/joplin/backup/etc/systemd/system/joplin.service
  1. extract this file
tar -xvf joplinarchivecopy.tar apps/joplin/backup/etc/systemd/system/joplin.service
  1. modify the nodejs version in joplin.service :
nano apps/joplin/backup/etc/systemd/system/joplin.service` ## 22.21.0 instead of 22.20.0 in ExecStart and Environment)

[edit] no settings folder in joplin archive so steps 5 and 6 cannot be runned :

  1. calculate the checksum of this modified file : md5sum apps/xxxxx/backup/etc/systemd/system/xxxxx.service and copy the value

  2. edit settings.yml apps/xxxx/settings/settings.yml and change the checksum for etc_system… xxxxx.service`


  1. update the archive with the modified file(s)
tar --update -f joplinarchivecopy.tar apps/joplin/backup/etc/systemd/system/joplin.service
tar --update -f joplinarchivecopy.tar apps/xxxx/settings/settings.yml

You can remove the extracted apps folder in archives, cross fingers and try to restore joplin form webadmin where jopliarchivecopy.tar should appear…
I will run a test with joplin but I need to install it, upgrade it etc…

[edit] I forgot a step (n° 3) and steps 5 and 6 can be skipped because settings folder is not available in joplin archive.

Thanks @otm33. It worked like a charm! To recap, here are the commands I used:

  1. Copy archive: cp auto_joplin.tar joplin-copy.tar
  2. Examine node version: `tar -xOf joplin-copy.tar apps/joplin/backup/etc/systemd/system/joplin.service
  3. Extract service file tar -xvf auto_joplin.tar apps/joplin/backup/etc/systemd/system/joplin.service
  4. Replace the node version in apps/joplin/backup/etc/systemd/system/joplin.service by 22.21.0
  5. Update the copy with tar --update -f joplin-copy.tar apps/joplin/backup/etc/systemd/system/joplin.service
  6. Restore the app with yunohost backup restore joplin-copy.tar --apps

Do you think it is worth opening a bug on the app repo?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.