[SOLVED/UNRELATED] How to use with Nginx Proxcy Manager?

Hi,

I try to use Joplin with the official docker-compose set like this:

version: '3'

services:
    db:
        image: postgres:13
        container_name : joplinpostgres
        volumes:
            - /home/aerya/docker/joplin/:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        restart: always
        environment:
            - POSTGRES_PASSWORD=xx
            - POSTGRES_USER=xx
            - POSTGRES_DB=xx
    app:
        image: joplin/server:latest
        container_name : joplin
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: always
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=https://notes.upandclear.org
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=xx
            - POSTGRES_DATABASE=xx
            - POSTGRES_USER=xx
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db
        labels:
            - com.centurylinklabs.watchtower.enable=true

And here is my "npm" set up:

I can't get it work on https//url

I tried both
APP_BASE_URL=https://notes.upandclear.org
APP_BASE_URL=https://notes.upandclear.org:22300

Could anyone give me a tip please? I read about some Nginx configs here and on Github issues but nothing I could reproduce using "npm".

Thanks,
A.

3 ideas to investigate after comparing with my config :
1/ check firewall ports
2/ check difference between “Postgre_db” and “postgre_database” in your docket file
3/ in my npm config I had to write down the equivalent to “http://notes.upandclear.org:22300” instead of 10.xxxx:22300

Thank you for your feedback.

1/ Port opened or FW down for testing
2/ Env names are the ones provided by the official .yml
3/ I don't understand

I use NPM from jc21.
Here's how it looks:

BTW Postgre seems to be working fine (logs are ok) so as Joplin as I got Invalid origin: http://10.0.4.100:22300 while trying to access direct IP:port.

In the picture, in the “forward hostname / IP” field try to replace
10.0.xx
by :
notes.upandclear.org

Ok, I see. This can't work. It's a proxy, to redirect my domain (or sub here) to one of my hosts. This needs to be an IP.
On this same host (10.0.4.100) I got 3 domains and 27 subs.

Strange, I have the exact same conf as you and it’s working for me.
Sorry I couldn’t help.
Good luck

1 Like

Thank you anyway :slight_smile:

It seems it was a problem on my side with my Cloudflares config. I don't know exactly what but after a few tweaks it's working as expected :slight_smile:

Thanks again @nokoa77 for your kind help and sorry for the mess!

1 Like

Is there a reason you don’t use an environment file (.env)? In the compose file it should be just

APP_BASE_URL=${APP_BASE_URL},

while in the .env it should be http://notes.upandclear.org, your url (without adding the port number there) - note that it’s not https, that part is ought be handled by the reverse proxy.

Edit: I’m glad it worked out in the end. :slight_smile:

1 Like

No valuable reason. I'm used to rewrite .yml to my needs.

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