FOSSFEEDWhere activity matters more than stars. Discover Fire Pit Noted Submit a project
← All articles

How to Install Joplin Server Using Docker Compose Copy title

Learn how to install Joplin Server using Docker Compose and PostgreSQL, configure secure remote access, and sync your notes across desktop and mobile devices.

I've tried quite a few note-taking and wiki applications over the years, and I always seem to find something missing that eventually sends me looking for another option. When I revisited Joplin, I discovered that it offered something I'd previously overlooked: the ability to run my own synchronization server.

Joplin is a free, open-source note-taking application available for Windows, macOS, Linux, Android, and iOS. It supports Markdown, notebooks, tags, and optional end-to-end encryption. With Joplin Server, you can synchronize your notes across devices while keeping control of the server hosting your synchronization data.

In this guide, I'll show you how to install Joplin Server using Docker Compose and PostgreSQL, then connect your desktop and mobile applications so everything stays in sync.

Key Features I Like About Joplin #

  • Cross-platform support: Desktop applications for Windows, macOS, and Linux, along with mobile apps for Android and iOS.
  • Self-hosted synchronization: Use Joplin Server to keep your notes synchronized between devices without relying on a third-party sync provider.
  • End-to-end encryption: Optional encryption protects your synchronized notes and attachments.
  • Markdown support: Create notes with formatting, code snippets, images, and attachments.
  • Notebooks and organization: Organize notes using notebooks, sub-notebooks, tags, and search.
  • Customization: Themes, dark mode, and an extensive plugin library for supported desktop clients.

Another feature I appreciate is that Joplin keeps a local copy of your notes on each synchronized device. If your Joplin Server goes offline, you can still access and edit notes that have already synced. Your changes will synchronize once the server is available again.

Joplin Server handles synchronization between devices, while the desktop and mobile applications are where you create and manage your notes. You don't need Joplin Server to use Joplin, but it's a useful option if you want to host your own synchronization service.

What's even more awesome? If your Joplin Server goes offline for whatever reason, you still have access to your notes on your devices that were previously synced. You just cannot sync new notes or to-do lists to the server until it comes back online.

💡
Joplin Sync Server is nothing more than a middle man that passes notes to your devices. It's only function is to sync your notes between devices connected to the server. This is good for teams, businesses and groups of people who need to share notes across devices. It is not required to use Joplin apps. Joplin also stores your notes locally.

Install Joplin Server Using Docker Compose #

We'll use Docker Compose to deploy Joplin Server alongside PostgreSQL, which stores the server's synchronization data. I'm using PostgreSQL 16 for this example, along with a persistent Docker volume to keep the database intact when containers are recreated.

You can deploy this stack through Portainer or directly using Docker Compose.

Before deploying, replace CHANGE_THIS_PASSWORD with a strong database password and update APP_BASE_URL to match the address you'll use to access Joplin Server.

If you're using a reverse proxy, enter your HTTPS domain, such as https://joplin.example.com. For a local installation without a reverse proxy, use an address such as http://192.168.1.100:22300, replacing the IP with your Docker server's address.

Unlike the original configuration, PostgreSQL is only accessible to the Joplin container through Docker's internal network. There's no reason to expose the database port to your entire network.

Once everything is configured, deploy the stack and allow the containers to initialize. PostgreSQL will create the database automatically, and Joplin Server will connect using the credentials you've supplied.


services:
  db:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_USER: joplin
      POSTGRES_PASSWORD: ${JOPLIN_DB_PASSWORD}
      POSTGRES_DB: joplin
    volumes:
      - joplin_db:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U joplin -d joplin"]
      interval: 10s
      timeout: 5s
      retries: 5

  app:
    image: joplin/server:latest
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "22300:22300"
    environment:
      APP_PORT: 22300
      APP_BASE_URL: ${APP_BASE_URL}
      DB_CLIENT: pg
      POSTGRES_HOST: db
      POSTGRES_PORT: 5432
      POSTGRES_DATABASE: joplin
      POSTGRES_USER: joplin
      POSTGRES_PASSWORD: ${JOPLIN_DB_PASSWORD}

volumes:
  joplin_db:

Environment variables #

For readers using Docker Compose from the terminal, create a .env file alongside the Compose file:

JOPLIN_DB_PASSWORD=CHANGE_THIS_PASSWORD
APP_BASE_URL=https://joplin.example.com

Replace both example values before deployment. If using Portainer Stacks, add the same variables in Portainer's environment-variable section.

Then deploy with:

docker compose up -d

Accessing Joplin Server #

Once the containers are running, open Joplin Server using the address you configured in APP_BASE_URL. For a local installation, this might be http://192.168.1.100:22300. If you're using a domain with a reverse proxy, access it through your HTTPS address instead.

Joplin Server includes a web administration panel where you can manage users, review server settings, and monitor synchronization activity. The default login credentials are:

  • Email: admin@localhost
  • Password: admin

Change the default administrator password immediately after signing in. Open your profile settings in the administration panel and set a strong, unique password.

Setting Up Cloudflare Tunnel #

I now use Cloudflare Tunnel to access my self-hosted applications through custom domains without opening ports on my router. It's a convenient way to make Joplin Server accessible remotely while keeping the server itself behind my home network.

If you already have Cloudflare Tunnel configured, open your Cloudflare dashboard and add a new published application route (called a public hostname in some versions of the dashboard) using the following settings:

SettingValue
Subdomainjoplin
Domainexample.com
Service typeHTTP
Service URL192.168.1.100:22300

Replace the example domain and IP address with your own. The tunnel needs to be able to reach Joplin Server on port 22300. If your cloudflared container shares a Docker network with Joplin, you can use http://app:22300 as the internal service address, provided app resolves to the Joplin container on that network.

Make sure the APP_BASE_URL environment variable in your Docker Compose stack matches your public address:

APP_BASE_URL=https://joplin.example.com

Once you've saved the route, open your Joplin domain and confirm the administration login page loads over HTTPS. Cloudflare handles the public HTTPS connection, while the tunnel forwards requests to Joplin Server.

Important: Cloudflare Tunnel provides a secure connection path, but it doesn't automatically restrict who can reach your application. Anyone who knows the public hostname may be able to access the Joplin login page unless you configure additional access controls. Use a strong administrator password and keep Joplin Server updated.

Connect Joplin Desktop and Mobile Apps #

Now that Joplin Server is running, we can connect our devices and start synchronizing notes. Joplin provides applications for Windows, macOS, Linux, Android, and iOS, all of which can connect to your self-hosted server.

Before opening the desktop application, log in to your Joplin Server administration panel and navigate to Users. Create a new user account with your preferred email address and password. I recommend keeping this separate from your administrator account, which should only be used for managing the server.

Next, download Joplin for your preferred device. I originally started with the Windows desktop application on my work laptop, but the process is similar across supported platforms.

Configure Joplin Synchronization #

Open the Joplin desktop application and navigate to Tools → Options → Synchronisation. On macOS, open Joplin's preferences instead.

Under Synchronisation target, select Joplin Server and enter the following information:

SettingValue
Joplin Server URLhttps://joplin.example.com
EmailYour Joplin user email
PasswordYour Joplin user password

Replace the example URL with your own Joplin Server address. This should be the same address configured in APP_BASE_URL in your Docker Compose stack.

Click Check synchronisation configuration to verify that Joplin can communicate with your server. If the connection succeeds, apply the settings and click Synchronise to begin uploading your notes.

You can repeat the process on your mobile devices by opening Joplin's configuration settings, selecting Joplin Server as the synchronization target, and entering the same account details.

Once synchronization is configured, changes will sync between your devices when they can connect to your server. Joplin also stores notes locally, so you can continue accessing previously synchronized content even when your server is temporarily unavailable.

Note: If you already have notes stored using another synchronization provider, back them up before switching to Joplin Server. Allow the initial synchronization to finish before making major changes on multiple devices.

Managing Your Joplin Server #

Once you begin creating notes in the Joplin desktop or mobile applications, you'll notice synchronization data appearing in the Joplin Server administration panel under Items. This is where you can confirm that your devices are communicating with the server and uploading their data.

The administration panel is fairly basic, which I actually appreciate. You can manage user accounts, view synchronization items, check logs, and review scheduled tasks. However, you cannot open and edit your notes directly from the server's web interface. For that, you'll continue using the Joplin desktop or mobile applications.

A Note About End-to-End Encryption #

Joplin supports optional end-to-end encryption (E2EE), which protects your synchronized notes and attachments from being read by the server or anyone without the appropriate encryption keys.

To enable it, open the Joplin desktop application, navigate to the encryption settings, and follow the instructions to create an encryption password. Allow the initial synchronization to finish before enabling encryption on your other devices, then enter the encryption password on each additional device when prompted.

You can find detailed instructions in the official Joplin encryption guide.

One thing I particularly like about Joplin Server is how little attention it requires once everything is configured. I rarely need to visit the administration panel unless I'm checking synchronization activity or managing accounts.

And since Joplin stores your notes locally on each device, you can still access previously synchronized notes if your server temporarily goes offline. Any changes you make will synchronize once the connection is restored.

Why Use Joplin Server Instead of Dropbox or Other Alternatives? #

Joplin already supports several synchronization options, including Dropbox, OneDrive, Nextcloud, and WebDAV, so running your own Joplin Server certainly isn't required. However, I prefer having a dedicated synchronization service running on my own hardware rather than relying on another cloud provider.

One advantage of Joplin Server is that it was designed specifically for Joplin. It supports user accounts, notebook sharing, and publishing individual notes through shareable links. This makes it useful if you want to collaborate with other Joplin users or make certain notes publicly accessible. Joplin Server can also offer better synchronization performance compared with some general-purpose storage services.

Of course, self-hosting means you're responsible for keeping the server updated, securing access, and maintaining database backups. If you already use Nextcloud or Dropbox and everything works well, there's nothing wrong with continuing to use them. For me, having a dedicated server that I control is worth the additional maintenance.

Final Notes and Thoughts #

I've tried quite a few note-taking applications over the years, but Joplin remains one of my favorites. I appreciate how straightforward it is to use, and having my own synchronization server makes it even more appealing. Once everything is configured, there's very little to think about beyond using the application and occasionally checking that everything is running properly.

If you're already running Docker, Joplin Server is a nice addition to your collection of self-hosted applications. Just remember to keep regular backups of your PostgreSQL database, especially if you're storing important notes. Having your data on your own server is great, but it also means you're responsible for keeping it safe.

You can find more information, downloads, and documentation on the official Joplin website. If you're looking for more applications to run alongside Joplin, check out our other self-hosted software reviews.

Comments 0

Join the conversation.

Write a comment

No comments yet. Be the first to comment.

Leave a comment

Anonymous comments are reviewed before publication. Sign in to comment as a member.

Navigation