To make Joplin accessible from internet, we need to do the following configurations:
Joplin configuration
- set the docker enviornment vaiable APP_BASE_URL to the domain name you will use with the port, such as https://your.domain:9443
- set the APP_PORT as origin 22300
- set docker network port 22300:22300
Nginx configuration
- set docker network port 443:443, for this part, we can add ssl certificate and turn on the ssl in nginx
- set the configuration as following:
server {
listen 443;
ssl on;
ssl_certificate /ssl-cert/server.crt;
ssl_certificate_key /ssl-cert/server.key;
server_name your.domain;
#proxy_set_header X-Forwarded-For $remote_addr;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
server_tokens off;
location / {
proxy_pass http://joplin.ipaddress:22300;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_set_header Host $http_host;
access_log /var/log/nginx/joplin.access.log;
error_log /var/log/nginx/joplin.error.log;
}
}
Router configuration
- in router, set the NAT for port forward, such as 9443 to 443.