Special Offers: Up to 75% OFF on Hostinger & High-RAM Contabo Cloud VPS available this month.Compare Plans

How to Self-Host Linkwarden on Ubuntu VPS: Collaborative Webpage & PDF Archiver

Alex Vance
Alex VanceCloud Infrastructure Architect
November 12, 2026
•
15 min read
•
4.9 / 5.0
Transparency Notice: This article contains affiliate links to hosting providers like Hostinger and Contabo. If you purchase through our links, we may earn a commission at zero extra cost to you. We only recommend products we personally benchmark and test. Read full disclosure.
How to Self-Host Linkwarden on Ubuntu VPS: Collaborative Webpage & PDF Archiver
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Contabo High-Performance Cloud VPS

Massive 4 vCPU cores, 8GB RAM, and 32TB monthly traffic. Ideal for Linux developers.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe

The Plight of 'Link Rot' and Disappearing Web Content

Studies show that over 38% of all webpages that existed in 2013 are no longer accessible today. Valuable technical articles, code snippets, legal documentation, and research bookmarks disappear overnight when domain names expire or websites shut down.

Linkwarden is an open-source, collaborative bookmarking and webpage preservation suite. Unlike Pocket or Raindrop, Linkwarden does not just save a URL: it fires up a headless browser engine (Playwright), renders the page, captures a pixel-perfect full-page PDF, stores an image snapshot, extracts readable text, and preserves everything on your private storage disk.

Prerequisites on Contabo Cloud VPS

Because Playwright runs a headless Chromium instance to screenshot dynamic Single Page Applications (React, Vue), you need a VPS with adequate RAM. A Contabo Cloud VPS 1 ($4.95/mo for 4 vCPU cores and 8GB RAM) provides more than enough computing power.

ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
apt install -y curl git ufw
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker

Step 1: Setting Up the Linkwarden Environment

Create a dedicated folder and generate your environment variables:

mkdir -p /opt/linkwarden && cd /opt/linkwarden
nano .env

Populate the .env file with random cryptographic keys:

NEXTAUTH_SECRET=GENERATE_RANDOM_32_CHAR_STRING_HERE!
NEXTAUTH_URL=https://links.yourdomain.com
POSTGRES_PASSWORD=SuperSecureDbPassword_8842!
PAGENAME=My Private Research Vault
AUTORELOAD=true

Step 2: Docker Compose Configuration

Create the docker-compose.yml file:

nano docker-compose.yml
services:
  postgres:
    image: postgres:16-alpine
    restart: always
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_USER: postgres
      POSTGRES_DB: linkwarden
    volumes:
      - ./pgdata:/var/lib/postgresql/data

  linkwarden:
    image: ghcr.io/linkwarden/linkwarden:v2.7
    restart: always
    environment:
      - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/linkwarden
      - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
      - NEXTAUTH_URL=${NEXTAUTH_URL}
      - PAGENAME=${PAGENAME}
    ports:
      - "127.0.0.1:3000:3000"
    volumes:
      - ./data:/data/data
    depends_on:
      - postgres

Start the Linkwarden container stack:

docker compose up -d
docker compose ps

Step 3: Nginx SSL Reverse Proxy

Configure Nginx to reverse proxy traffic to port 3000 and obtain a Let's Encrypt SSL certificate:

apt install -y nginx certbot python3-certbot-nginx

cat << 'EOF' > /etc/nginx/sites-available/linkwarden.conf
server {
    server_name links.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
EOF

ln -s /etc/nginx/sites-available/linkwarden.conf /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
certbot --nginx -d links.yourdomain.com --non-interactive --agree-tos -m admin@yourdomain.com

Step 4: Creating Collections & Installing Browser Extensions

Visit https://links.yourdomain.com and register your primary administrator profile. Once logged in:

  1. Create distinct collections (e.g., DevOps Guides, Financial Analysis, Design Inspiration).
  2. Install the official Linkwarden extension on Chrome, Brave, or Firefox.
  3. Under extension settings, set the Server URL to https://links.yourdomain.com and paste your API access token generated from your profile page.

Now, whenever you click the Linkwarden browser icon on any webpage, your Contabo server immediately captures the article, saves a full-page PDF archive, and tags it into your database.

Editorial Verdict: Pros & Cons

What We Love (Pros)

  • Saves complete offline snapshots: Full PDF render, screenshot, and clean readability article view
  • Immune to link rot: Even if the target website goes offline, your archive copy remains intact
  • Official browser extensions for Google Chrome, Mozilla Firefox, and Safari

Drawbacks (Cons)

  • Headless browser (Playwright) screenshot generation requires at least 2GB of free server RAM
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Deploy Your Contabo Cloud Server

Includes 4 vCPU Cores, 8GB RAM, 50GB NVMe SSD, and 32TB Outbound Traffic.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe
#Linkwarden#Self-Hosted#Contabo Cloud VPS#Docker#Archiving#Open Source
Alex Vance

Written by Alex Vance

Cloud Infrastructure Architect

Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.

Recommended Next Reads