# Issues With Joplin Server Docker-Compose File | Debian 10

**URL:** <https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384>\
**Category:** Support\
**Created:** [16 September 2022 00:29 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384 "2022-09-16T00:29:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbitvilla](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cbitvilla/32/14951_2.png) [@cbitvilla](https://discourse.joplinapp.org/u/cbitvilla)\
**Post date:** [16 September 2022 00:29 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/1 "2022-09-16T00:29:26Z")

</div>

Hello, I am having a hard time trying to get this Joplin server set up. I was following these 2 guilds and both of them result in the same "404 page not found". Not sure what could be the problem and someone can point me in the right direction.

## Resources Used:

- [GitHub Joplin Server](https://github.com/laurent22/joplin/blob/dev/packages/server/README.md)
- [Joplin Server on Raspberry]  
`(https://discourse.joplinapp.org/t/guide-for-joplin-server-on-raspberry-pi/14702)`  
_new user so I'm not allowed to put more than 1 link_

## Docker Compose File:

```auto
version: '3'

services:
    db:
        image: postgres:13
        volumes:
            - /home/joplin/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: etechonomy/joplin-server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=${APP_PORT}
            - APP_BASE_URL=${APP_BASE_URL}
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_DATABASE=${POSTGRES_DATABASE}
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_PORT=${POSTGRES_PORT}
            - POSTGRES_HOST=db

```

## `.env` File Used:

This is taken from the sample `.env` file provided by the first resource

```auto
APP_BASE_URL=https://notes.example.net/joplin
DB_CLIENT=pg
POSTGRES_PASSWORD=SUPERPASSWORD123
POSTGRES_DATABASE=joplin
POSTGRES_USER=joplin
POSTGRES_PORT=5432
POSTGRES_HOST=localhost
APP_PORT=22300

```

## Log Results:

`docker-compose logs -f`

```auto
app_1 | 2022-09-15 23:51:32: App: Starting services...
app_1 | 2022-09-15 23:51:32: ShareService: Starting maintenance...
app_1 | 2022-09-15 23:51:32: EmailService: Service will be disabled because mailer config is not set or is explicitly disabled
app_1 | 2022-09-15 23:51:32: TaskService: Scheduling #1 (Delete expired tokens): 0 */6 * * *
app_1 | 2022-09-15 23:51:32: TaskService: Scheduling #2 (Update total sizes): 0 * * * *
app_1 | 2022-09-15 23:51:32: TaskService: Scheduling #3 (Process oversized accounts): 30 */2 * * *
app_1 | 2022-09-15 23:51:32: TaskService: Scheduling #7 (Compress old changes): 0 0 */2 * *
app_1 | 2022-09-15 23:51:32: TaskService: Scheduling #8 (Process user deletions): 0 */6 * * *
app_1 | 2022-09-15 23:51:32: App: Call this for testing: `curl https://notes.example.net/joplin/api/ping`
app_1 | 2022-09-15 23:51:32: ShareService: Maintenance completed in 37ms
app_1 | 2022-09-15 23:52:38: [error] App: 404: GET /joplin: ::ffff:172.25.5.1: Path not found: joplin
app_1 | 2022-09-15 23:52:38: App: GET /joplin (404) (11ms)
app_1 | 2022-09-15 23:52:38: [error] App: 404: GET /joplin/css/bulma.min.css: ::ffff:172.25.5.1: Path not found: joplin/css/bulma.min.css
app_1 | 2022-09-15 23:52:38: App: GET /joplin/css/bulma.min.css (404) (2ms)
app_1 | 2022-09-15 23:52:38: [error] App: 404: GET /joplin/js/jquery.min.js: ::ffff:172.25.5.1: Path not found: joplin/js/jquery.min.js
app_1 | 2022-09-15 23:52:38: [error] App: 404: GET /joplin/css/fontawesome/css/all.min.css: ::ffff:172.25.5.1: Path not found: joplin/css/fontawesome/css/all.min.css
app_1 | 2022-09-15 23:52:38: [error] App: 404: GET /joplin/js/main.js: ::ffff:172.25.5.1: Path not found: joplin/js/main.js
app_1 | 2022-09-15 23:52:38: App: GET /joplin/js/jquery.min.js (404) (2ms)
app_1 | 2022-09-15 23:52:38: App: GET /joplin/css/fontawesome/css/all.min.css (404) (3ms)
app_1 | 2022-09-15 23:52:38: App: GET /joplin/js/main.js (404) (3ms)
app_1 | 2022-09-15 23:52:38: [error] App: 404: GET /joplin/css/main.css: ::ffff:172.25.5.1: Path not found: joplin/css/main.css
app_1 | 2022-09-15 23:52:38: App: GET /joplin/css/main.css (404) (1ms)
app_1 | 2022-09-15 23:52:38: [error] App: 404: GET /favicon.ico: ::ffff:172.25.5.1: Path not found: favicon.ico
app_1 | 2022-09-15 23:52:38: App: GET /favicon.ico (404) (1ms)
app_1 | 2022-09-15 23:52:42: [error] App: 404: GET /joplin/login: ::ffff:172.25.5.1: Path not found: joplin/login
app_1 | 2022-09-15 23:52:42: App: GET /joplin/login (404) (1ms)

```

## HTML Output When visiting URL:

Path not found: joplin/login

Go to login page  
Joplin Server 2.7.4, copyright © 2021 Laurent Cozic.

## Additional Information On Test Machine

I am running this in a debian 10 lxc container within a proxmox server and use HAproxy as my reverse proxy.

---

<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:** [16 September 2022 11:21 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/2 "2022-09-16T11:21:49Z")

</div>

How is your reverse proxy configured?

Edit: For visibility purposes, I would advise you to put the env-variables directly in the docker-compose.yml. It makes no difference, but declutters everything a bit.

Edit2: Is the host system arm or amd64?

---

<div class="post-metadata">

**Author:** ![cbitvilla](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cbitvilla/32/14951_2.png) [@cbitvilla](https://discourse.joplinapp.org/u/cbitvilla)\
**Post date:** [16 September 2022 12:19 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/3 "2022-09-16T12:19:30Z")

</div>

Thanks for replying, the host system is amd64 and the reverse proxy is set up within pfSense using the HAproxy service. Below is how it is configured

### Backend

| name | forward to | address | port |
| --- | --- | --- | --- |
| joplin | adress+port | 172.25.5.130 | 22300 |

### Frontend

#### Access Control List

Define criteria that will be used with actions defined below to perform them only when certain conditions are met

| name | expression | value |
| --- | --- | --- |
| joplin | Host starts with: | `notes.example.net` |

#### Actions

Backend to use or perform other actions like calling a lua script, blocking certain requests or others available

| action | Condition acl names | actions |
| --- | --- | --- |
| Use Backend | joplin | backend:Joplin |

---

<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:** [16 September 2022 12:47 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/4 "2022-09-16T12:47:04Z")

</div>

I have never used ofSense, so I don't know what I'm talking about...my guess would be, that the value of the Access Control List has to be changed to `notes.example.net/joplin`.

The docker-compose.yml seems correct, so the issue is with the reverse proxy.

Regarding amd64: You can then use the official `joplin/server:latest` tag, but no must.

* * *

Edit: Is this just a typo?

> [@cbitvilla](#):
>
> backend:Joplin

I think it has to be lower case to match the backend config above, doesn't it?

---

<div class="post-metadata">

**Author:** ![cbitvilla](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cbitvilla/32/14951_2.png) [@cbitvilla](https://discourse.joplinapp.org/u/cbitvilla)\
**Post date:** [17 September 2022 00:33 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/5 "2022-09-17T00:33:35Z")

</div>

So I changed it to have "`/joplin`" to the ending of the ACL and now only get 503 error. Checking the logs it seems to be stuck in the maintenace mode. Below is the latest logs using `docker-compos logs -f`

```auto
app_1 | 2022-09-17 00:14:45: App: Auto-migrating database...
app_1 | 2022-09-17 00:14:45: App: Latest migration: { name: '20220201151223_backup_items.js', done: true }
app_1 | 2022-09-17 00:14:45: App: Performing main storage check...
app_1 | 2022-09-17 00:14:45: App: Database storage is special and cannot be checked this way. If the connection to the database was successful then the storage driver should work too.
app_1 | 2022-09-17 00:14:45: App: Starting services...
app_1 | 2022-09-17 00:14:45: ShareService: Starting maintenance...
app_1 | 2022-09-17 00:14:45: EmailService: Service will be disabled because mailer config is not set or is explicitly disabled
app_1 | 2022-09-17 00:14:45: TaskService: Scheduling #1 (Delete expired tokens): 0 */6 * * *
app_1 | 2022-09-17 00:14:45: TaskService: Scheduling #2 (Update total sizes): 0 * * * *
app_1 | 2022-09-17 00:14:45: TaskService: Scheduling #3 (Process oversized accounts): 30 */2 * * *
app_1 | 2022-09-17 00:14:45: TaskService: Scheduling #7 (Compress old changes): 0 0 */2 * *
app_1 | 2022-09-17 00:14:45: TaskService: Scheduling #8 (Process user deletions): 0 */6 * * *
app_1 | 2022-09-17 00:14:45: App: Call this for testing: `curl https://notes.example.net/joplin/api/ping`
app_1 | 2022-09-17 00:14:46: ShareService: Maintenance completed in 397ms
app_1 | 2022-09-17 00:30:00: TaskService: Running #3 (Process oversized accounts) (scheduled)...
app_1 | 2022-09-17 00:30:00: TaskService: Completed #3 (Process oversized accounts) in 351ms

```

---

<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:** [17 September 2022 13:09 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/6 "2022-09-17T13:09:25Z")

</div>

The log is completely fine, this is normal behaviour.

Do you want to reach Joplin at `notes.example.com` or `notes.example.com/joplin`? The first one might be easier, then you have to delete the `/joplin` in the acl again and also set the `APP_BASE_URL` in the `docker-compose.yml` file (or `.env` file) to `https://notes.example.com` without `/joplin`.

---

<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:** [17 September 2022 22:25 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/7 "2022-09-17T22:25:29Z")

</div>

Someone else had a problem trying to access Joplin server from a sub-directory off the domain rather than using a sub-domain. In that case the reverse proxy was nginx.

What _appeared_ to be happening was that the user wanted to access Joplin from `/joplinServer` under their domain. The proxy was adding `/joplinServer` to the base url value which itself already contained `/joplinServer`, so whilst the actual path wanted was `https://domain.com/joplinServer/login` the proxy / base url combination interpreted it as `https://domain.com/joplinServer/joplinServer/login`, hence lots of 404s. The `joplinServer` could not be removed from the base url as then the base url did not match.

[I managed to sort it for nginx](https://discourse.joplinapp.org/t/joplin-server-and-nginx-under-subresource-and-https/25934/17) by telling nginx to ignore one of the `joplinServer`s using a `rewrite`. I mention this as it could be that the same is happening with HAProxy so it is something you could investigate.

The easiest solution is to access Joplin Server from the sub-domain `https://notes.example.net` but I guess there's a reason you do not want to do that.

---

<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:** [17 October 2022 22:25 UTC](https://discourse.joplinapp.org/t/issues-with-joplin-server-docker-compose-file-debian-10/27384/8 "2022-10-17T22:25:35Z")

</div>

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