Network setup for Joplin in docker

本文详细介绍了如何通过设置Docker环境变量、Nginx配置以及路由器端口转发,使Joplin能够从互联网访问。主要步骤包括将APP_BASE_URL设置为域名和端口,设置APP_PORT和Docker端口映射,Nginx中配置SSL证书以启用HTTPS,并进行端口443:443映射,最后在路由器上设置NAT端口转发规则。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值