Joplin Server - SSL - Self signed - Local computer

Hello All,

I'm new here, I'm not a coder, just a hobbyist trying to run my own server on proxmox in a Debain VM with Protainer.

I am having a hard time getting SSL (self signed) to get my local Joplin server to work over HTTPS, and I'm looking for guidance.

When I change the link in my config to https:// it doesn't work it gives me an error saying that the SSL message is to long.

What I have tried:
I installed apache2, self signed a certificate and pointed to it in the apache2 config file and that works over https:// ... but I do not know where to put the same certificates inside of Joplin to allow the same to occur or what ports to use. I tried using port 443 instead of 22300 but that did not work.

I realize my question is a newbie one, but I am willing to learn and want to try to get it working, I do not need it available over the internet, just want it to work with my devices two of which are iOS, therefore trying the self signed route.

This is a great project and I love that we have the option of running our own server.

Thank you for all your help in advance.

This is my current config

# 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:13
        volumes:
            - /docker/joplin/postgres:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=mypassword
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=http://my.ip:22300
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=mypassword
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db

I managed to resolve this issue.

I had to make two changes: (in the Protainer stacks i.e. the code above, I changed the port on this line and added https://

- APP_BASE_URL=https://my.ip:443

reload stack in Protainer

in Apache2 config file add the following for reverse proxy:
this was in the sites-available folder

<VirtualHost _default_:443>
   SSLCertificateFile /path/to/file.pem
   SSLCertificateKeyFile /path/to/file.key
   ProxyPass / http://myip:22300/
   ProxyPassReverse / http://myip:22300/
</VirtualHost>

stop and start apache.

Hope this helps someone else.

1 Like

Glad you got it working. Is there a reason you self-sign rather than get a free cert from Lets Encrypt?

I don't know how to use let's encrypt and I don't have it open to the internet.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.