Joplin Server: Unable to login -> "Invalid path format: 192.168.1.10:22300/login"

Operating system

Linux

Joplin version

3.0.1

Sync target

Joplin Server

What issue do you have?

I'm trying to install Joplin Server with Docker. I can see the "Login to Joplin Server" page, but attempting to login fails with "Invalid path format: [hostname/ip]:22300/login". See attached screenshots.

Something is breaking URLs by duplicating the socket (ip:port) portion of the URL as if it's part of the path. For example, the log has messages about static asset GET requests failing because the request has socket identifier inserted after the first slash (/) instead of just the file path, like this:

GET /192.168.4.88:22300/js/main.js: ::ffff:192.168.4.102: Invalid path format: 192.168.4.88:22300/js/main.js

Here is my docker-compose.yml:

version: '3'

services:
    joplin-db:
        image: postgres:16
        volumes:
            - /mnt/data-tank/docker/joplin-server/joplindb:/var/lib/postgresql/data
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_DB=${POSTGRES_DB}
    joplin-app:
        image: joplin/server:latest
        volumes:
            - /mnt/data-tank/docker/joplin-server/sync-data:/home/joplin/sync-data
        depends_on:
            - joplin-db
        ports:
            - 22300:22300
        restart: unless-stopped
        environment:
            - APP_PORT=${APP_PORT}
            - APP_BASE_URL=${APP_BASE_URL}
            - DB_CLIENT=${DB_CLIENT}
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_DATABASE=${POSTGRES_DATABASE}
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_PORT=${POSTGRES_PORT}
            - POSTGRES_HOST=${POSTGRES_HOST}
            - POSTGRES_CONNECTION_STRING=${POSTGRES_CONNECTION_STRING}
            - STORAGE_DRIVER=${STORAGE_DRIVER}
            - STORAGE_DRIVER_FALLBACK=${STORAGE_DRIVER_FALLBACK}
networks:
    default:
        name: ${DOCKER_MY_NETWORK}
        external: true

Here is my .env:

APP_PORT=22300
APP_BASE_URL=http:/192.168.4.88:22300
DB_CLIENT=pg
POSTGRES_PASSWORD=[redacted]
POSTGRES_DATABASE=joplin
POSTGRES_USER=postgres
POSTGRES_PORT=5432
POSTGRES_HOST=joplin-db
DOCKER_MY_NETWORK=joplin_net
POSTGRES_CONNECTION_STRING=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/joplin
POSTGRES_DB=joplin
STORAGE_DRIVER=Type=Filesystem; Path=/home/joplin/sync-data
STORAGE_DRIVER_FALLBACK=Type=Database; Mode=ReadAndWrite

Screenshots


Log file

joplin-app-1-log.txt (2.74 KB)

I'm surprised I didn't notice that before, but in coming back to this with fresh eyes after a couple of weeks, I noticed a major typo in the APP_BASE_URL. I only had one slash after http: Adding a slash fixed it.

If you find this from a search engine, look very closely at your APP_BASE_URL.

1 Like