docker.recipes

Linkwarden Bookmark Manager

beginner

Linkwarden collaborative bookmark manager with link preservation.

Overview

Linkwarden is an open-source collaborative bookmark manager that goes beyond simple link storage by preserving web content through automatic screenshots, PDF archives, and full-page captures. Built with Next.js and TypeScript, Linkwarden ensures your bookmarks remain accessible even if the original content disappears or changes, making it invaluable for research, content curation, and knowledge management. PostgreSQL serves as the robust backend database for Linkwarden, handling user accounts, bookmark metadata, collections, tags, and sharing permissions with ACID compliance and advanced indexing. The relational structure of PostgreSQL excels at managing the complex relationships between users, bookmarks, collections, and collaborative sharing features that Linkwarden requires. This combination creates a powerful self-hosted alternative to commercial bookmark services like Pocket or Raindrop, offering complete data ownership and privacy control. Teams, researchers, content creators, and privacy-conscious individuals benefit from this stack's ability to preserve and organize web content while supporting multi-user collaboration and granular access controls.

Key Features

  • Automatic link preservation with screenshot captures and PDF generation of web pages
  • Collaborative bookmark collections with granular sharing permissions and team management
  • Browser extensions for Chrome, Firefox, and Safari with one-click bookmark saving
  • Full-text search across bookmark titles, descriptions, tags, and archived content
  • PostgreSQL's JSONB support for flexible bookmark metadata and custom fields storage
  • Advanced tagging system with hierarchical organization and bulk tag operations
  • Link monitoring with automatic checks for broken or changed URLs
  • REST API for programmatic bookmark management and third-party integrations

Common Use Cases

  • 1Research teams preserving academic papers, articles, and reference materials with automatic archiving
  • 2Content marketing teams collaborating on competitor analysis and industry trend collections
  • 3Legal professionals archiving evidence and case-related web content with timestamp preservation
  • 4Educational institutions creating shared resource libraries for students and faculty
  • 5Personal knowledge management for developers saving documentation, tutorials, and code examples
  • 6News organizations maintaining source archives with content preservation for fact-checking
  • 7Privacy-focused individuals replacing cloud bookmark services with self-hosted alternative

Prerequisites

  • Minimum 1GB RAM for PostgreSQL database operations and Linkwarden's Next.js application
  • Port 3000 available for Linkwarden web interface access
  • Basic understanding of environment variables for authentication and database configuration
  • SSL certificate recommended for NEXTAUTH_URL in production deployments
  • Sufficient disk space for bookmark archives, screenshots, and PDF storage growth

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 container_name: linkwarden
5 environment:
6 - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/linkwarden
7 - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
8 - NEXTAUTH_URL=${NEXTAUTH_URL}
9 volumes:
10 - linkwarden_data:/data/data
11 ports:
12 - "3000:3000"
13 depends_on:
14 - postgres
15 networks:
16 - linkwarden-network
17
18 postgres:
19 image: postgres:16-alpine
20 container_name: linkwarden-db
21 environment:
22 - POSTGRES_USER=${POSTGRES_USER}
23 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
24 - POSTGRES_DB=linkwarden
25 volumes:
26 - postgres_data:/var/lib/postgresql/data
27 networks:
28 - linkwarden-network
29
30volumes:
31 linkwarden_data:
32 postgres_data:
33
34networks:
35 linkwarden-network:
36 driver: bridge

.env Template

.env
1# Linkwarden
2POSTGRES_USER=linkwarden
3POSTGRES_PASSWORD=linkwarden_password
4NEXTAUTH_SECRET=your-nextauth-secret
5NEXTAUTH_URL=http://localhost:3000

Usage Notes

  1. 1UI at http://localhost:3000
  2. 2Create account on first visit
  3. 3Browser extensions available
  4. 4Preserves screenshots and PDFs
  5. 5Supports collections and tags

Individual Services(2 services)

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

linkwarden
linkwarden:
  image: ghcr.io/linkwarden/linkwarden:latest
  container_name: linkwarden
  environment:
    - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/linkwarden
    - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
    - NEXTAUTH_URL=${NEXTAUTH_URL}
  volumes:
    - linkwarden_data:/data/data
  ports:
    - "3000:3000"
  depends_on:
    - postgres
  networks:
    - linkwarden-network
postgres
postgres:
  image: postgres:16-alpine
  container_name: linkwarden-db
  environment:
    - POSTGRES_USER=${POSTGRES_USER}
    - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    - POSTGRES_DB=linkwarden
  volumes:
    - postgres_data:/var/lib/postgresql/data
  networks:
    - linkwarden-network

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 container_name: linkwarden
7 environment:
8 - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/linkwarden
9 - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
10 - NEXTAUTH_URL=${NEXTAUTH_URL}
11 volumes:
12 - linkwarden_data:/data/data
13 ports:
14 - "3000:3000"
15 depends_on:
16 - postgres
17 networks:
18 - linkwarden-network
19
20 postgres:
21 image: postgres:16-alpine
22 container_name: linkwarden-db
23 environment:
24 - POSTGRES_USER=${POSTGRES_USER}
25 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
26 - POSTGRES_DB=linkwarden
27 volumes:
28 - postgres_data:/var/lib/postgresql/data
29 networks:
30 - linkwarden-network
31
32volumes:
33 linkwarden_data:
34 postgres_data:
35
36networks:
37 linkwarden-network:
38 driver: bridge
39EOF
40
41# 2. Create the .env file
42cat > .env << 'EOF'
43# Linkwarden
44POSTGRES_USER=linkwarden
45POSTGRES_PASSWORD=linkwarden_password
46NEXTAUTH_SECRET=your-nextauth-secret
47NEXTAUTH_URL=http://localhost:3000
48EOF
49
50# 3. Start the services
51docker compose up -d
52
53# 4. View logs
54docker 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-bookmarks/run | bash

Troubleshooting

  • Authentication fails with 'Invalid NextAuth configuration': Ensure NEXTAUTH_SECRET is at least 32 characters and NEXTAUTH_URL matches your domain
  • Database connection refused on startup: Verify POSTGRES_USER and POSTGRES_PASSWORD match between services and database is fully initialized
  • Screenshot capture fails for certain websites: Some sites block automated screenshots; Linkwarden will save metadata only in these cases
  • Browser extension won't connect: Check that Linkwarden URL in extension settings matches NEXTAUTH_URL and includes correct port
  • PostgreSQL container exits with 'data directory has wrong ownership': Run 'sudo chown -R 999:999 postgres_data/' on the volume directory
  • High memory usage during bulk imports: Adjust PostgreSQL shared_buffers and work_mem settings for large bookmark migrations

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