Log inSign up

Sync Joplin notes through your own server

Write a Docker Compose file with the joplin/server image and PostgreSQL, set APP_BASE_URL=https://notes.example.net, bind port 22300 to loopback and run docker compose up -d. Put Caddy or Nginx with HTTPS in front, sign in with the default admin account and change its credentials at once. In every Joplin app choose Joplin Server as the sync target and enter the URL, email and password.

Topic: Self-hosted apps · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

What does Joplin Server add?

Joplin Server is the official sync back end for the Joplin note apps. Plain file-based sync targets work too, but the server adds faster sync, note sharing between users, published notes with public links, and an admin page for accounts and storage quotas.

The requirements are modest: Docker with Compose (installed as in Docker Engine, or start from the Docker app image), around 1 GB of memory for a household, and a hostname such as notes.example.net with DNS records pointing at the server. Disk use grows with attachments, so size the plan by storage if you keep many PDFs and images.

How do you write the Compose file?

Create a project folder with a random database password and a Compose file for the two services.

sudo mkdir -p /opt/joplin && cd /opt/joplin
echo "PGPASS=$(openssl rand -hex 16)" | sudo tee .env
sudo chmod 600 .env
sudo nano docker-compose.yml
services:
  db:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_USER: joplin
      POSTGRES_PASSWORD: ${PGPASS}
      POSTGRES_DB: joplin
    volumes:
      - ./pgdata:/var/lib/postgresql/data
  app:
    image: joplin/server:latest
    restart: unless-stopped
    depends_on:
      - db
    ports:
      - '127.0.0.1:22300:22300'
    environment:
      APP_PORT: 22300
      APP_BASE_URL: https://notes.example.net
      DB_CLIENT: pg
      POSTGRES_HOST: db
      POSTGRES_PORT: 5432
      POSTGRES_DATABASE: joplin
      POSTGRES_USER: joplin
      POSTGRES_PASSWORD: ${PGPASS}

Compose reads PGPASS from the .env file next to it. Swap latest for a specific version tag from the image page so upgrades happen when you decide. APP_BASE_URL must match the public HTTPS address exactly, without a trailing slash, or links and logins break.

How do you start the server and check it?

Start both containers, follow the logs through the migrations, then ping the API.

cd /opt/joplin
sudo docker compose up -d
sudo docker compose logs -f app       # wait for the "listening" line
curl -s http://127.0.0.1:22300/api/ping; echo
sudo ss -tlnp | grep 22300

The ping answers with a short JSON status saying the server is running. The ss output should list 127.0.0.1:22300 only, which keeps the plain HTTP port off the internet. More Compose tips are in the Docker Compose guide.

How do you put HTTPS in front?

Proxy the hostname to port 22300 and let the proxy obtain certificates. Caddy needs three lines:

notes.example.net {
    reverse_proxy 127.0.0.1:22300
}

For Nginx, a basic block works; raise the body size so large attachments upload:

server {
    listen 80;
    listen [::]:80;
    server_name notes.example.net;
    client_max_body_size 200M;
    location / {
        proxy_pass http://127.0.0.1:22300;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d notes.example.net
sudo ufw allow 80,443/tcp

The Nginx reverse proxy guide explains each header if you want to tune it further.

How do you secure the admin account?

Sign in at https://notes.example.net/login with the default admin@localhost and password admin, then change both immediately under your profile. Anyone who finds the server before you do could otherwise take it over, so do this right after the first start. From the admin area you can create accounts for family or colleagues, set per-user storage limits and disable sign-up pages you do not need.

How do you configure outgoing mail?

Joplin Server uses mail for password resets and account confirmation. Add mailer variables to the app service and point them at an authenticated relay on port 587:

      MAILER_ENABLED: 1
      MAILER_HOST: smtp.example.net
      MAILER_PORT: 587
      MAILER_SECURITY: starttls
      MAILER_AUTH_USER: notes@example.net
      MAILER_AUTH_PASSWORD: relay-password
      MAILER_NOREPLY_NAME: Joplin
      MAILER_NOREPLY_EMAIL: notes@example.net

Apply with sudo docker compose up -d. Direct delivery on port 25 is not promised to be available, so ask support with a ticket before building on it; the relay route on 587 works regardless. The SMTP relay guide covers SPF and DKIM for the sender domain.

How do you connect the Joplin apps?

In each desktop or mobile app open Options (or Configuration), then Synchronisation, and choose Joplin Server as the target. Enter https://notes.example.net, the account email and password, press Check synchronisation configuration, and save. The first sync uploads existing notes; large notebooks take a while.

For privacy, enable end-to-end encryption in the app settings. Notes are then encrypted on each device before upload, so the server stores only ciphertext. Remember the master password: without it, encrypted notes cannot be read on a new device.

How do you back up and upgrade Joplin Server?

Dump the database regularly, then upgrade by changing the image tag and recreating the container.

cd /opt/joplin
sudo docker compose exec -T db pg_dump -U joplin joplin | gzip > /root/joplin-$(date +%F).sql.gz
sudo nano docker-compose.yml          # new joplin/server tag
sudo docker compose pull && sudo docker compose up -d
curl -s http://127.0.0.1:22300/api/ping; echo

The server migrates its schema on start. Keep the apps on releases that support the server version; the release notes say when a minimum client version changes. Copy the dumps off the server, or turn on the daily backups add-on as a second copy.

What if sync fails?

  • "Invalid origin" or login loops: APP_BASE_URL differs from the address the app uses.
  • 413 errors on attachments: increase client_max_body_size in Nginx.
  • App container restarts: the database password in .env no longer matches the one the database was created with; fix it or reset pgdata on a fresh install.
  • Slow first sync: normal for large notebooks; watch progress in the app sync log.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A1-1one or two users with text notes1 vCPU, 1 GB RAM, 25 GB NVMe$3.60/mo$43.20 for 12 months
A1-2a household with attachments1 vCPU, 2 GB RAM, 50 GB NVMe$7.20/mo$43.20 for 6 months
A2-4a small team with shared notebooks2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months

Questions about Joplin Server for notes sync

Can I use SQLite instead of PostgreSQL?

Joplin Server can run on SQLite for testing, but PostgreSQL is the documented choice for real use. It handles concurrent devices and larger data sets better.

How many users fit on a small plan?

A household or small team runs well on a 1 to 2 GB plan. Disk space for attachments is usually the first limit.

Are my notes readable on the server?

Without end-to-end encryption, the server stores notes in the database in readable form. Turn on encryption in the apps if only the devices should be able to read them.

Can I share notebooks with other users?

Yes. Joplin Server supports sharing notebooks between accounts on the same server and publishing single notes as web pages.

Do I need a separate domain?

A subdomain such as notes.example.net is enough. Create the record as shown in DNS records before requesting the certificate.