Deploy Linkwarden — Self-Hosted Bookmark Manager & Archive
Self-host Linkwarden — save & archive bookmarks as snapshots
Meilisearch
Just deployed
/meili_data
Just deployed
/var/lib/postgresql/data
Linkwarden
Just deployed
/data/data
Deploy and Host Linkwarden on Railway
Linkwarden is an open-source bookmark manager that doesn't just save links — it archives them. Every bookmark is preserved as a full-page snapshot, screenshot, and PDF, so your saved pages survive even when the original goes offline or changes. Organize with collections and tags, collaborate with your team, search across archived content, and access everything from a browser extension or mobile app. This template deploys Linkwarden with PostgreSQL and Meilisearch pre-wired and the authentication URL set correctly — so your self-hosted archive is live in minutes, without the login gotcha that trips up manual setups.
What This Template Deploys
| Service | Purpose |
|---|---|
| Linkwarden | The bookmark manager, archiver, and web app (Next.js) on port 3000 |
| PostgreSQL | Bookmarks, collections, tags, users, and metadata |
| Meilisearch | Fast full-text search across archived page content |
All connect over Railway's private network. Linkwarden serves the app and stores archived files on a volume, PostgreSQL holds structured data, and Meilisearch indexes archived content for search — so both your links and their preserved contents persist and stay searchable.
About Hosting
Linkwarden is straightforward to run, and one authentication detail is the difference between a working login and a frustrating one — this template gets it right.
NEXTAUTH_URL must include the /api/v1/auth suffix — the #1 setup gotcha. Linkwarden's authentication URL isn't just your domain — it must be your full domain with /api/v1/auth appended, or logins and OAuth callbacks silently fail. This is the most common self-hosted Linkwarden problem. This template sets NEXTAUTH_URL correctly to your Railway domain with the required suffix, so authentication works on the first try.
Your data lives in two places — both persist here. Linkwarden stores structured data (bookmarks, collections, tags, users) in PostgreSQL, and the archived files themselves (full-page snapshots, screenshots, PDFs) on a volume at /data/data. Both must persist or you lose either your links or their archived contents. This template wires Postgres and mounts the archive volume, so everything survives redeploys.
Meilisearch makes archives searchable. Linkwarden indexes the text of every archived page in Meilisearch, so you can search inside saved pages, not just titles and tags. Without it, links still save and organize, but full-text search across archived content isn't available — so this template includes it as a lightweight internal service.
Set a strong NEXTAUTH_SECRET. This secret signs sessions, JWTs, and preserved-content tokens, so it must be a long random value and stay stable — changing it invalidates existing sessions. This template generates one for you.
Offload archives to S3 at scale. By default archived files live on the Railway volume, ideal for most users. For a very large archive, set the SPACES_* variables (endpoint, region, key, secret) to store files in S3-compatible object storage — R2, B2, MinIO, or S3 — keeping the volume light. Linkwarden enables S3 only when all four are present. It also supports 50+ OAuth SSO providers and optional AI tag generation (BYOK) via environment variables.
Typical cost: ~$10/month on Railway for the three services, scaling with how much you archive. Linkwarden is AGPL-licensed and free.
How It Compares
| Linkwarden (self-hosted) | Raindrop / Pocket | Browser bookmarks | Pinboard | |
|---|---|---|---|---|
| Full-page archiving | Yes (snapshot, PDF, screenshot) | Limited | No | Paid archive |
| Full-text search | Yes (Meilisearch) | Yes | No | Limited |
| Collaboration | Yes — shared collections | Some | No | No |
| Data ownership | Full — your infra | Vendor | Local | Vendor |
| Cost model | Flat infra | Freemium/subscription | Free | Subscription |
| Self-hostable | Yes | No | N/A | No |
Raindrop and Pocket are polished but keep your bookmarks on their servers and archive selectively. Browser bookmarks are just links — when a page dies, so does the content. Pinboard offers archiving but as a paid service on its infrastructure. Linkwarden's edge is true preservation — every link saved as a snapshot, PDF, and screenshot, fully searchable and organized — self-hosted, so your archive and reading history stay on infrastructure you own.
Deploy in Under 5 Minutes
- Click Deploy on Railway — Linkwarden, PostgreSQL, and Meilisearch build and wire together (~4 minutes)
- Confirm
NEXTAUTH_URLis set to your Railway domain with/api/v1/auth, andNEXTAUTH_SECRETis set - Open your Railway URL — you'll land on the Linkwarden login page
- Create your account (the first user), then start saving links
- Install the browser extension or mobile app and point it at your Railway URL
Every link you save is archived as a snapshot, PDF, and screenshot automatically.
Common Use Cases
- Permanent bookmark archive — save pages as snapshots that survive link rot and edits
- Research library — organize sources into collections with tags and full-text search
- Team knowledge base — shared collections of links your whole team can access
- Data-owned bookmarking — keep your reading history and archives on your own infrastructure
Configuration
| Variable | Required | Description |
|---|---|---|
NEXTAUTH_URL | Required | Your domain with /api/v1/auth — or logins fail |
NEXTAUTH_SECRET | Generated | Long random secret signing sessions and archive tokens |
DATABASE_URL | Auto-injected | PostgreSQL connection via Railway reference |
MEILI_MASTER_KEY | Generated | Secures the Meilisearch search index |
SPACES_* | Optional | S3-compatible storage for archives (endpoint, region, key, secret) |
| Storage volume | Pre-set | Persistent volume at /data/data for archived files |
NEXTAUTH_URLneeds the/api/v1/authsuffix. This is the top Linkwarden setup error — the template sets it correctly to your Railway domain, so authentication and OAuth callbacks work.
Data lives in Postgres and the volume. Bookmarks in Postgres, archived files at
/data/data— both persist and both need backing up. AddSPACES_*to offload archives to S3 for large libraries.
Dependencies for Linkwarden Hosting
- Railway account — ~$10/month for the three services, scaling with archive size
- PostgreSQL and Meilisearch (both included and wired)
- A persistent volume at
/data/datafor archived files (included) - Optional: an S3-compatible bucket (R2, B2, MinIO) for large archive storage
Deployment Dependencies
- Linkwarden GitHub Repository
- Linkwarden Documentation
- Linkwarden Environment Variables
- Railway Private Networking
Implementation Details
The template runs the official ghcr.io/linkwarden/linkwarden image (a Next.js application on port 3000) with a Railway-managed PostgreSQL database and a Meilisearch service, all connected over the private network. The most important configuration detail is NEXTAUTH_URL: it must be the deployment's domain with the /api/v1/auth suffix, or authentication and OAuth callbacks fail — the template sets this correctly. NEXTAUTH_SECRET, which signs sessions, JWTs, and preserved-content tokens, is generated and should remain stable.
Data persists in two locations: PostgreSQL holds bookmarks, collections, tags, and users, while archived files — full-page snapshots, screenshots, and PDFs generated for each saved link — persist on the volume mounted at /data/data. Both are backup targets. Meilisearch indexes archived page text so full-text search works across saved content; without it, links still save and organize but archive-content search is unavailable, so it is included as an internal service with its own volume.
For large archives, setting all of SPACES_ENDPOINT, SPACES_REGION, SPACES_KEY, and SPACES_SECRET switches file storage to S3-compatible object storage (R2, B2, MinIO, or S3), keeping the Railway volume light. Linkwarden also supports 50+ OAuth SSO providers and optional AI tag generation via environment variables.
Frequently Asked Questions
Why does login fail on self-hosted Linkwarden? Almost always NEXTAUTH_URL — it must include the /api/v1/auth suffix after your domain, or authentication and OAuth callbacks break. This template sets it correctly, so login works out of the box.
What does Linkwarden archive? Every saved link is preserved as a full-page snapshot, a screenshot, and a PDF, so the content survives even if the original page changes or goes offline — real preservation, not just a saved URL.
Can I search inside archived pages? Yes — Meilisearch indexes the text of your archived pages, so you can search their full content, not just titles and tags. It's included and wired in this template.
Is there a browser extension? Yes — Linkwarden has browser extensions and mobile apps. Point them at your Railway URL to save links from anywhere straight into your self-hosted archive.
Why Deploy Linkwarden on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Linkwarden on Railway you get a self-hosted bookmark archive with the hard parts solved — PostgreSQL and Meilisearch wired, the authentication URL set correctly, and a persistent volume for your archives. Save, archive, and search your links as durable snapshots, self-hosted on infrastructure you own.
Template Content
Meilisearch
getmeili/meilisearch:v1.12.8Linkwarden
ghcr.io/linkwarden/linkwarden