Installation

First things first, my Docker server is hosted on linode.com. I am using a "Nanode 1GB" instance for this since we do not need a lot of resources. The underlying operating system is at the time of writing Ubuntu 20.10 (Groovy).

For a guide on how to install Docker, I'd like to refer you to the official installation guide for Ubuntu.

I have started out with an empty directory in my home directory called joplin-server.

In this directory I cloned the Joplin GitHub repository.

You should now have a directory called joplin. This directory contains the source code for Joplin as well as the Joplin server.
After that, copy the docker-compose.server.yml and .env-sample file in the joplin directory to the current directory, in my case joplin-server. Rename the .env-sample file to .env, rename the docker-compose.server.yml file to docker-compose.yml for simplicity.

In the .env file you will want to uncomment a few things (and change them).

  • APP_BASE_URL: This is the URL your Joplin server is going to be accessible from.
  • POSTGRES_PASSWORD: This is the password for the PostgreSQL instance that docker-compose is going to setup for us.
  • POSTGRES_DATABASE: This is the database for the PostgreSQL instance that docker-compose is going to setup for us.
  • POSTGRES_USER: This is the user for the PostgreSQL instance that docker-compose is going to setup for us.
  • POSTGRES_PORT: This is the port for the PostgreSQL instance that docker-compose is going to setup for us. By default this is 5432.

All you've got to do now is run docker-compose up -d.

The admin UI is available at the URL you set for your server, and appending /login to the path. The default credentials are username: [email protected], password: admin.

Enter your app URL in the Joplin client configuration section, together with your username as password, and it should start synchronizing immediately!

Traefik

I run a loadbalancer on my Docker instance because I run a few web services on here. It would be nice if I also got Joplin to work over secure HTTPS using Traefik.

For that I had to edit the docker-compose.yml file, and add some labels to the Joplin container, as well as unpublish the ports.

I have created two networks. One for my loadbalancer called web, with the external flag set to true, and one called internal, so that the app can talk to the database.
I have added the PostgreSQL container to the internal network, and the app container to the web and internal networks.
I have also added the necessary tags for Traefik to be recognized. The most important one here is this one traefik.http.services.YOUR-SERVICE-NAME.loadbalancer.server.port=22300.
This tells Traefik to reach the server at port 22300.

You just have to run docker-compose up -d after that, and everything should work perfectly.

Conclusion

I have cut down synchronization times from around 5 minutes on Dropbox, to less than 10 seconds with this Joplin server.
I am a satisfied man.

Would you like to see more posts like this or is there something wrong with this post? Leave me a comment below!