GuidesFiles, photos and homeBookmarks with Linkwarden

Run Linkwarden with rootless Docker

Linkwarden 2 on Debian 13, the open-source bookmark manager that keeps a copy of every page you save, in rootless Docker under a user of its own behind Caddy, with full-text search.

Tested on Docker steps follow the tested rootless Docker base guide on Debian 13 with Docker Engine 29.10.1, Compose 5.8.1 and rootlesskit 3.3.0; the app version and app-specific behaviour are from the tested Podman guide on a Melonslab server. Not re-tested end to end under Docker. Updated November 28, 2026

Recommended server for this guide

SSD RAID 1 · ECC DDR4 · 10 Gbit

VC-P Alloy · 2 vCPU · 8 GB Memory · 60 GB Storage

Month to month, no lock-in 7-day money-back guarantee

€8.99/mo

Deploy now

Quick install on a fresh VM

This command sets up a rootless container engine and a directory for this service. Podman is the default; add --engine docker to the command to use Docker instead.

curl -fsSL https://www.melonslab.com/install/rootless.sh | bash -s -- --app linkwarden-docker --manifest linkwarden --sha256 282fc9cef0c36cc31dd7e0e7435d461bb15b8c7ea3bfbe7516c7268fdd0357e2
View the script

SHA-256: 97785be3e3e91393181a4a7caeab5f4b52803bf52e960dd488945cb38c6473a2

Run this guide on Melonslab

We ran every step below on our own server. For this workload we recommend VC-P Alloy at €8.99/mo. Order it, pick Debian 13, and follow the guide.

  1. 1. Order the server. Use the button below to order the recommended plan. Choose Debian 13 when the installer asks for an operating system.
  2. 2. Add IPv4 if needed. Add it on the order form when the guide publishes a service on the internet. It is a paid add-on, not included in the plan.
  3. 3. Connect over SSH. Log in as root with the address and credentials from your order, then run the commands below.
  4. 4. Follow the verified steps. Every command in this guide was run on a Melonslab server before it was published.
Deploy now
On this page

What you will set up

Linkwarden saves your bookmarks, and keeps its own copy of each page: a screenshot, a PDF, a readable text version and a single-file copy of the page itself. When a page changes or disappears, your copy stays. You sort links into collections, tag them, share collections with others, and search the text of every page you saved.

Here it runs as a Compose project under a user of its own called linkwarden, behind Caddy from the Docker guide: Linkwarden itself, PostgreSQL for its data, and Meilisearch for its search.

The app-specific results below come from the tested Podman guide on a Melonslab server with Debian 13:

  • Linkwarden 2.16.3 saved a page, and within a minute made all four copies of it.
  • A search for a word that appeared only in the page's text found it.
  • Once sign-ups were turned off, a new account could not be created.
  • Everything came back by itself after a reboot.

In the Podman test, the pod used about 500 MB of memory, and more for a short while each time it saves a page, since it opens the page in a browser.

The Docker version below follows the tested rootless Docker base guide. The app-specific results above come from the tested Podman guide on a Melonslab server; they were not measured under Docker.

Before you start

You need:

  • a server set up as in the Docker guide, with Caddy running;
  • an A record and an AAAA record for links.example.com pointing at your server.

Replace links.example.com with your own name throughout.

1. Create the user

As root:

useradd -m -s /bin/bash linkwarden
loginctl enable-linger linkwarden
uid=$(id -u linkwarden)

Everything up to step 4 runs as linkwarden.

2. Create the secrets

The passwords are generated with the Compose file in the next step and kept in a 0600 file under the app directory.

The file holds the database password for PostgreSQL and the address Linkwarden connects to, the secret that signs Linkwarden's logins and the Meilisearch key.

3. Define the Compose project

Create a Compose file in the app's directory. It uses the same images, ports, volumes, environment and restart policy as the Podman guide:

mkdir -p /home/linkwarden/linkwarden
cat > /home/linkwarden/linkwarden/compose.yaml <<'YAML'
services:
  db:
    image: docker.io/library/postgres:16-alpine
    volumes:
      - db:/var/lib/postgresql/data
    env_file: linkwarden.env
    restart: always
  search:
    image: docker.io/getmeili/meilisearch:v1.13.3
    volumes:
      - search:/meili_data
    environment:
      MEILI_ENV: production
      MEILI_NO_ANALYTICS: "true"
    env_file: linkwarden.env
    restart: always
  app:
    image: ghcr.io/linkwarden/linkwarden:latest
    ports:
      - "127.0.0.1:8096:3000"
    volumes:
      - data:/data/data
    environment:
      NEXTAUTH_URL: https://links.example.com/api/v1/auth
      MEILI_HOST: http://127.0.0.1:7700
    env_file: linkwarden.env
    restart: always
volumes:
  db:
  search:
  data:
YAML
umask 077
dbpw=$(openssl rand -hex 24)
printf 'POSTGRES_PASSWORD=%s\nDATABASE_URL=postgresql://postgres:%s@127.0.0.1:5432/postgres\nNEXTAUTH_SECRET=%s\nMEILI_MASTER_KEY=%s\n' "$dbpw" "$dbpw" "$(openssl rand -hex 32 | tr -d '\n')" "$(openssl rand -hex 32 | tr -d '\n')" > /home/linkwarden/linkwarden/linkwarden.env
unset dbpw
chmod 600 /home/linkwarden/linkwarden/linkwarden.env
chown -R linkwarden:linkwarden /home/linkwarden/linkwarden
uid=$(id -u linkwarden)
runuser -u linkwarden -- env HOME=/home/linkwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/linkwarden/linkwarden && docker compose up -d"

Use the weekly docker-update.service/docker-update.timer from the rootless Docker guide instead of Podman's auto-update timer. It runs docker compose pull and docker compose up -d in the app directory each Sunday. Set it up once for linkwarden as shown there; it covers every Compose app in that user's home.

The first start downloads the images, which take about 2.2 GB of disk, and takes a couple of minutes.

4. Put Caddy in front

Go back to root with exit, switch to runuser -u caddy -- /bin/bash, and add this block at the end of ~/Caddyfile:

links.example.com {
    reverse_proxy 127.0.0.1:8096
}

Restart Caddy with docker compose restart caddy from /home/caddy/caddy as caddy.

5. Create your account, then close sign-ups

Open https://links.example.com/register, and create your account with a Display Name, a Username and a Password. Then log in. Create accounts for anyone else who will use it the same way.

Anyone who finds the address can sign up until you close it. As linkwarden, add NEXT_PUBLIC_DISABLE_REGISTRATION: "true" under app.environment in compose.yaml.

Then restart Linkwarden:

uid=$(id -u linkwarden)
runuser -u linkwarden -- env HOME=/home/linkwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/linkwarden/linkwarden && docker compose up -d --force-recreate app"

A sign-up after that gets Registration is disabled.

Choose New Link, paste an address, and pick a collection and tags if you like. Within a minute, the link shows its preview, and its menu has the screenshot, the PDF, the readable version and the copy of the page. The search at the top looks through names, addresses, tags and the text of every saved page.

Linkwarden also has browser extensions and apps for phones, which log in with your server's address, https://links.example.com, and your account.

7. Back up

As linkwarden:

uid=$(id -u linkwarden)
runuser -u linkwarden -- env HOME=/home/linkwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash <<'SH'
cd /home/linkwarden/linkwarden
umask 077
mkdir -p ~/backup
docker compose exec -T db pg_dump -U postgres postgres > ~/backup/linkwarden-db.sql
docker compose stop app search
tar -cf ~/backup/linkwarden-data.tar -C /home/linkwarden/linkwarden data
tar -cf ~/backup/linkwarden-search.tar -C /home/linkwarden/linkwarden search
docker compose up -d search app
SH

That saves your accounts, links and collections, the saved copies of the pages, and the search index. Copy ~/backup to another machine, and keep it private.

Troubleshooting

Links never get a preview or copies. Linkwarden's worker makes them, and logs each link it works on: docker compose logs app | grep worker shows what happened.

A sign-up still works after step 5. The NEXT_PUBLIC_DISABLE_REGISTRATION line is missing, or Linkwarden was not restarted after daemon-reload.

Run it on your own server

SSD RAID 1 · ECC DDR4 · 10 Gbit

VC-P Alloy

€8.99/mo

vCPU
2
Memory
8 GB
Storage
60 GB
Transfer
10 TB
Performance
SSD · RAID 1
  • Full root access
  • Native /64 IPv6
  • RAID-protected storage
  • Malmö, Sweden
  • Month to month, no lock-in
  • 7-day money-back guarantee
All guides