# Simple instructions for Joplin server upgrade

**URL:** <https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343>\
**Category:** Support\
**Created:** [29 June 2021 21:01 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343 "2021-06-29T21:01:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [29 June 2021 21:01 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/1 "2021-06-29T21:01:28Z")

</div>

I installed the docker Jopiln server using these instructions:

> [@Guide for Joplin-Server on Raspberry Pi](https://discourse.joplinapp.org/t/guide-for-joplin-server-on-raspberry-pi/14702):
>
> Hi, this is an extensive guide on how to host your own Joplin server on a Raspberry Pi. I had a setup like this running on a Pi 4 and a Pi 5. Technically it would also work on Pi 3 models which support 64-bit operating systems. If you spot any mistakes, please reply to me! The guide was updated on 11.06.2025. 1 Dynamic DNS If you don't get a static IP address from your ISP, you will need a Dynamic DNS service. This sets a hostname which will be redirected to your IP. There are a lot of pro…

(version 1.8.5)

Is there a simple way to upgrade the server without losing data/notes?

---

<div class="post-metadata">

**Author:** ![MrKanister](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mrkanister/32/20054_2.png) [@MrKanister](https://discourse.joplinapp.org/u/MrKanister)\
**Post date:** [30 June 2021 04:44 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/2 "2021-06-30T04:44:09Z")

</div>

This topic was discussed a lot in another thread and I still don't know if I got everything right. As I understood it, if you use the original Docker Version by laurent, the database is not persistent, so you lose your sever data on an update. The version that I linked in the guide is the inofficial one by florider and his version has got a persistent database, so you can (and I already did it serveral times) really easy follow the 10th step on the guide and won't lose any data.

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [30 June 2021 12:14 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/3 "2021-06-30T12:14:30Z")

</div>

Well, did that with florider version and all data was wiped out (empty directories). Fortunately I took a backup but returning it is a loooong process (I have ~10k notes). Dang.

---

<div class="post-metadata">

**Author:** ![MrKanister](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mrkanister/32/20054_2.png) [@MrKanister](https://discourse.joplinapp.org/u/MrKanister)\
**Post date:** [30 June 2021 13:55 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/4 "2021-06-30T13:55:31Z")

</div>

Hm, so I did it several times without loosing data...did you upgrade from 1.x to 2.x?

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [30 June 2021 14:14 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/5 "2021-06-30T14:14:10Z")

</div>

Yes 1.x -\> latest.

```auto
kjwiik@hajala:~/joplin-server$ docker-compose down
Stopping joplin-server_app_1 ... done
Stopping joplin-server_db_1 ... done
Removing joplin-server_app_1 ... done
Removing joplin-server_db_1 ... done
Removing network joplin-server_default

```

Database and data was wiped out.

```auto
image: florider89/joplin-server:latest

```

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [30 June 2021 14:17 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/6 "2021-06-30T14:17:31Z")

</div>

I think this is very bad behaviour: every time you have to upgrade, everything is wiped out. I makes not much sense because I guess data format does not change.

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [30 June 2021 14:31 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/7 "2021-06-30T14:31:20Z")

</div>

I restarted the server and everything looks normal except for an error

```auto
2021-06-30 14:28:50: [error] App: TypeError: Cannot read property 'id' of null

```

It repeats every couple of minutes, probably not related to this problem.

---

<div class="post-metadata">

**Author:** ![MrKanister](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mrkanister/32/20054_2.png) [@MrKanister](https://discourse.joplinapp.org/u/MrKanister)\
**Post date:** [30 June 2021 14:31 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/8 "2021-06-30T14:31:57Z")

</div>

As written on the docker page by [florider89](https://hub.docker.com/r/florider89/joplin-server):

> Note that data will not be migrated - and you need to start fresh again as explained in the forum post.

Again: The Database is persistent in those versions. But from v1 to v2 the location where the data is being stored changed.

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [30 June 2021 14:42 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/9 "2021-06-30T14:42:04Z")

</div>

Ah, I have missed that page, so data is preserved between minor versions but not major. Thanks for the clarification. The new version seems to be working ok. By the way, is there a way to get the version of the server?

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [30 June 2021 15:54 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/10 "2021-06-30T15:54:29Z")

</div>

Now I got the

```auto
Not allowed: PUT (Code 400)

```

error. Doh...

```auto
Joplin 2.1.7 (prod, linux)

Client ID: 6d6d2b5eb2c94cbdb6b702ea92087ca8
Sync Version: 2
Profile Version: 39
Keychain Supported: No

Revision: 04c4015

```

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [30 June 2021 16:10 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/11 "2021-06-30T16:10:19Z")

</div>

I tried to

```auto
kjwiik@hajala:~/joplin-server$ docker-compose down
Stopping joplin-server_app_1 ... done
Stopping joplin-server_db_1 ... done
Removing joplin-server_app_1 ... done
Removing joplin-server_db_1 ... done
Removing network joplin-server_default

```

and again all settings (new user) was lost. This does not look very deterministic?

It seems that the florider image is not working at all anymore, next I'll dump it and try the 'official' one.

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [1 July 2021 09:30 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/12 "2021-07-01T09:30:51Z")

</div>

It seems (also from a couple of threads in Discourse) that the correct incantation in `docker-compose.yml` **at the moment** is

```auto
    app:
        image: joplin/server:2.1.6-beta

```

Now everything seems to work except I get (possibly harmless) error messages like

```auto
app_1 | 2021-07-01 09:24:59: [error] App: 404: GET /api/files/root:/notes/.sync/version.txt:/content : Path not found: api/files/root:/notes/.sync/version.txt:/content
app_1 | 2021-07-01 09:24:59: [error] App: 400: POST /api/files/root:/notes:/children : Not allowed: POST 
app_1 | 2021-07-01 09:24:59: App: POST /api/files/root:/notes:/children (1ms)
app_1 | 2021-07-01 09:25:03: [error] App: 400: POST /api/files/root:/notes:/children : Not allowed: POST 
app_1 | 2021-07-01 09:25:03: App: POST /api/files/root:/notes:/children (1ms)

```

---

<div class="post-metadata">

**Author:** ![manouchk](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/manouchk/32/6505_2.png) [@manouchk](https://discourse.joplinapp.org/u/manouchk)\
**Post date:** [1 July 2021 15:55 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/13 "2021-07-01T15:55:20Z")

</div>

Shouldn't it be version 2.1.7?

> **[Release v2.1.7 · laurent22/joplin](https://github.com/laurent22/joplin/releases/tag/v2.1.7)**
>
> If you use the Web Clipper do not upgrade to this version yet as it is not compatible with the old clipper. A new version of the clipper has been published to the stores but it may take a few days ...

---

<div class="post-metadata">

**Author:** ![AdminByTheBay](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@AdminByTheBay](https://discourse.joplinapp.org/u/AdminByTheBay)\
**Post date:** [1 July 2021 16:59 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/14 "2021-07-01T16:59:00Z")

</div>

That is the desktop client release, not server release.

See:

[https://hub.docker.com/r/joplin/server/tags?page=1&ordering=last\_updated](https://hub.docker.com/r/joplin/server/tags?page=1&ordering=last_updated)

Or the release tags starting with `server-`

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [1 July 2021 20:21 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/15 "2021-07-01T20:21:25Z")

</div>

Yes, be careful with different versions of server and client.

Now there is another problem: after I tried to share a note (maybe coincidental) the client (2.1.7) started to sync and now it is in round **five**. It also created hundreds of dummy notes labeled "Untitled". I went to version 2.0.11 and the Untitled notes went away but it is continuing to resync indefinitely.

This does not look very promising.

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [1 July 2021 21:54 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/16 "2021-07-01T21:54:34Z")

</div>

Now 2.0.11 stopped resyncing and note sharing seems to work. Let's see what happens when more clients are added...

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [1 July 2021 22:18 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/17 "2021-07-01T22:18:51Z")

</div>

But web clipper doesn't work with 2.0.11 doh...

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [3 July 2021 11:30 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/18 "2021-07-03T11:30:39Z")

</div>

Closer to a working solution:

> <https://github.com/laurent22/joplin/issues/5133#issuecomment-873132724>
>
> At every sync the app updates all the remote items as in the screenshot below.
> …
> !\[Screenshot 2021-06-30 at 09 33 54\](https://user-images.githubusercontent.com/61902329/123923546-6731dc80-d989-11eb-8c80-a275dd079f9a.jpg)
> 
> 
> \--\>
> 
> \## Environment
> 
> Joplin version: 2.1.7
> Platform: MacOS
> OS specifics: Big Sur 11.4
> 
> 
> \## Steps to reproduce
> 
> 1. Sync the Mac app with Joplin Server 2.1.6 
> 
> 
> 
> Issues without reproduction steps are likely to stall.
> \--\>
> 
> \## Describe what you expected to happen
> Sync only new item and not all every time
> 
> 
> 
> \## Logfile
> 
> 
> Log Joplin App MacOS
> \[log.txt.tar.gz\](https://github.com/laurent22/joplin/files/6739043/log.txt.tar.gz)
> 
> 
> Log Joplin Server Docker
> \[ebb965e23b23.log.gz\](https://github.com/laurent22/joplin/files/6739027/ebb965e23b23.log.gz)
> 
> 
> 
> \--\>

---

<div class="post-metadata">

**Author:** ![cybrpimp](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cybrpimp/32/8752_2.png) [@cybrpimp](https://discourse.joplinapp.org/u/cybrpimp)\
**Post date:** [3 July 2021 22:15 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/19 "2021-07-03T22:15:38Z")

</div>

@KajWiik I've been trying to get the Docker Version working on our server, would you be able to share your docker-compose.yml or process to help?

I'm on Windows and I have had problems.

---

<div class="post-metadata">

**Author:** ![KajWiik](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kajwiik/32/6867_2.png) [@KajWiik](https://discourse.joplinapp.org/u/KajWiik)\
**Post date:** [4 July 2021 09:00 UTC](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343/20 "2021-07-04T09:00:34Z")

</div>

@cybrpimp Yes, sure. It is basically the 'official' docker file from joplins github repo:

> <https://github.com/laurent22/joplin/blob/dev/docker-compose.server.yml>

This is the version I am using:

```auto
# This is a sample docker-compose file that can be used to run Joplin Server
# along with a PostgreSQL server.
#
# All environment variables are optional. If you don't set them, you will get a
# warning from docker-compose, however the app should use working defaults.

version: '3'

services:
    db:
        image: postgres:13.1
        volumes:
            - /YOUR_PATH/joplin-data:/YOUR_PATH/postgresql/data
        ports:
            - "5432:5432"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
    app:
        image: joplin/server:2.1.6-beta
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_BASE_URL=https://YOUR_SERVER_NAME/joplin
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db

```

Note the line

```auto
image: joplin/server:2.1.6-beta

```

You have to use absolute version, `latest` will not bring the latest one ☹ .

Set data path appropriately, in my setup it is the raid mount point.  
Also you have to set up port forwarding with your web server.  
This setup is working very well at least in Ubuntu 20.04 and with the latest desktop apps (2.1.8 in Linux).

[Next page](https://discourse.joplinapp.org/t/simple-instructions-for-joplin-server-upgrade/18343.md?page=2)
