Guide for Joplin-Server on Raspberry Pi

Use that also :slight_smile:

Hi All,

I want to run joplin server locally on my raspberry pi using docker. I want to access it from another machine on the same network using its IP address. What do I enter for the APP_BASE_URL parameter in docker-compose.yml?

the ip address of the raspberry pi http://192.168.0.xx/joplin usually. I tried putting http://localhost/joplin but if I remember correctly i kept getting an error “invalid login path” something like that

This is exactly what I'm facing. I'm satisfied with using the ip address itself but <ip_address>/joplin does not work for me. I get "invalid login path" as a message.

I also tried setting APP_BASE_URL=192.168.0.x/joplin
When I visited the above link on another machine, I got an error "invalid login path" and I was given a link to go to the login page. On clicking on that, the url in the address bar changes to:
192.168.0.x/192.168.0.x/joplin {Ip address appears 2 times}

I dont want to set up dyndns for this. Any info will be greatly appreciated.

Hmm.. sorry I remember it had worked but it was over a month or so ago I have my own domain so I switched to that after testing it out. sorry I couldn’t help

http://localhost/joplin won't work because the localhost of the client and the host of the server are not the same.

If you haven''t tried it yet, I'd put a http:// in front of the IP in the docker-compose file.

Do you use a reverse proxy to direct the traffic to docker with port 22300? I tried this kind of local setup once without a reverse proxy and set the base url to http://192.168.x.x:22300, which worked fine...

I'll try this and let you know. No I'm not using a reverse proxy

If you don't use a reverse proxy, you always have to use http://192.168.x.x:22300, don't you? But you mentioned, you get the invalid login path when you visit 192.168.0.x/joplin, right? If it still doesn't work properly, maybe it would help, if you post your docker-compose file here.

Great stuff ! Thanks for sharing this. I am not sure I understand how the PostgreSQL integration is achieved in your example. Can you please elaborate on that ?

Hi, I do not quite understand what you mean. Since I only wrote this guide, but don't really know much about Docker, I can't say much about it. As of my understanding this part in the docker-compose.yml

Open up
db:
        restart: unless-stopped
        image: postgres:13.1
        ports:
            - "5432:5432"
        volumes:
            - /foo/bar/joplin-data:/var/lib/postgresql/data
        environment:
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin

shows the creation of the Database and this part

Open up
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin 
            - POSTGRES_PORT=5432 
            - POSTGRES_HOST=db
            - DB_CLIENT=pg

defines the the connection to the Joplin-Server. Is that in any way an answer to your question?

Kind regards
MrKanister

Is Nginx port must 80 or 443?

should android use https? http always show Nerwork request failed

Hi,
you need to decide whether you want to use an encrypted connection (https - port 443) or an unencrypted connection (http - port 80). If you make the server accessible on the Internet, it is strongly recommended to use https. In the local network http is sufficient depending on the application.

In my guide I use https, i.e. port 443. Accordingly, https://DOMAIN.COM/joplin must also be entered in Android.

I updated this guide to link to the Debian 11 Image (thanks once again @dpoulton!) and added section 9, describing the login process. - 11.12.2021

Kind regards

I had the same problem like you, but I have joplin running in a subdirectory/custom port with other stuff with a nginx. I posted my configuration for nginx which finally worked at my blog:

server
    {
    ..
    location /joplin
            {
            proxy_read_timeout 720s;
            proxy_connect_timeout 720s;
            proxy_send_timeout 720s;

            client_max_body_size 300m;

            # Proxy headers
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header Host $http_host/joplin;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Real-IP $remote_addr;
            #not active used
            #proxy_set_header X-Forwarded-Port 3333;

            # log files
            access_log /var/log/nginx/joplin.access.log;
            error_log /var/log/nginx/joplin.error.log;

            # Handle / requests and redirect to a specific port on localhost
            location /joplin/ {
                 proxy_redirect off;
                 proxy_pass http://localhost:22300/;
            }
    }
..
}

The ending slash in the proxy_pass makes a huge difference, so you should try without. By the way for me worked the curl api ping always as a good test - does this one work:

curl https://subdomain.domain.tld:3333/joplin/api/ping
2 Likes

Hi, this is my first post here.... I'm Domenico, how are you?

I'm a new member to the forum and in general as a user of Joplin. I will be brief since this type of forum is designed for a purpose and not to make friends.

I'll preface this by saying that the program in question is really impressive because in my short experience between Evernote, Notion and RemNote I found it the most intuitive and easy to customize to your own liking.

That said I did run into a problem when trying to "privately host" my data (meaning following this guide to set up a server) on a Raspberry Pi 3 Model B+ that I had already active (with other servers [Mysterium VPN & Presearch] with Docker) with the Raspberry Pi Os 64 bit (https: //downloads. raspberrypi. org/ raspios_arm64/images/raspios_arm64-2022-01-28 without spaces).

I did the port forwarding as indicated. I already had Docker installed, but not the composer... so I did install that. I have also installed Apache WebServer and Cerbot as it was pointed out and everything went as smoothly as it should have gone.

I ALSO enabled the proxy modules and having the DDNS from noip . com (meaning I really followed all the steps I was supposed to follow) and then.. at the 8 point precisely when I was having executed the docker-compose up command an ERROR message pop up in the terminal (while the command was running) saying the exact same words: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

It's not even worth mentioning that despite trying many ways after the error to fix it I still can't find a way, can anyone here help me?

Okay so Hi there! This error is laying in the docker-compose layer as it is not able to get the files it needs. You could try to restart docker (sudo service docker restart) and then try it again. You may also send us your docker-compose file just so we can make sure it's not faulty. And of course, you should add the --verbose flag to the docker-compose up command to get further information (like which request exactly times out).
Greetings!

Hi everybody, a happy joplin-server user here. :slight_smile:

My Joplin server is running on RasperryPi 4/4g behind a proxy handled by an apache2.
I'm also using pg as db storing.
I'm syncing with Linux desktop and an Android v11 clients.
Every thing is well, not even using the marvelous guide up there. I mean it's a docker version coming from florider89/joplin-server supposing the right version for RP.
I usually run it by this run.sh :

#!/bin/sh
export MAX_TIME_DRIFT=0
git pull ; sudo docker pull florider89/joplin-server
sudo docker run -d --net=host --add-host=host.docker.internal:127.0.0.1 --env-file .env -p 22300:22300 florider89/joplin-server

Just missing some kind of a sudo systemctl joplin start and sudo systemctl joplin enable to make start after reboot. Any help to do that ?
Thanks for your comments and tips !

In the guide @MrKanister uses docker-compose and a docker-compose.yml file rather than a shell script, and brings up Joplin-Server using docker-compose up -d.

In that docker-compose.yml file both the db and Joplin-Server have entries restart: unless-stopped. The Docker service starts at system boot and, due to those entries, docker starts postgres and Joplin-Server (unless you had manually stopped them before the reboot).

1 Like

Hi thanks very much for reminding me this this option.
Does the docker compose update de local git repo and retrieve the latest dockefile ?