If you'd like to have it running under e. g. 192.168.0.100:22300:
Skip step 1, 2, 5, 6, 7 and 10.
In step 8 you'd want to set the APP_BASE_URL to the local ip with the protocol in front and a leading :22300 (in this example http://192.168.0.100:22300).
If you'd like to have it running under e. g. 192.168.0.100/joplin:
Skip step 1, 2, 6 and 10.
In step 7 edit /etc/apache2/sites-enabled/000-default.conf instead of /etc/apache2/sites-enabled/000-default-le-ssl.conf (there will be no <VirtualHost *:443> block, but instead a <VirtualHost *:80> block.
In step 8 you would want to set the APP_BASE_URL to the local ip with the protocol in front and a leading /joplin (in this example http://192.168.0.100/joplin).
Remeber: The traffic gets routed without any encryption via plain http.
I can't really see a problem there. After a quick online search, the problem could be caused by Raspbian 10 / Debian 10 / Debian Buster. My advice would be: If you don't have a ton of other features running on the Raspberry Pi, upgrade it to Bullseye (use the newest image available) and start the guide from scratch.
Unfortunately I don't have a Raspberry Pi with Debian 10 running currently, so I can't test it.
@MrKanister Thanks for your tutorial, however I seem to fail at some point
I needed to change all http-urls to h2tp, I am not allowed to post links.
I want to host joplin locally on my raspi4 and expose via nginx proxy and let's ecrypt certificate.
Joplin should be available on this domain
h2tps://subdomain.domain.tld:1234
Network setup will be like this
Router Port 1234➡2345 nginx listening➡proxy to joplin port 22300
I was able to get almost everything up and running. But opening h2tps://subdomain.domain.tld:1234/login will give me a bare html page with no css images etc. loaded.
sample h2tps://subdomain.domain.tld:1234/login
All urls in html sourcecode lead to http-url, no https and missing outside port 1234. e.g.
h2tp://subdomain.domain.tld/images/icons/server/icon-180.png
whereas this url severs the image perfectly:
h2tps://subdomain.domain.tld:1234/images/icons/server/icon-180.png
So it appears joplin is hardcoding the url by itself unable to handle outside port 1234 or https proxing, what did I configure wrong?
I don't think so, see the link above. You could possibly verify this by adding the port to the APP_BASE_URL and checking in the developer tools of your browser where the network requests are being sent to.
I think your desired behaviour should be possible, but I can't tell you exactly whether and where there is currently an error.
(Be aware, that certbot needs port 80 (and maybe 443) open on the pi for it's challenges if you are using it for the certificate on the pi.)
@MrKanister Thanks for the sparring, I figured it out!
All I needed is to trick joplin into getting the correct url passed in the forwarding header from nginx.
Nginx will now forward to port 22300 with a header containing 1234 as url.
nginx config:
proxy_set_header Host $host:1234;
joplin base url
APP_BASE_URL=h2tp://subdomain.domain.tld:1234
Network setup will be like this
Router Port 1234➡2345 nginx listening➡proxy to joplin port 22300
This is what I get when I run sudo docker compose up -d
pi@raspberrypi:~ $ sudo docker compose up -d
WARN[0000] The "LhqkfzeR" variable is not set. Defaulting to a blank string.
WARN[0000] The "tv" variable is not set. Defaulting to a blank string.
WARN[0000] The "LhqkfzeR" variable is not set. Defaulting to a blank string.
WARN[0000] The "tv" variable is not set. Defaulting to a blank string.
[+] Running 0/2
⠧ db Pulling 0.6s
⠧ app Pulling 0.6s
no matching manifest for linux/arm/v8 in the manifest list entries
This suggests to me that docker is looking for externally stored environment variables but you have not obviously specified any in your compose file. It's a long shot but is your postgres password something like ${LhqkfzeR}${tv} ???
Also in the error it says arm. Are you trying to install Joplin Server on 32-bit RasPiOS? Joplin Server is a 64-bit application and needs a 64-bit OS to download / run the linux/arm64/v8 image.