Linkding

See also the blog post: Linkding: A Simple Tool for My Bookmarks

Docker Setup

In my setup, I use a Caddy server as a reverse proxy in front of the Linkding server. It handles the SSL certificate. Caddy obtains a certificate from an internal PKI via ACME and renews it automatically.
For publicly accessible servers, Caddy can also obtain certificates from Let’s Encrypt.

If you do not need this, you can leave it out.
In my case, everything runs inside an LXC container in Proxmox. Linkding exposes port 80. SSL encryption is handled when accessing port 443, which is managed by Caddy.

services:
  caddy:
    container_name: caddy
    image: caddy:latest
    restart: unless-stopped
    ports:
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
      - caddy_config:/config
      
      # This is only for my root CA; you can omit it or replace it with your own certificate
      - /usr/local/share/ca-certificates/muench-lan-root-ca.crt:/usr/local/share/ca-certificates/muench-lan-root-ca.crt:ro
    depends_on:
      - linkding

  linkding:
    container_name: "${LD_CONTAINER_NAME:-linkding}"
    image: sissbruecker/linkding:latest-plus
    ports:
      - 80:9090
    volumes:
      - "${LD_HOST_DATA_DIR:-./data}:/etc/linkding/data"
    env_file:
      - .env
    restart: unless-stopped

volumes:
  caddy_data:
  caddy_config:

Configuration

A template for the Linkding .env file is available here: https://github.com/sissbruecker/linkding/blob/master/.env.sample

I switched the database from SQLite (the default without explicit configuration) to Postgres.
I then set the engine to postgres in my .env file.

# Database engine, can be sqlite (default) or postgres
LD_DB_ENGINE=postgres
# Database name (default: linkding)
LD_DB_DATABASE=linkding
# Username to connect to the database server  (default: linkding)
LD_DB_USER=linkding
# Password to connect to the database server
LD_DB_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# The hostname where the database is hosted (default: localhost)
LD_DB_HOST=postgres.muench.lan
# Port use to connect to the database server
# Should use the default port if not set
LD_DB_PORT=5432
# Any additional options to pass to the database (default: {})
LD_DB_OPTIONS=