On this page
- What does Joplin Server add?
- How do you write the Compose file?
- How do you start the server and check it?
- How do you put HTTPS in front?
- How do you secure the admin account?
- How do you configure outgoing mail?
- How do you connect the Joplin apps?
- How do you back up and upgrade Joplin Server?
- What if sync fails?
- Questions
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.ymlservices:
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 22300The 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/tcpThe 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.netApply 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; echoThe 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_URLdiffers from the address the app uses. - 413 errors on attachments: increase
client_max_body_sizein Nginx. - App container restarts: the database password in
.envno longer matches the one the database was created with; fix it or resetpgdataon 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.
| Plan | Fits because | Size | Monthly | Order from |
|---|---|---|---|---|
| A1-1 | one or two users with text notes | 1 vCPU, 1 GB RAM, 25 GB NVMe | $3.60/mo | $43.20 for 12 months |
| A1-2 | a household with attachments | 1 vCPU, 2 GB RAM, 50 GB NVMe | $7.20/mo | $43.20 for 6 months |
| A2-4 | a small team with shared notebooks | 2 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.
More in Self-hosted apps
- Nextcloud on Nginx
- ownCloud Infinite Scale
- Seafile file sync
- Vaultwarden password vault
- Passbolt team password manager
- Gitea Git hosting
- Forgejo Git server
- GitLab Community Edition
- Gogs Git service
- Wiki.js
- BookStack documentation
- Outline knowledge base
- Paperless-ngx documents
- n8n workflow automation
- Activepieces automation
- Plausible Analytics (Community Edition)
- Umami analytics
- Mattermost team chat
- Matrix Synapse with Element
- Jitsi Meet video calls
- ONLYOFFICE Docs with Nextcloud
- HashiCorp Vault secrets server
- OpenBao secrets management
- Infisical secrets manager
- Authelia SSO and forward auth
- Zitadel identity platform
- VS Code in the browser (code-server)
- Firefly III personal finance
- Snipe-IT asset tracking
- Odoo ERP on Ubuntu or Debian
- ERPNext with frappe_docker
- Dolibarr ERP and CRM with Nginx
- Penpot design tool with Docker
- Planka kanban boards
- Leantime project management
- Wekan boards with Docker
- Cal.com scheduling
- Chatwoot support inbox
- Mautic marketing automation
- DocuSeal document signing
- Metabase dashboards
- Appwrite backend server
- Self-hosted Supabase
- PocketBase backend
- RustDesk relay server
- Traccar GPS tracking
- Redmine project tracker
- The Lounge IRC client
- CyberChef data toolbox
- Typebot chat forms
- AFFiNE workspace
- Overleaf Community Edition
- Neko shared virtual browser
- imgproxy image resizing
- NetBox network inventory
- UVdesk help desk
- YetiForce CRM