How to Install Karakeep on a VPS for Self-Hosted Bookmarks and Web Archives
The link you lose costs more than the link you keep badly
You know the pattern: a tutorial gets read halfway, the tab closes because a meeting starts, and a week later that tutorial is gone. Browser history has moved on, the site name slips your mind, and the keywords you remember are too generic for a search engine to help. The problem is not a bad memory. Browser bookmarks store an address, not the content, not the context, and not the reason that link mattered in the first place.
Karakeep takes a different approach. This open source app saves a link together with its title, description, captured content, and a full-page archive, then lets you search back through the collection by its text. Run it on your own VPS and the collection no longer depends on a third-party account that might change plans, retire features, or quietly drop history. This guide takes you from an empty VPS to an archive you can actually use every day, using the project's official Docker Compose setup.
What you are building
One Docker stack with three services:
web: the Karakeep app plus its background workers, covering crawling, tagging, search, and asset processing.chrome: a headless browser that opens pages to capture titles, content, and archives.meilisearch: the search engine that indexes bookmark content so search goes beyond titles.
There is no separate Postgres service here. Karakeep's SQLite database lives inside the /data directory on a Docker volume. That makes the backup story refreshingly simple: back up that volume and you have the core of the archive. Understanding this layout early prevents most installation mistakes, because nearly every one starts with a wrong guess about which service holds what.
Prerequisites
You need a VPS with Docker and Docker Compose already running, SSH access, and one address for opening Karakeep, either the VPS IP with port 3000 for the first pass or a domain with HTTPS for long-term use. In this guide, port 3000 is the app's built-in port inside the container, matching the official Compose file. Do not change that internal port; if you need something different on the outside, change the outer side of the port mapping only.
The commands below use ~/karakeep as the project directory. Any other location works, as long as you stay consistent from start to finish.
Step 1: Fetch the official Compose file
Log in to the VPS, create the project directory, and download the official Compose file and sample environment file from the Karakeep repository:
mkdir -p ~/karakeep
cd ~/karakeep
curl -O https://raw.githubusercontent.com/karakeep-app/karakeep/main/docker/docker-compose.yml
curl -O https://raw.githubusercontent.com/karakeep-app/karakeep/main/docker/.env.sample
cp .env.sample .envDownloading the official files beats copying a Compose snippet from an older article. Image tags, the browser service name, and the Meilisearch version can change between releases, and the repository always reflects the current release. When you update Karakeep later, download the Compose file again, compare it with yours, and only then run the update.
The official Compose file you just downloaded uses ghcr.io/karakeep-app/karakeep:${KARAKEEP_VERSION:-release} for web, ghcr.io/karakeep-app/karakeep-chrome:release for chrome, and getmeili/meilisearch:v1.41.0 for meilisearch. The web service points MEILI_ADDR at http://meilisearch:7700, BROWSER_WEB_URL at http://chrome:9222, and DATA_DIR at /data. Leave DATA_DIR alone; if you want data on a specific host directory, change the volume mapping instead.
Step 2: Fill in the required environment variables
Open .env in a text editor:
nano .envThree variables are required and must be correct, as marked in Karakeep's official documentation:
DATA_DIR=/data
NEXTAUTH_URL=http://YOUR_VPS_ADDRESS:3000
NEXTAUTH_SECRET=fill-in-a-long-random-string
MEILI_MASTER_KEY=fill-in-a-long-random-keyGenerate the two random values with OpenSSL, not with an easy-to-guess word:
openssl rand -base64 36
openssl rand -base64 36 | tr -dc 'A-Za-z0-9'The first command fits NEXTAUTH_SECRET, following the official documentation. The second, which strips non-alphanumeric characters, fits MEILI_MASTER_KEY. Paste the results into .env, save, and close the editor.
Pay close attention to NEXTAUTH_URL. This is the server's official address, used for links in emails and authentication callbacks. An IP address with port 3000 is fine for the first pass. Once a domain and HTTPS are ready, change this value to the domain and restart the stack. Skipping that step is a classic source of login trouble: the page loads, but sessions do not stick, or the login redirect loops forever.
One note on MEILI_ADDR. The official .env sample lists http://127.0.0.1:7700, but the official Compose file overrides it for the web service to http://meilisearch:7700, the name of the Meilisearch service on Docker's internal network. Do not panic when the two values look different; they serve different layers. What matters is never pointing MEILI_ADDR at localhost from the host side, because from inside a container, localhost means that container itself, not Meilisearch.
Step 3: Start the stack and check its health
Start the stack in the background:
docker compose up -d
docker compose ps
docker compose logs -f webWhat you want to see: all three containers running, and the web log free of repeated connection errors to Meilisearch or Chrome. Press Ctrl+C to leave the log view; the containers keep running because you used the -d flag.
Open Karakeep in a browser:
http://YOUR_VPS_ADDRESS:3000If the page does not appear, troubleshoot in order instead of guessing. First, confirm the containers are running with docker compose ps. Second, read each service's logs separately: docker compose logs meilisearch and docker compose logs chrome. Third, make sure the VPS firewall allows port 3000 for this early stage, or, if you use a reverse proxy, that the proxy forwards to port 3000. The most common failure at this stage is not a Karakeep bug at all, but a closed port or a NEXTAUTH_URL that was never updated after moving from IP to domain.
Step 4: Create the first account, then lock signups
On the Karakeep page, sign up with an email address and password. The first account you create becomes the main account you will use to manage the collection. Once you can sign in, do not leave the signup door wide open, especially if Karakeep is reachable from the internet. Lock signups by adding this variable to .env:
DISABLE_SIGNUPS=trueThen apply it with:
docker compose up -dThe official documentation is clear on this variable: when enabled, no new signups are allowed and the signup button disappears from the interface. Existing accounts can still sign in. This small step is often skipped, yet the gap between a private archive and one strangers can fill is sometimes a single variable left unchanged.
Even if you add another login layer in front of Karakeep, such as a reverse proxy login or a private network, still lock signups at the application level. Layers that back each other up beat a single layer you assume is enough.
Step 5: Save the first link the right way
Karakeep offers several ways in, and picking the right one saves a lot of time. For a single link you are reading right now, the fastest route is the save button in the web interface or the official browser extension for Chrome, Firefox, and Safari. Paste the link, save it, and let the crawler work in the background. Title, description, and image fill in automatically from the page.
For a link you save while thinking, add context on the spot. One sentence about why it matters, such as "needed for the database migration section", beats a generic tag like "important" every time. That kind of note is what keeps an archive readable six months later, when the project details have faded from memory.
After a few minutes, a healthy bookmark shows the correct title and description, not just a bare address, and its page archive opens even when the original site is down or has changed. If bookmark content stays empty, check the web log and confirm the chrome service is running; a failed crawl almost always traces back to a browser container that stopped or cannot be reached through BROWSER_WEB_URL.
Step 6: Tags, lists, and house rules for the collection
Tags in Karakeep work best when they are few and sharp. Start with tags based on function, not on topics so broad they match everything. Examples that hold up: deploy, api-reference, market-research, writing-material. A tag like technology or interesting looks tidy at first, but it filters nothing once the collection passes a thousand items.
Lists are your second basket. Use a list for a group with a clear boundary: "reading before launch", "workshop material for next month", or "vendor A versus vendor B". Tags answer "what is this about", lists answer "what is this for". Keeping those two jobs apart stops a single tag from being forced to do both.
Once the collection grows, turn on automatic rules in Karakeep for work that genuinely repeats, such as tagging links from a certain domain or sending RSS feed items to a specific list. Write rules only for patterns that have already repeated, not for guesses. One wrong rule can tag hundreds of bookmarks incorrectly, and cleaning that up takes far longer than creating the rule did.
Full-text search: finding, not just remembering
This is where Meilisearch earns its place. Karakeep search does not stop at titles. It walks through the indexed content of archived pages, so a word that only appears in the middle of an article can still lead you back to the right link. Try it with a specific word from the article body, not a generic word from its title. A configuration parameter name, an error message, or a rare technical term usually returns a sharper result.
If search feels empty even though the bookmark exists, give indexing time, especially for long pages or large import batches. Indexing runs in the background, not instantly. If results stay empty after waiting, check that Meilisearch is running and that the MEILI_MASTER_KEY in .env matches the key the Meilisearch service uses. A mismatched key leaves the web app and the search engine silently ignoring each other, with no dramatic error message.
Automatic tagging with a language model is optional. The official documentation states that without OPENAI_API_KEY or OLLAMA_BASE_URL, automatic tagging is skipped, while saving, crawling, and search keep working. So do not delay using Karakeep just because no API key is ready. Start with manual tags and add automatic tagging later if it proves useful. For local use without an external API bill, Ollama is the documented route for local models.
Importing old bookmarks without polluting the new archive
Almost everyone who installs Karakeep arrives with old luggage: a browser HTML export, a Pocket archive, or a collection from Linkwarden and Omnivore. The official documentation names importers for Chrome, Pocket, Linkwarden, Omnivore, and Tab Session Manager. The flow is: open the import feature in the Karakeep interface, pick the source, and upload the export file from that source.
Do not import everything at once without filtering. Work in small batches, one browser folder per session, and review the result before moving on. That gives you a chance to fix tags, drop duplicates, and remove dead links before they pile into the thousands. A clean import at the start saves hours of cleanup at the end.
Duplicates are normal when merging several sources. Handle them by source: browser imports for everyday reading, Pocket imports for long reads on hold, and so on. When one link appears twice from two sources, keep the version with the richest context and delete the other. A tidy archive is not the biggest one; it is the one where every item still has a reason to stay.
Backup: one volume, one habit
Because the SQLite database and Karakeep assets live in the data volume, and the Meilisearch index lives in the meilisearch volume, the backup plan can stay simple. Stop the stack briefly so no write lands mid-copy, then copy the volume:
docker compose down
docker volume ls | grep karakeep
docker run --rm -v karakeep_data:/source -v ~/karakeep-backup:/target alpine tar czf /target/karakeep-data.tar.gz -C /source .
docker compose up -dThe command above uses karakeep_data as an example; the real name follows your Compose project name, so check it first with docker volume ls. Never copy a volume from a running container without pausing first, because an SQLite database can be copied in an inconsistent state. A backup that cannot be restored is no better than no backup at all.
Test a restore occasionally in a separate place, rather than trusting the backup file's size alone. A backup never tested is only a hope in a .tar.gz file. Once the manual scheme works, automate it with cron, and keep one copy off the VPS. An archive that only lives on the same machine as its source is a second copy, not a backup, and it disappears together with that machine when trouble hits.
Updates and routine care
Update Karakeep by pulling the latest images and restarting the stack:
cd ~/karakeep
curl -O https://raw.githubusercontent.com/karakeep-app/karakeep/main/docker/docker-compose.yml
docker compose pull
docker compose up -d
docker compose psBack up before updating, using the step above. After the update, open one old bookmark, save one new link, and run one search. Those three quick checks cover the main paths: read, write, and find. If any of them fails, the web log is the first place to look, not a random forum thread. Note the running version before and after the update, so you can state exactly what changed if you ever need help.
Common mistakes and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Page does not open on port 3000 | Container stopped, firewall blocking the port, or proxy pointing elsewhere | Check docker compose ps, open port 3000, or fix the reverse proxy target |
| Login loops or sessions do not stick | NEXTAUTH_URL still holds the old address after moving to a domain | Change NEXTAUTH_URL to the active address, then run docker compose up -d |
| Bookmarks save without content | chrome service stopped or unreachable | Check docker compose logs chrome, confirm BROWSER_WEB_URL points to http://chrome:9222 |
| Search returns nothing though bookmarks exist | Indexing still running, or Meilisearch key mismatch | Wait for background processing, match MEILI_MASTER_KEY, check the Meilisearch log |
| Signups still open to the public | DISABLE_SIGNUPS not enabled | Add DISABLE_SIGNUPS=true to .env, then restart the stack |
| Data gone after down -v | The -v flag removed the volumes | Avoid docker compose down -v unless you truly mean to delete data |
The last row deserves emphasis. A plain down stops containers without deleting volumes. Adding -v deletes named volumes, including Karakeep's data volume. A lot of data loss starts with one flag typed without re-reading the command.
Summary table
| Component | Role | Remember |
|---|---|---|
| web | App and background workers | Image ghcr.io/karakeep-app/karakeep:release, internal port 3000 |
| chrome | Headless browser for crawling | Image ghcr.io/karakeep-app/karakeep-chrome:release, reached at http://chrome:9222 |
| meilisearch | Full-text search index | Image getmeili/meilisearch:v1.41.0, data in the meilisearch volume |
| data volume | SQLite database and assets | Back up this volume, never change DATA_DIR from /data |
| .env | Main configuration | NEXTAUTH_URL, NEXTAUTH_SECRET, and MEILI_MASTER_KEY must be correct |
| DISABLE_SIGNUPS | Public signup lock | Enable it after the first account is created |
Final checklist
docker-compose.ymland.env.sampledownloaded from the official Karakeep repository.NEXTAUTH_URLpoints to the active address,NEXTAUTH_SECRETandMEILI_MASTER_KEYgenerated with OpenSSL.- All three containers are running and the web log is free of repeated connection errors.
- The first account is created and can sign in.
DISABLE_SIGNUPS=trueis enabled after the first account is created.- One link is saved complete with title, description, and archive.
- One full-text search finds content from the middle of an article, not just its title.
- One batch of old imports is reviewed, not merely uploaded.
- A backup of the data volume exists and its restore location is known.
Closing
Karakeep will not make you read more. It makes what you already chose to read findable again, readable again, and usable again when it matters. Start with one small habit: every link that feels important goes straight into Karakeep with one sentence on why it matters, instead of lingering in a browser tab. After a week, search for an old link using a word from inside its article. If the archive returns the answer in seconds, the system is doing its job.
Now it is your turn: which link do you keep searching for and never find? Leave it in the comments, along with the first tag you plan to use for tidying your collection. Those answers often say more than a feature list, because they reveal the real patterns inside an archive under construction.
Read also: How to Sync Files Across Devices Without the Cloud Using Syncthing for file sync across devices, and How to Install SearXNG on a VPS as Your Private Search Engine for a private search engine that pairs well with your archive.


Diskusi
Ada pertanyaan atau pengalaman yang ingin dibagikan?
Komentar ditinjau sebelum ditampilkan. Mari berdiskusi dengan sopan dan sesuai topik.
Tulis komentar