Back to articles
AI & Cloud

Install and Configure Linkwarden on VPS: Web Content Storage and Work Bookmark Management for Enterprises

A detailed guide to installing and configuring Linkwarden on a VPS for storing full web page content and managing work bookmarks efficiently for enterprises.

DPTCloud Engineering4 min read
Install and Configure Linkwarden on VPS: Web Content Storage and Work Bookmark Management for Enterprises

Image credit: TRAPHITHO · Pixabay Content License

Install and Configure Linkwarden on VPS

Linkwarden is an open-source solution for storing and managing online bookmarks, particularly useful for enterprises needing to preserve complete web page content and organize links effectively. With the ability to store full-page snapshots, Linkwarden helps businesses retain important information even when websites change or are deleted. This guide provides a detailed walkthrough of installing and configuring Linkwarden on a VPS to maximize these features.

System Requirements and Prerequisites

To deploy Linkwarden on a VPS, you will need:

  • A VPS server with at least 2GB RAM and 2 CPU cores (recommended 4GB RAM or more for enterprise use)
  • Operating System: Ubuntu 20.04/22.04 or Debian 11/12
  • Necessary software: Docker, Docker Compose, Nginx, Let's Encrypt (for SSL)
  • Public IP address and domain name (preferably a custom domain)

Installation and Configuration Process

Follow these steps to install Linkwarden on your VPS:

Step 1: Update System and Install Docker

Run the following commands on your VPS:

sudo apt update && sudo apt upgrade -y
sudo apt install -y docker.io docker-compose
sudo systemctl enable docker
sudo systemctl start docker

Step 2: Create Directory and Configure Docker Compose

Create a directory for data storage and generate the docker-compose.yml file:

mkdir -p /opt/linkwarden && cd /opt/linkwarden
nano docker-compose.yml

Paste the following content into the file:

version: '3.8'
services:
  linkwarden:
    image: linkwarden/linkwarden:latest
    container_name: linkwarden
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./data:/app/data
    environment:
      - NODE_ENV=production
      - LINKWARDEN_DB_URL=postgresql://linkwarden:password@db:5432/linkwarden
      - LINKWARDEN_REDIS_URL=redis://redis:6379
    depends_on:
      - db
      - redis
  db:
    image: postgres:14
    container_name: linkwarden-db
    restart: unless-stopped
    environment:
      POSTGRES_DB: linkwarden
      POSTGRES_USER: linkwarden
      POSTGRES_PASSWORD: password
    volumes:
      - ./db_data:/var/lib/postgresql/data
  redis:
    image: redis:6-alpine
    container_name: linkwarden-redis
    restart: unless-stopped
    volumes:
      - ./redis_data:/data
  nginx:
    image: nginx:alpine
    container_name: linkwarden-nginx
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
      - ./certs:/etc/letsencrypt
    depends_on:
      - linkwarden

Step 3: Configure Nginx and SSL

Create the nginx.conf file:

server {
    listen 80;
    server_name your-domain.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name your-domain.com;

    ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;

    location / {
        proxy_pass http://linkwarden:80;
        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;
    }
}

Verification and Validation

After installation, access https://your-domain.com to verify. If the page loads, Linkwarden is operational.

Troubleshooting

  • Cannot access: Check that ports 80/443 are open on the VPS and the domain points correctly.
  • Database errors: Verify PostgreSQL configuration and user credentials.
  • Redis connection failure: Ensure Redis is running and port 6379 is accessible.

References

Assumptions Explained

We assume the user has basic knowledge of Docker, Nginx, and VPS administration. The configuration uses common services like PostgreSQL, Redis, and Let's Encrypt. No assumptions are made about specific storage systems or hardware beyond the minimum requirements.

Related infrastructure & engineering guides: High-RAM Cloud VPS for Self-Hosted LLMs & API Gateways

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478