# Self-host Linkwarden

> A self-hosted collaborative bookmark manager that saves links and preserves a copy of each page (screenshot, PDF, readable text, HTML) using a bundled headless browser. Run your own Linkwarden on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.

_Updated November 23, 2026_

Running your own Linkwarden usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Linkwarden behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.

## Just ask your agent

Open a Plus workspace (Linkwarden runs in Docker, which Plus and Pro include), tap **Launch** to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:

```text
Set up Linkwarden on this workspace and give me the link. Follow https://envhaven.com/self-host/linkwarden.md
```

Then open the link it sends and create your Linkwarden account straight away, before anyone else finds the address. That is the whole request: the address in it is this page's Markdown copy, and the agent follows the instructions for it further down, with every setting Linkwarden's docs require.

## Or keep it private with Tailscale

The preview URL puts Linkwarden on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Linkwarden an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace's **Vars** pane as `TS_AUTHKEY`, and ask the agent:

```text
Set up Linkwarden on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/linkwarden.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
```

- A Tailscale container runs beside Linkwarden, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
- Anything other services have to reach, such as a webhook, still needs a public address. [Keep self-hosted apps private with Tailscale](https://envhaven.com/guides/self-host-privately-with-tailscale) covers both, and what Tailscale's free plan includes.

| At a glance |  |
| --- | --- |
| What it is | Bookmarks, feeds and reading |
| License | AGPL-3.0 |
| Runs as | Docker (`ghcr.io/linkwarden/linkwarden`) |
| Memory | 4 GB is a comfortable starting point; about 350 MB idle since release 2.15 ([docs](https://docs.linkwarden.app/self-hosting/setup)) |
| Plan that fits | Plus or larger |
| Web port | 3000 |
| Documentation | [docs.linkwarden.app/self-hosting/setup](https://docs.linkwarden.app/self-hosting/setup) |

## What your agent takes care of

- **Installing it.** Linkwarden runs from the official image, `ghcr.io/linkwarden/linkwarden`, with its data in folders under `~/apps/linkwarden`.
- **Putting it on an HTTPS address.** The workspace's preview URL serves it, and your own domain can too.
- **Locking it down first.** What Linkwarden's docs say to set before it faces the internet, below.
- **Telling you what to back up**: ./data (STORAGE_FOLDER: archives, previews, uploads), mounted at /data/data, ./pgdata (PostgreSQL data), ./meili_data (Meilisearch index, if used) and .env ([docs](https://docs.linkwarden.app/self-hosting/environment-variables)).

### The settings it needs behind a proxy

- `NEXTAUTH_URL` (required): Full NextAuth base URL including the /api/v1/auth suffix, e.g. https://app.example.com/api/v1/auth. ([docs](https://docs.linkwarden.app/self-hosting/environment-variables))
- `BASE_URL`: Public base URL without the auth suffix; used by emails such as password reset and verification. ([docs](https://docs.linkwarden.app/self-hosting/environment-variables))
- `BASE_URL` use: Set both after the reverse proxy is in place. ([docs](https://docs.linkwarden.app/self-hosting/reverse-proxy))
- Proxy headers in the documented nginx site (Host, X-Forwarded-Host, X-Forwarded-Proto, X-Forwarded-For, Upgrade, Connection); no trusted-proxy variable is documented: Headers the example proxy forwards, including the WebSocket upgrade pair. ([docs](https://docs.linkwarden.app/self-hosting/reverse-proxy))
- `NEXT_PUBLIC_USER_CONTENT_DOMAIN` (optional): Separate origin for preserved HTML so untrusted archived pages stay off the app origin. ([docs](https://docs.linkwarden.app/self-hosting/environment-variables))
- Cloudflare: The docs' optional Cloudflare steps: proxy the DNS record and use SSL/TLS mode Full (strict). ([docs](https://docs.linkwarden.app/self-hosting/reverse-proxy))

### Before it faces the internet

- The first account created becomes the administrator; create it before the instance is reachable. ([docs](https://docs.linkwarden.app/self-hosting/setup))
- Change NEXTAUTH_SECRET, POSTGRES_PASSWORD and MEILI_MASTER_KEY to different secrets. ([docs](https://docs.linkwarden.app/self-hosting/setup))
- Self-service registration is open by default. ([docs](https://docs.linkwarden.app/self-hosting/environment-variables))
- Serve preserved HTML from a separate hostname to isolate untrusted archived pages. ([docs](https://docs.linkwarden.app/self-hosting/user-content-domain))

## Things to ask next

Everything after the install is one more sentence to the agent. Some that come up:

- "Import the bookmarks file I dropped into the workspace."
- "Add these ten feeds and sort them into folders by topic."
- "Move Linkwarden to app.example.com." Add the domain on the dashboard's Domains page with a CNAME to `domains.envhaven.app`, and the agent changes Linkwarden's address settings to match.
- "Update Linkwarden to the latest release." It pulls the new image and recreates the container, data kept.

## Instructions for the agent

The agent reads these from the page's Markdown copy. They also work pasted on their own, if you would rather give them in your own words.

```text
Set up Linkwarden on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, ghcr.io/linkwarden/linkwarden, starting from the docs' compose file: https://github.com/linkwarden/linkwarden/blob/v2.17.0/docker-compose.yml. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- The docs' setup includes: postgres (postgres:16-alpine); meilisearch (getmeili/meilisearch:v1.13.3, optional); the headless browser is bundled in the Linkwarden image.
- Keep the compose file in ~/apps/linkwarden and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Linkwarden's port 3000.
- The preview URL terminates HTTPS in front of Linkwarden: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/linkwarden.md for the preview URL, as Linkwarden's docs describe for running behind a proxy; skip any that apply only when Linkwarden serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/linkwarden.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Linkwarden up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.
```

## What to know

- In Docker, Linkwarden's containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
- Direct file uploads (PDF, image, HTML, text) are capped at 10 MB by default (NEXT_PUBLIC_MAX_FILE_BUFFER), well under Cloudflare's 100 MB request limit; long pages uploaded from a browser can exceed it. ([docs](https://docs.linkwarden.app/self-hosting/lighter-setup))
- Server-generated archives (PDF, screenshot, readability, monolith) have their own 100 MB size caps; the server writes these files itself, so the tunnel's limit on request size does not apply to them. ([docs](https://docs.linkwarden.app/self-hosting/environment-variables))
- Invitations, verification emails and password resets need SMTP; plain sign-in with a username and password does not. ([docs](https://docs.linkwarden.app/self-hosting/environment-variables))
- AI tagging needs an AI provider: Ollama (a lightweight model is enough) or an OpenAI-compatible API key. ([docs](https://docs.linkwarden.app/self-hosting/ai-worker))
- With no provider key set, AI tagging does nothing. ([docs](https://docs.linkwarden.app/self-hosting/lighter-setup))
- Preservation runs a headless Chromium on the server; DISABLE_BROWSER=true removes most of the memory cost but also screenshots, PDFs, HTML snapshots, readable view and previews. ([docs](https://docs.linkwarden.app/self-hosting/lighter-setup))
- A remote browser resolves DNS itself, so keep it on a network that cannot reach anything sensitive. ([docs](https://docs.linkwarden.app/self-hosting/lighter-setup))
- A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.

## Without a workspace

The manual route, on a server you run:

1. Rent a Linux VPS, secure SSH, and create a user for the app.
2. Install Docker and write a compose file from the official image.
3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Linkwarden's own [documentation](https://docs.linkwarden.app/self-hosting/setup) covers each step for its install methods.

## Sources

Facts about Linkwarden come from its own documentation, checked on 2026-11-23:

- [docs.linkwarden.app/self-hosting/setup](https://docs.linkwarden.app/self-hosting/setup)
- [docs.linkwarden.app/self-hosting/environment-variables](https://docs.linkwarden.app/self-hosting/environment-variables)
- [docs.linkwarden.app/self-hosting/reverse-proxy](https://docs.linkwarden.app/self-hosting/reverse-proxy)
- [docs.linkwarden.app/self-hosting/lighter-setup](https://docs.linkwarden.app/self-hosting/lighter-setup)
- [docs.linkwarden.app/self-hosting/ai-worker](https://docs.linkwarden.app/self-hosting/ai-worker)
- [docs.linkwarden.app/self-hosting/user-content-domain](https://docs.linkwarden.app/self-hosting/user-content-domain)

## Keep reading

- [Self-host any app with your agent](https://envhaven.com/self-host)
- [Self-host Karakeep](https://envhaven.com/self-host/karakeep)
- [Self-host FreshRSS](https://envhaven.com/self-host/freshrss)
- [Self-host Miniflux](https://envhaven.com/self-host/miniflux)
- [Self-host wallabag](https://envhaven.com/self-host/wallabag)
- [AI agent hosting](https://envhaven.com/guides/ai-agent-hosting)

Source: https://envhaven.com/self-host/linkwarden
