docker.recipes

Linkwarden Bookmark Manager

intermediate

Self-hosted collaborative bookmark manager with link archiving, tags, and collections.

Overview

Linkwarden is a modern, self-hosted bookmark manager designed for collaborative teams and power users who need more than basic bookmarking functionality. Built with Next.js and TypeScript, Linkwarden provides advanced features like automatic link archiving, screenshot capture, full-text search, and organized collections with tagging systems. Unlike simple bookmark syncing tools, Linkwarden preserves webpage content even when original sites go offline, making it invaluable for research, documentation, and long-term reference management. This stack combines Linkwarden with PostgreSQL for robust data management and NGINX for production-ready web serving. PostgreSQL provides the reliability and performance needed for complex bookmark queries, tag relationships, and user management, while NGINX handles SSL termination, static asset delivery, and reverse proxy functionality. The combination creates a professional-grade bookmark management system that can handle multiple users, large bookmark collections, and high-traffic scenarios with excellent performance. This configuration is ideal for development teams, research organizations, content creators, and knowledge workers who need centralized bookmark management with collaboration features. The stack provides enterprise-level reliability while remaining simple enough for small teams or personal use, offering the perfect balance between functionality and maintainability for serious bookmark management needs.

Key Features

  • Automatic webpage archiving with Wayback Machine integration and local screenshot capture
  • PostgreSQL-powered full-text search across bookmark titles, descriptions, and archived content
  • Collaborative collections with granular sharing permissions and team workspaces
  • Advanced tagging system with hierarchical organization and tag-based filtering
  • Browser extension support for Chrome, Firefox, and Safari with one-click bookmarking
  • Link validation and monitoring with automatic broken link detection
  • NGINX-based SSL/TLS termination with HTTP/2 support for fast page loading
  • REST API with authentication for custom integrations and bulk operations

Common Use Cases

  • 1Research teams managing academic papers, articles, and reference materials with archival requirements
  • 2Development teams sharing technical documentation, tutorials, and code repositories
  • 3Content marketing teams organizing competitor analysis, inspiration, and resource libraries
  • 4Legal firms archiving case law, regulations, and client-related web resources
  • 5Personal knowledge management for professionals building comprehensive reference collections
  • 6Educational institutions providing students and faculty with collaborative research tools
  • 7Non-profit organizations maintaining resource libraries for volunteers and stakeholders

Prerequisites

  • Docker and Docker Compose installed with at least 2GB available RAM for PostgreSQL
  • Domain name and SSL certificates if deploying for external access via NGINX
  • Basic understanding of environment variable configuration for database and authentication setup
  • Ports 80, 443, and 3000 available on the host system for web access
  • At least 10GB available disk space for bookmark archives and database storage
  • SMTP server credentials if email notifications and user invitations are required

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 linkwarden:
3 image: ghcr.io/linkwarden/linkwarden:latest
4 environment:
5 DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
6 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
7 NEXTAUTH_URL: ${NEXTAUTH_URL}
8 ports:
9 - "3000:3000"
10 volumes:
11 - linkwarden_data:/data/data
12 depends_on:
13 postgres:
14 condition: service_healthy
15 networks:
16 - linkwarden-net
17 restart: unless-stopped
18
19 postgres:
20 image: postgres:15-alpine
21 environment:
22 POSTGRES_USER: ${POSTGRES_USER}
23 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
24 POSTGRES_DB: ${POSTGRES_DB}
25 volumes:
26 - postgres_data:/var/lib/postgresql/data
27 healthcheck:
28 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
29 interval: 10s
30 timeout: 5s
31 retries: 5
32 networks:
33 - linkwarden-net
34 restart: unless-stopped
35
36 nginx:
37 image: nginx:alpine
38 ports:
39 - "80:80"
40 - "443:443"
41 volumes:
42 - ./nginx.conf:/etc/nginx/nginx.conf:ro
43 depends_on:
44 - linkwarden
45 networks:
46 - linkwarden-net
47 restart: unless-stopped
48
49volumes:
50 linkwarden_data:
51 postgres_data:
52
53networks:
54 linkwarden-net:
55 driver: bridge

.env Template

.env
1# PostgreSQL
2POSTGRES_USER=linkwarden
3POSTGRES_PASSWORD=secure_postgres_password
4POSTGRES_DB=linkwarden
5
6# NextAuth
7NEXTAUTH_SECRET=your_secret_key_here
8NEXTAUTH_URL=http://localhost:3000

Usage Notes

  1. 1Web UI at http://localhost:3000
  2. 2Create account on first visit
  3. 3Supports link archiving and screenshots
  4. 4Browser extensions available

Individual Services(3 services)

Copy individual services to mix and match with your existing compose files.

linkwarden
linkwarden:
  image: ghcr.io/linkwarden/linkwarden:latest
  environment:
    DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
    NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
    NEXTAUTH_URL: ${NEXTAUTH_URL}
  ports:
    - "3000:3000"
  volumes:
    - linkwarden_data:/data/data
  depends_on:
    postgres:
      condition: service_healthy
  networks:
    - linkwarden-net
  restart: unless-stopped
postgres
postgres:
  image: postgres:15-alpine
  environment:
    POSTGRES_USER: ${POSTGRES_USER}
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    POSTGRES_DB: ${POSTGRES_DB}
  volumes:
    - postgres_data:/var/lib/postgresql/data
  healthcheck:
    test:
      - CMD-SHELL
      - pg_isready -U ${POSTGRES_USER}
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - linkwarden-net
  restart: unless-stopped
nginx
nginx:
  image: nginx:alpine
  ports:
    - "80:80"
    - "443:443"
  volumes:
    - ./nginx.conf:/etc/nginx/nginx.conf:ro
  depends_on:
    - linkwarden
  networks:
    - linkwarden-net
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 linkwarden:
5 image: ghcr.io/linkwarden/linkwarden:latest
6 environment:
7 DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
8 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
9 NEXTAUTH_URL: ${NEXTAUTH_URL}
10 ports:
11 - "3000:3000"
12 volumes:
13 - linkwarden_data:/data/data
14 depends_on:
15 postgres:
16 condition: service_healthy
17 networks:
18 - linkwarden-net
19 restart: unless-stopped
20
21 postgres:
22 image: postgres:15-alpine
23 environment:
24 POSTGRES_USER: ${POSTGRES_USER}
25 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
26 POSTGRES_DB: ${POSTGRES_DB}
27 volumes:
28 - postgres_data:/var/lib/postgresql/data
29 healthcheck:
30 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
31 interval: 10s
32 timeout: 5s
33 retries: 5
34 networks:
35 - linkwarden-net
36 restart: unless-stopped
37
38 nginx:
39 image: nginx:alpine
40 ports:
41 - "80:80"
42 - "443:443"
43 volumes:
44 - ./nginx.conf:/etc/nginx/nginx.conf:ro
45 depends_on:
46 - linkwarden
47 networks:
48 - linkwarden-net
49 restart: unless-stopped
50
51volumes:
52 linkwarden_data:
53 postgres_data:
54
55networks:
56 linkwarden-net:
57 driver: bridge
58EOF
59
60# 2. Create the .env file
61cat > .env << 'EOF'
62# PostgreSQL
63POSTGRES_USER=linkwarden
64POSTGRES_PASSWORD=secure_postgres_password
65POSTGRES_DB=linkwarden
66
67# NextAuth
68NEXTAUTH_SECRET=your_secret_key_here
69NEXTAUTH_URL=http://localhost:3000
70EOF
71
72# 3. Start the services
73docker compose up -d
74
75# 4. View logs
76docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/linkwarden-bookmark-manager/run | bash

Troubleshooting

  • Linkwarden shows 'Database connection failed': Verify DATABASE_URL format and ensure PostgreSQL container is healthy before Linkwarden starts
  • NextAuth authentication errors: Check NEXTAUTH_SECRET is set to a secure random string and NEXTAUTH_URL matches your actual domain
  • Screenshots and archiving not working: Ensure linkwarden_data volume has proper write permissions and sufficient disk space
  • NGINX 502 Bad Gateway errors: Confirm Linkwarden container is running on port 3000 and accessible within the Docker network
  • PostgreSQL container fails to start: Check POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB environment variables are properly set
  • Slow bookmark loading and search: Increase PostgreSQL shared_buffers and work_mem settings for better query performance

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space