# Linkwarden Bookmark Manager

> Linkwarden collaborative bookmark manager with link preservation.

- Category: Productivity & Collaboration
- Difficulty: beginner
- Components: linkwarden, postgres
- Tags: linkwarden, bookmarks, links, archive, collaborative
- Source: https://docker.recipes/productivity/linkwarden-bookmarks

## 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.

## 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

## Use cases

- Research teams preserving academic papers, articles, and reference materials with automatic archiving
- Content marketing teams collaborating on competitor analysis and industry trend collections
- Legal professionals archiving evidence and case-related web content with timestamp preservation
- Educational institutions creating shared resource libraries for students and faculty
- Personal knowledge management for developers saving documentation, tutorials, and code examples
- News organizations maintaining source archives with content preservation for fact-checking
- Privacy-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

## docker-compose.yml

```yaml
services:
  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:
    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

volumes:
  linkwarden_data:
  postgres_data:

networks:
  linkwarden-network:
    driver: bridge
```

## .env

```bash
# Linkwarden
POSTGRES_USER=linkwarden
POSTGRES_PASSWORD=linkwarden_password
NEXTAUTH_SECRET=your-nextauth-secret
NEXTAUTH_URL=http://localhost:3000
```

## Usage notes

- UI at http://localhost:3000
- Create account on first visit
- Browser extensions available
- Preserves screenshots and PDFs
- Supports collections and tags

## 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

