linkding

repository·master·Indexed 25 days ago

https://github.com/sissbruecker/linkding

A minimal, fast, self-hosted bookmark manager supporting tagging, Markdown notes, and automatic website archiving. Includes a Django-based admin interface for advanced user, bookmark, and tag management, as well as CLI tools for database backups, Netscape HTML imports, and superuser creation.

Tokens
12.1K
Snippets
23
Records
81
Agent score
95%

What's inside linkding

  1. Overview of linkding features

    master

    linkding is a self-hosted bookmarking service designed to be minimal, fast, and easy to set up. Key features include:

    • Metadata Extraction: Automatically fetches titles, descriptions, icons, and preview images for bookmarked sites.
    • Archiving: Automatically creates snapshots of websites as local HTML files or via the Internet Archive.
    • Bulk Editing: Perform operations on multiple bookmarks or the entire collection simultaneously.
    • Import/Export: Supports Netscape HTML format for bookmark migration.
    • Multi-User Support: Allows multiple users to manage and share bookmarks with others or guests.
    • Browser Extensions: Available for Firefox and Chrome to add and search bookmarks directly from the browser.
    • REST API: Provides a REST API for integration with scripts or third-party applications.
    • Low Maintenance: Distributed as a single Docker container using SQLite, featuring automated migrations.
  2. Use Web and CLI Apps for linkding automation

    master

    The community provides various tools to automate bookmarking and management via the linkding API:

    Command Line & Automation

    • linkding-cli: A CLI to interact with the linkding REST API (powered by aiolinkding).
    • feed2linkding: CLI utility to add web feed items to linkding via API.
    • linkding-archiver: Python app that integrates with SingleFile and Tube Archivist to archive links/videos.
    • linkding-media-archiver: Automatically downloads media files for bookmarks using yt-dlp.
    • linkding-healthcheck: Go application that checks bookmark health and tags dead/problematic URLs.
    • linkding-reminder: Python app that sends email reminders for links with specific tags.

    Bots & Dashboards

    • DingDrop: Telegram bot for saving bookmarks via Telegram using linkding APIs.
    • linkdinger: Telegram bot supporting tags, notes, and searching.
    • Komrade: Docker-based startpage/dashboard that syncs with linkding.
    • Linka!: Web app/PWA for advanced searching and opening bookmarks.
    • linktiles: Web app to display links as tiles in a mosaic.
    • serchding: Provides full-text search for linkding.

    Migration

    • Pocket2Linkding: Tool to migrate from Mozilla Pocket to linkding, preserving dates and tags.
  3. Manage Starlight project files and structure

    master

    Starlight projects follow a specific directory structure for content and assets:

    • Documentation Content: Place .md or .mdx files in src/content/docs/. Each file is automatically exposed as a route based on its filename.
    • Images: Add images to src/assets/ and embed them in Markdown using relative links.
    • Static Assets: Place files like favicons in the public/ directory.

    Project structure overview:

    .
    ├── public/
    ├── src/
    │   ├── assets/
    │   ├── content/
    │   │   ├── docs/
    │   │   └── config.ts
    │   └── env.d.ts
    ├── astro.config.mjs
    ├── package.json
    └── tsconfig.json
  4. Explore Mobile and Desktop Apps for linkding

    master

    Several community-developed clients are available for accessing linkding on various platforms:

    Desktop

    • cosmicding: Desktop client built using libcosmic.

    Mobile

    • LinkBuddy: Open-source Android and iOS client (React Native).
    • Linkdy: Open-source Android and iOS client (Flutter).
    • Linklater: Open-source Android client (Kotlin).
    • LinkThing: iOS client.
    • Pinkt: Android client.

    Browser Extensions

    • linkding-extension: An alternative to the official extension that wraps the linkding bookmarklet.
    • linkding-injector: Injects linkding search results into search engine sidebars (e.g., Google, DuckDuckGo).
  5. Use the bookmarklet on Android/Chrome

    master

    Since Chrome on Android does not support standard bookmarklet execution, you can use this workaround to save the current page to your linkding instance:

    1. Create a bookmark of your linkding deployment in Chrome (using the star icon in the three-dots menu).
    2. Edit the bookmark and replace the URL with the following bookmarklet code, substituting <YOUR_INSTANCE_HERE> with your actual linkding URL:
    3. To use it, type the name you gave the bookmark (e.g., bm or ld) into the Chrome address bar and select it from the results while browsing any website.
    javascript:window.open(`http://<YOUR_INSTANCE_HERE>/bookmarks/new?url=${encodeURIComponent(window.location)}&auto_close`)
  6. Configure Nginx reverse proxy for linkding

    master

    Nginx rewrites the Host header by default, which can cause login or CSRF issues. To forward the correct headers to linkding, add proxy_set_header Host $host; and proxy_set_header X-Forwarded-Proto $scheme; to your Nginx location block.

    location /linkding {
        ...
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
  7. Configure OpenID Connect (OIDC) Authentication

    master

    Enable OIDC SSO by setting LD_ENABLE_OIDC=True. This adds a "Login with OIDC" button to the login page. Users are matched by their email address. If no user exists with that email, a new user is created automatically.

    Key OIDC Options:

    • OIDC_OP_AUTHORIZATION_ENDPOINT: Authorization endpoint.
    • OIDC_OP_TOKEN_ENDPOINT: Token endpoint.
    • OIDC_OP_USER_ENDPOINT: User info endpoint.
    • OIDC_OP_JWKS_ENDPOINT: JWKS endpoint.
    • OIDC_RP_CLIENT_ID: Client ID.
    • OIDC_RP_CLIENT_SECRET: Client secret.
    • OIDC_RP_SIGN_ALGO: Signing algorithm (default: RS256).
    • OIDC_USE_PKCE: Use PKCE (default: True).
    • OIDC_VERIFY_SSL: Verify SSL (default: True).
    • OIDC_RP_SCOPES: Scopes (default: oidc email profile).
    • OIDC_USERNAME_CLAIM: Custom claim for username (default: email).

    Important: To ensure your existing superuser is found by OIDC, create the superuser with both a username and an email address before your first OIDC login.

    LD_ENABLE_OIDC=True
    OIDC_OP_AUTHORIZATION_ENDPOINT=https://auth.example.com/api/oidc/authorization
    OIDC_OP_TOKEN_ENDPOINT=https://auth.example.com/api/oidc/token
    OIDC_OP_USER_ENDPOINT=https://auth.example.com/api/oidc/userinfo
    OIDC_OP_JWKS_ENDPOINT=https://auth.example.com/jwks.json
    OIDC_RP_CLIENT_ID=linkding
    OIDC_RP_CLIENT_SECRET=myClientSecret
  8. Manage tags and clean up tag collections

    master

    Use the Tags section in the administration page to perform bulk cleanup of your tags.

    1. Navigate to Tags in the administration page.
    2. Filter and select the tags you wish to manage.
    3. Select an action from the Action dropdown:
      • Delete: Removes the tag. Note that this does not delete the bookmarks themselves; it only removes the tag association from them.
      • Delete unused tags: Deletes only the selected tags that are not currently assigned to any bookmark.
    4. Click the button next to the checkbox to execute the operation.
  9. Configure SingleFile extension to upload snapshots to linkding

    master

    You can use the SingleFile browser extension to save web pages as HTML files and upload them directly to linkding's REST API. This method captures the page exactly as seen in your browser.

    Configuration Steps:

    1. Install the SingleFile extension.
    2. Open the extension settings.
    3. Set Destination to upload to a REST Form API.
    4. Set URL to your linkding instance URL followed by /api/bookmarks/singlefile/ (e.g., https://linkding.example.com/api/bookmarks/singlefile/).
    5. Set authorization token to your linkding REST API token (found in your linkding settings page).
    6. Set data field name to file.
    7. Set URL field name to url.

    Behavior:

    • If the URL does not exist in linkding, a new bookmark is created.
    • If the URL already exists, the snapshot is added to the existing bookmark.
  10. Create a full backup of linkding

    master

    Use the full_backup CLI command to create a compressed zip file containing the SQLite database, assets, favicons, and preview images. This method is recommended for default SQLite installations.

    1. Create the backup inside the container: Execute the full_backup command via docker exec. This creates backup.zip in /etc/linkding/data/ inside the container.
    2. Copy the backup to your host: Use docker cp to move the file from the container to your host system.
    3. Restore the backup:
      • Extract the zip file into a folder for your new installation.
      • Rename the extracted folder to data.
      • Mount this folder to /etc/linkding/data in your Docker configuration and start the container.