安装Joplin Server私有化部署(docker)

安装Joplin Server私有化部署(docker)

前言: 老规矩官方文档链接

1. 首先拥有一个自己的云服务器(如果没有外网访问需求的话就随意吧)

  • 安装docker安装方式

  • 这里Joplin是使用PostgreSQL数据库的形式, 如果没有PostgreSQL库的话, Joplin默认使用的是SQLLite数据库
    我这里使用的是docker-compose部署用的是官网的demo.yml所以就直接也创建了一个PostgreSQL数据库

  • # This is a sample docker-compose file that can be used to run Joplin Server
    # along with a PostgreSQL server.
    #
    # Update the following fields in the stanza below:
    #
    # POSTGRES_USER
    # POSTGRES_PASSWORD
    # APP_BASE_URL
    #
    # APP_BASE_URL: This is the base public URL where the service will be running.
    #	- If Joplin Server needs to be accessible over the internet, configure APP_BASE_URL as follows: https://example.com/joplin. 
    #	- If Joplin Server does not need to be accessible over the internet, set the the APP_BASE_URL to your server's hostname. 
    #     For Example: http://[hostname]:22300. The base URL can include the port.
    # APP_PORT: The local port on which the Docker container will listen. 
    #	- This would typically be mapped to port to 443 (TLS) with a reverse proxy.
    #	- If Joplin Server does not need to be accessible over the internet, the port can be mapped to 22300.
    
    version: '3'
    
    services:
        db:
            image: postgres:16
            volumes:
                - ./data/postgres:/var/lib/postgresql/data
            ports:
                - "5432:5432"
            restart: unless-stopped
            environment:
                - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
                - POSTGRES_USER=${POSTGRES_USER}
                - POSTGRES_DB=${POSTGRES_DATABASE}
        app:
            image: joplin/server:latest
            depends_on:
                - db
            ports:
                - "22300:22300"
            restart: unless-stopped
            environment:
                - APP_PORT=22300
                - APP_BASE_URL=${APP_BASE_URL}
                - DB_CLIENT=pg
                - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
                - POSTGRES_DATABASE=${POSTGRES_DATABASE}
                - POSTGRES_USER=${POSTGRES_USER}
                - POSTGRES_PORT=${POSTGRES_PORT}
                - POSTGRES_HOST=db
    
  • 根据自己的配置进行替换

  • 然后需要搭建一个nginx进行反向代理, 我这里使用的是nginxwebui来做的

  • 一定要使用域名并且使用https, 因为之前别的方式情况下在Joplin软件中配置有问题所以建议直接上https+域名, 也花不了几个钱

  • 配置完成之后登录网页修改管理员账号密码–下方官方文档摘录(默认用户名:admin@localhost 密码:admin )

    Update the admin user credentials
    
    By default, Joplin Server will be setup with an admin user with email admin@localhost and password admin. For security purposes, the admin user's credentials should be changed. On the Admin Page, login as the admin user. In the upper right, select the Profile button update the admin password.
    
  • 登陆网页然后添加用户去修改默认管理员账号

    image-20240219110915765

  • 修改邮箱和密码

在这里插入图片描述

  • 修改完成之后会重新登陆

  • 打开Joplin手机端或者电脑端这里电脑端举例

    image-20240219114511215

  • 点击设置同步配置对应信息(如果不想把admin账户给他人可以在网页端admin页面进行添加用户这里不做赘述)选择同步目标为Server(Beta),并填写服务器url也就是上文中配置的https+域名
    在这里插入图片描述

  • 20
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

社畜阿藏405

挣点钱不丢人吧?

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值