# Self hosted server help

**URL:** https://discourse.joplinapp.org/t/self-hosted-server-help/18921
**Category:** Support
**Created:** [21 July 2021 16:08 UTC](https://discourse.joplinapp.org/t/self-hosted-server-help/18921 "2021-07-21T16:08:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Basketkase](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/basketkase/32/9666_2.png) [@Basketkase](https://discourse.joplinapp.org/u/Basketkase)
#### Post date: [21 July 2021 16:08 UTC](https://discourse.joplinapp.org/t/self-hosted-server-help/18921/1 "2021-07-21T16:08:23Z")

</div>

Hello!

I've been trying to setup the joplin server on my aws instance. I'm using the docker-compose file provided in the repository. I have it setup behind nginx as well.

I am able to use the web UI, I created my user and am able to login as myself there. The problem comes when I'm adding it as the synchronization target in the application. I get this error when I test the synchronization configuration.

```auto
POST api/files/root/children: Unknown error (400): {"error":"Not allowed: POST "} (Code 400)

```

I am using the desktop app, version 1.7.11 on MacOS.

Let me know if you need any more details! I'm guessing it's something simple I missed.

Here's my docker-compose for reference:

```auto
version: '3'

services:
    db:
        image: postgres:13.1
        volumes:
            - ./data/postgres:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_DB=${POSTGRES_DATABASE}
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=${APP_BASE_URL}
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_DATABASE=${POSTGRES_DATABASE}
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db

```

And also for reference here's my nginx config:

```auto
server {
    server_name joplin.xxxxx.xxxxx;

    location / {
        proxy_pass http://localhost:22300;
    }

    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Forwarded-Host $host;
    client_max_body_size 400M;

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/joplin.xxxxxxx.xxxxx/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/joplin.xxxxxx.xxxxx/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    access_log /var/log/nginx/joplin.xxxxxxx.xxxxxx.access.log;
    error_log /var/log/nginx/joplin.xxxxxxx.xxxxxx.error.log;
}

server {
    if ($host = joplin.xxxxx.xxxxx) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    server_name joplin.xxxxx.xxxxx;

    listen 80;
    listen [::]:80;
    return 404; # managed by Certbot
}

```

---

<div class="post-metadata">

### Author: ![dpoulton](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/dpoulton/32/29723_2.png) [@dpoulton](https://discourse.joplinapp.org/u/dpoulton)
#### Post date: [21 July 2021 16:47 UTC](https://discourse.joplinapp.org/t/self-hosted-server-help/18921/2 "2021-07-21T16:47:24Z")

</div>

@Basketkase welcome to the forum.

> [@Basketkase](#):
>
> I am using the desktop app, version 1.7.11 on MacOS

I believe that is your problem. Try a [current release](https://github.com/laurent22/joplin/releases/tag/v2.1.9). `:latest` is a v2 server and so requires a v2.x client.

Also `latest` is not actually being fully used for the server image yet as it is still beta software. The tag is therefore referencing an old beta version. If you want to try the latest server version you will need to use `joplin/server:2.2.7-beta`

---

<div class="post-metadata">

### Author: ![Basketkase](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/basketkase/32/9666_2.png) [@Basketkase](https://discourse.joplinapp.org/u/Basketkase)
#### Post date: [21 July 2021 17:13 UTC](https://discourse.joplinapp.org/t/self-hosted-server-help/18921/3 "2021-07-21T17:13:35Z")

</div>

Thanks @dpoulton!

Yes that was it! That should have been my first debug step, it just didn't occur to me!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)
#### Post date: [20 August 2021 17:14 UTC](https://discourse.joplinapp.org/t/self-hosted-server-help/18921/4 "2021-08-20T17:14:19Z")

</div>

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