VPSFolio

2026-11-30 · karakeep · bookmarks · docker · self-hosting

Self-Host Karakeep with Docker: AI Bookmark Manager

Deploy Karakeep (formerly Hoarder) with Docker Compose: AI tagging, full-page archiving, Meilisearch search, and Chrome crawler behind a reverse proxy.

Bench run · 2026-11-30 Verified
karakeep-app/karakeep
Total RAM
1001.4 MB
Startup
169.2 s
Port
3000
HTTP
307
Per container web 510.7 MB · chrome 459.6 MB · meilisearch 31.1 MB
ghcr.io/karakeep-app/karakeep:release · 3 containers · karakeep-app/karakeep

What Karakeep does and what it needs

Karakeep (formerly Hoarder) is a bookmark-everything app. You throw links, notes, images, and PDFs at it, and it fetches titles, descriptions, and previews, then archives the full page with monolith so the content survives link rot. Meilisearch indexes everything for full-text and semantic search. An optional LLM (OpenAI or a local Ollama) adds automatic tagging and summaries. A bundled headless Chrome handles crawling and screenshots.

The stack is three containers: the web app (Next.js), a chrome sidecar for Puppeteer, and meilisearch for search. Persistent state lives in two named volumes: data (bookmarks, archives, uploads) and meilisearch (search index). The upstream project does not publish a minimum RAM figure. Idle memory is modest, but crawling and archiving pages spawns Chrome tabs, and heavy imports or video archiving with yt-dlp will push memory and disk usage up. Size the VPS around how aggressively you hoard.

Prerequisites, ports, and volume constraints

  • A Linux host with Docker Engine 24+ and the Compose v2 plugin.
  • A domain name pointed at the host if you want HTTPS (recommended).
  • Port 3000 is the app’s HTTP port. In this setup it binds to 127.0.0.1:3000 only, so a reverse proxy on the same host can reach it without exposing the app unencrypted on the public IP.
  • The data volume holds the SQLite database, archived pages, and uploads. Back it up before upgrades. The meilisearch volume holds the search index; it can be rebuilt but backing it up saves a reindex.
  • DATA_DIR must stay /data inside the container. To use a host directory instead of a named volume, change the volume mapping, not DATA_DIR.

If you want to test without a domain, either temporarily change the port mapping to 3000:3000 and open http://<server-ip>:3000, or keep the localhost binding and tunnel with ssh -L 3000:127.0.0.1:3000 user@server.

Production Docker Compose setup

Create the project directory and generate secrets:

mkdir -p ~/karakeep-app && cd ~/karakeep-app
openssl rand -base64 36   # NEXTAUTH_SECRET
openssl rand -base64 36   # MEILI_MASTER_KEY

Write the compose file. It follows the official docker/docker-compose.yml structure, with the web port bound to localhost and secrets pulled from .env:

cat <<'EOF' > compose.yml
services:
  web:
    image: ghcr.io/karakeep-app/karakeep:${KARAKEEP_VERSION:-release}
    restart: unless-stopped
    volumes:
      - data:/data
    ports:
      - 3000:3000
    environment:
      MEILI_ADDR: http://meilisearch:7700
      BROWSER_WEB_URL: http://chrome:9222
      DATA_DIR: /data
      NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-changeme_random_string}
      MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-changeme_random_string}
      NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
      TZ: ${TZ:-UTC}
  chrome:
    image: ghcr.io/karakeep-app/karakeep-chrome:release
    restart: unless-stopped
    init: true
    command:
      - --disable-gpu
      - --disable-dev-shm-usage
      - --hide-scrollbars
      - --disable-blink-features=AutomationControlled
      - --window-size=1440,900
  meilisearch:
    image: getmeili/meilisearch:v1.55.0
    restart: unless-stopped
    environment:
      MEILI_NO_ANALYTICS: "true"
      MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-changeme_random_string}
    volumes:
      - meilisearch:/meili_data

volumes:
  data:
  meilisearch:
EOF

Write the environment file. Replace the two placeholder secrets with the values you generated, and set NEXTAUTH_URL to the public URL you will serve the app on:

cat <<'EOF' > .env
KARAKEEP_VERSION=release
NEXTAUTH_SECRET=REPLACE_WITH_OPENSSL_OUTPUT
MEILI_MASTER_KEY=REPLACE_WITH_OPENSSL_OUTPUT
NEXTAUTH_URL=https://karakeep.example.com
TZ=UTC
# Optional: enable AI tagging and summaries
# OPENAI_API_KEY=sk-...
EOF

Lock down the env file, then start the stack:

chmod 600 .env
docker compose up -d
docker compose ps

All three services should report running. The web app is now reachable at http://127.0.0.1:3000 on the host.

Reverse proxy, HTTPS, and first-run hardening

Put Caddy or Nginx in front of 127.0.0.1:3000. Karakeep is a Next.js app with server-side auth, so the proxy must forward the original scheme and host, and it must allow large request bodies for uploads and imports.

Caddy example (/etc/caddy/Caddyfile):

karakeep.example.com {
    encode zstd gzip
    request_body {
        max_size 100MB
    }
    reverse_proxy 127.0.0.1:3000 {
        header_up X-Forwarded-Proto {scheme}
        header_up X-Forwarded-Host {host}
    }
}

Nginx equivalent:

server {
    listen 443 ssl http2;
    server_name karakeep.example.com;
    client_max_body_size 100M;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        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;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 300s;
    }
}

The Upgrade/Connection headers matter because the app uses streaming responses for long-running crawls and AI jobs. proxy_read_timeout should be generous for the same reason.

After the proxy is up, set NEXTAUTH_URL in .env to the final HTTPS URL and restart: docker compose up -d. If you leave it on http://localhost:3000, sign-in redirects will break behind the proxy.

First-run hardening: open the site, create the admin account immediately, and do not leave the sign-in page reachable on a public URL with open registration longer than necessary. If you plan to invite others, review the security considerations page in the docs before enabling sharing. Keep MEILI_MASTER_KEY secret; it is the only thing protecting the search index from the network.

Updating, backups, and common pitfalls

Updates. With KARAKEEP_VERSION=release, pull the latest stable image explicitly:

docker compose pull
docker compose up -d

If you pinned a version (e.g. KARAKEEP_VERSION=0.35.0), bump it in .env and run docker compose up -d. Updating Karakeep does not upgrade Meilisearch. If you change the Meilisearch image tag, follow the upstream Meilisearch upgrade guide first; the index needs a one-time migration and will not start cleanly otherwise.

Backups. Stop the stack, archive both volumes, then start it again:

docker compose stop
docker run --rm -v karakeep-app_data:/data -v "$PWD":/backup alpine \
  tar czf /backup/karakeep-data-$(date +%F).tgz -C /data .
docker run --rm -v karakeep-app_meilisearch:/meili_data -v "$PWD":/backup alpine \
  tar czf /backup/karakeep-meili-$(date +%F).tgz -C /meili_data .
docker compose start

Adjust the volume names if your directory is not karakeep-app; check with docker volume ls. Copy the tarballs off the host.

Pitfalls.

  1. Chrome sidecar and /dev/shm. The chrome service runs with --disable-dev-shm-usage because containers often have a tiny /dev/shm, which crashes Chrome mid-crawl. If you see failed archives with browser errors, that flag is doing its job; do not remove it.
  2. Stale NEXTAUTH_URL after moving to HTTPS. The most common post-deploy bug is leaving NEXTAUTH_URL pointing at http://localhost:3000. Sign-in appears to work but redirects loop or land on the wrong host. Update .env and re-run docker compose up -d; env changes are not picked up without recreating the container.

Measured in our sandbox run: total memory 1001.4 MB (sum of per-container peaks over a 30s idle window after startup) across 3 containers; largest container 510.7 MB; published port(s) 3000; HTTP probe returned 307. The run took 169.2s including the image download. Container breakdown: web 510.7 MB, chrome 459.6 MB, meilisearch 31.1 MB.


Verification: we ran this docker-compose stack in a disposable Docker environment and recorded the measurements above. They describe that run, not a guarantee for your host.