Skip to content

Setup Joplin

Overview

Joplin is an open source note-taking app. Capture your thoughts and securely access them from any device.

Important Docker Files

.env file

.env
NAME=joplin
TZ=America/New_York
DOMAIN=
DB_NAME=joplin
DB_USER=joplin
DB_PASS=
APPDATA=
SMTP_HOST=
SMTP_PORT=
SMTP_TLS=
SMTP_USER=
SMTP_PASS=
NOREPLY=
EMAIL=
HOSTNAME=https://${NAME}.${DOMAIN}
PORT=22300

docker-compose.yml file

docker-compose.yml
services:
  joplin:
    container_name: ${NAME}
    image: joplin/server
    restart: unless-stopped
    networks:
      - internal-db
      - proxy
    dns:
      - '10.1.10.1'
    depends_on:
      - ${NAME}-db
    environment:
      APP_BASE_URL: https://${NAME}.${DOMAIN}
      DB_CLIENT: pg
      POSTGRES_HOST: ${NAME}-db
      POSTGRES_DATABASE: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASS}
      MAILER_ENABLED: 1
      MAILER_HOST: ${SMTP_HOST}
      MAILER_PORT: ${SMTP_PORT}
      MAILER_SECURITY: ${SMTP_TLS}
      MAILER_AUTH_USER: ${SMTP_USER}
      MAILER_AUTH_PASSWORD: ${SMTP_PASS}
      MAILER_NOREPLY_NAME: ${NOREPLY}
      MAILER_NOREPLY_EMAIL: ${EMAIL}
    labels:
      swag: enable
      swag_address: ${NAME}
      swag_port: ${PORT}
      swag_proto: http
      swag_url: ${NAME}.${DOMAIN}
      com.centurylinklabs.watchtower.enable: true
  joplin-db:
    container_name: ${NAME}-db
    #image: pgautoupgrade/pgautoupgrade:17-alpine
    image: postgres:17-alpine
    restart: unless-stopped
    healthcheck:
      interval: 10s
      retries: 10
      test: pg_isready -U ${DB_USER} -d ${DB_NAME}
      timeout: 2s
    networks:
      - internal-db
    environment:
      TZ: ${TZ}
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASS}
    volumes:
      - ${APPDATA}/${NAME}/${NAME}-db:/var/lib/postgresql/data
    labels:
      com.centurylinklabs.watchtower.enable: true
networks:
  internal-db:
    external: true
  proxy:
    external: true

Start the Container

Start the Container
docker compose up -d