Self-host ArchiveBox on a managed VPS: your own web archive

To self-host ArchiveBox on a managed VPS is to keep your own copies of the web pages that matter to you, on a server of your own, which our teams keep up to date and monitor day and night. ArchiveBox is a free, open source web archiving application under the MIT license: give it a URL, and it saves the page as HTML, a screenshot, a PDF, a WARC file and plain text, then indexes it. This guide follows its official Docker Compose file at version 0.9.77, and we ran every command on a Simafri test VPS before writing it: installation, HTTPS on a single domain, a private archive, a first capture, backups, a restore and an upgrade.

Simon Vasconcelos Lee By Published on 28 November 202612 minute read

All guides

In short

  1. The MIT license lets you run ArchiveBox for yourself, your team or your clients, with nothing to pay for the software.
  2. Install it with Docker Compose: the official image archivebox/archivebox holds ArchiveBox, Chromium and the other capture tools, with port 5797 published on 127.0.0.1 behind an HTTPS reverse proxy.
  3. On a single public domain, set BASE_URL and SERVER_SECURITY_MODE=safe-onedomain-nojsreplay: one certificate is enough, and archived JavaScript never runs next to your admin session.
  4. Keep the archive private with PUBLIC_INDEX=False and PERMISSIONS=private, and create the administrator from ADMIN_PASSWORD on the first start, then remove it from the environment.
  5. Everything lives in the data folder: stop the container, archive the folder, start it again. To update, follow the official steps: pull, init, update --migrate-only.

What ArchiveBox does

ArchiveBox saves web pages so that you can read them again after they change or disappear: articles, documentation, evidence, research papers, posts and videos. Each URL you add becomes a snapshot, captured by a set of plugins that each save it in a different, durable format.

On our test VPS, archiving https://example.com took 48 seconds and 232 KB, with the SingleFile copy, the screenshot and the PDF all saved. Its index is a standard SQLite database, and every snapshot is a plain folder that other programs can read directly.

What the MIT license allows

ArchiveBox is published under the MIT license. You can use it free of charge, for yourself, your company or your clients, copy it, modify it and redistribute it, as long as you keep its copyright notice and license text. The software is provided without warranty.

What you archive is another matter: the pages you save keep their own authors and rights. ArchiveBox serves a robots.txt that asks search engines not to index the archive, and keeping the archive private, as below, means only your team reads it.

The resources to plan for

ArchiveBox drives a real Chromium browser for most of its captures, so memory matters more than for a typical web application. Here is what we measured on our test VPS, with 2 vCPU and 4 GB of memory:

Server size therefore depends on how much you archive, how many captures run at the same time, and the other applications you run beside ArchiveBox. On a managed VPS, tell us about your usage and we will recommend the right size.

Installing with Docker Compose

The official image, archivebox/archivebox, contains ArchiveBox, Chromium and every capture tool, and runs them as a dedicated non-root user. Its command initializes the collection in /data on the first start, then serves the web interface on port 5797. On a server with Docker Engine and its Compose plugin, installed from Docker’s repository for Ubuntu, create the folder:

Terminal
mkdir -p /opt/archivebox/data
cd /opt/archivebox

Then put this compose.yaml in it, based on the official docker-compose.yml of version 0.9.77:

compose.yaml
services:
    archivebox:
        image: archivebox/archivebox:0.9.77
        restart: unless-stopped
        ports:
            - "127.0.0.1:8104:5797"
        volumes:
            - ./data:/data
            - tmp:/tmp/archivebox
        environment:
            - BASE_URL=https://archivebox.example.com
            - SERVER_SECURITY_MODE=safe-onedomain-nojsreplay
            - PUBLIC_INDEX=False
            - PUBLIC_ADD_VIEW=False
            - PERMISSIONS=private
            - ARCHIVEDOTORG_ENABLED=False
            - ADMIN_USERNAME=admin
            - ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
        shm_size: 1gb
        pids_limit: 2048

volumes:
    tmp:

The administrator’s password goes in a .env file next to it, which Docker Compose reads on its own. Create it readable by root only, close the folder to other users of the server, then start ArchiveBox:

Terminal, in /opt/archivebox
umask 077
printf "ADMIN_PASSWORD=%s\n" "$(openssl rand -hex 16)" > .env
umask 022
chmod 700 /opt/archivebox
docker compose up -d --wait
docker compose ps

On our test VPS, the container reported itself healthy about 30 seconds after the start. To check that the collection was created along with the administrator:

Terminal, in /opt/archivebox
docker compose logs archivebox 2>&1 | grep -i -E "admin|superuser|created|migrat|error|warn" | head -20

The output lists the database migrations, then “Found ADMIN_USERNAME and ADMIN_PASSWORD configuration options, creating new admin user”. On our VPS, the very first start also printed a warning, “Unable to mirror file config to DB; keeping file”, with no effect on anything that followed.

HTTPS: the reverse proxy

The container serves ArchiveBox over HTTP, on port 8104 of the server. HTTPS is handled by a reverse proxy in front of it. We tested Caddy, installed from its official Debian and Ubuntu repository: it obtains the Let’s Encrypt certificate itself, renews it, and forwards the Host and X-Forwarded-Proto headers by default.

/etc/caddy/Caddyfile
archivebox.example.com {
	reverse_proxy 127.0.0.1:8104
}
Terminal
systemctl reload caddy

To check the result from the server:

Terminal
curl -sI https://archivebox.example.com/
curl -s https://archivebox.example.com/health/; echo

On our test VPS, Caddy obtained the certificate on its first reload. The home page answered over HTTP/2 with a redirect to /admin/login/, since the archive is private, and the health check returned OK.

The first login and the first snapshot

Open your address: ArchiveBox shows its login page. Sign in as admin with the password from .env, which this command displays:

Terminal, in /opt/archivebox
grep ^ADMIN_PASSWORD= .env

To add a URL, use the Add page of the web interface, the browser extension, or the command line inside the container:

Terminal, in /opt/archivebox
docker compose exec archivebox archivebox add "https://example.com"
docker compose exec -T archivebox archivebox status

The add command prints each plugin as it runs, then the folder of the snapshot, here under data/archive/users/system/snapshots/. The status command counts the snapshots in the index and on disk: on our VPS, one indexed, one archived, one valid and no orphan.

In the web interface, the snapshot appears in the list with its title, “Example Domain”, and its page opens the SingleFile copy, the screenshot, the PDF and the other outputs. Without signing in, the list and the snapshot both lead to the login page. To check the same thing from the command line, through HTTPS and the REST API:

Terminal, in /opt/archivebox
U=https://archivebox.example.com
PW=$(grep ^ADMIN_PASSWORD= .env | cut -d= -f2)
TOKEN=$(curl -s -X POST -H "Content-Type: application/json" -d "{\"username\":\"admin\",\"password\":\"$PW\"}" $U/api/v1/auth/get_api_token | grep -o -E "\"token\": *\"[^\"]*\"" | cut -d\" -f4)
curl -s -H "Authorization: Bearer $TOKEN" "$U/api/v1/core/snapshots?limit=10" | grep -o -E "\"(id|url|title|status)\": *\"[^\"]*\"" | head -4
curl -s -o /dev/null -w "without a token: %{http_code}\n" "$U/api/v1/core/snapshots?limit=10"

On our test VPS, the API returned the snapshot of https://example.com, its title “Example Domain” and its status sealed, and refused the same request without a token with a 401. The token came with an expiry date 30 days later. Tokens for scripts and the browser extension can also be created in the admin interface, under API tokens.

Removing the password from the environment

Once you have signed in, store the password in your password manager, then remove it from .env and recreate the container, so that it no longer appears in its environment:

Terminal, in /opt/archivebox
sed -i "/^ADMIN_PASSWORD=/d" .env
docker compose up -d --wait
docker compose exec archivebox printenv ADMIN_PASSWORD | wc -c

The last command prints 1: the variable is empty. ArchiveBox keeps the user in its database, and the password still worked on our VPS after the restart. To change it later, use the password page of the admin interface, /admin/password_change/.

Backups

Everything lives in the data folder: the SQLite index index.sqlite3 with your users and settings, ArchiveBox.conf, and every snapshot under archive/. The upgrade checklist of the documentation asks you to stop ArchiveBox before copying it, since a database-only backup does not include the archived files. Keep the copy safe: anyone who can read index.sqlite3 can read your whole collection.

Terminal, in /opt/archivebox
docker compose stop archivebox
umask 077
tar -czf archivebox-$(date +%F).tar.gz compose.yaml .env data
umask 022
docker compose start archivebox

ArchiveBox is stopped for a few seconds, and the archive is readable by root only. On our VPS, the stop left no -wal or -shm file next to the database, so the archive held a complete index.sqlite3. Schedule this copy and send it off the server. Stored on the disk, it is also included in the server’s nightly backups.

Restoring

Stop ArchiveBox, delete the data folder, recreate it empty, then extract the archive and start again. Each command runs only if the previous one succeeded, so a damaged archive stops the restore before ArchiveBox starts on it:

Terminal, in /opt/archivebox
docker compose down
rm -rf data
mkdir data && echo "files in data after the wipe: $(ls -A data | wc -l)"
tar -xzf archivebox-2026-11-20.tar.gz data && echo "tar exit code: $?"
docker compose up -d --wait
docker compose exec -T archivebox archivebox status

We tested the whole cycle on our VPS: the archive made, the database deleted with the whole folder, the folder recreated empty, then the restore. The snapshot of https://example.com came back in the index and on disk, its SingleFile copy opened again through HTTPS, and the administrator signed in at once. tar keeps the owner of the files, the non-root user of the image. On a new server, put compose.yaml and .env back first, from the same archive.

Updates

ArchiveBox publishes its releases on GitHub, and the image follows on Docker Hub with the same numbers. This guide pins 0.9.77, the release marked Latest when we tested it: check the releases page for a newer one, and read its notes, before you update. Take a backup, change the image tag in compose.yaml, then follow the official steps for Docker Compose:

Terminal, in /opt/archivebox
sed -i "s|image: archivebox/archivebox:0.9.76|image: archivebox/archivebox:0.9.77|" compose.yaml; grep "image:" compose.yaml
docker compose down
docker compose pull
docker compose run --rm archivebox init
docker compose run --rm archivebox update --migrate-only
docker compose up -d --wait
docker compose exec -T archivebox archivebox version

On our test VPS, each docker compose down run without -v, as in the restore and the upgrade, left an empty anonymous volume of the image behind. If you uninstall ArchiveBox, docker volume ls lists them after docker compose down -v, and docker volume rm removes them.

Who does what on a managed VPS

Self-hosting means running the server on top of the application. On a managed VPS, our teams take charge of the server and proactively monitor your instance; ArchiveBox remains your software, with your archive and your settings.

TopicOur teamsYou
The serverSystem and security updates, server interventions includedThe timing that suits you
MonitoringServer monitored 24/7, with intervention without waiting for your callWhat you archive and how you organize it
ArchiveBoxProactive monitoring: errors, memory, disk space and failed captures spotted, fix recommendedIts installation, updates, plugins and settings, which you apply, yourself or through your AI assistant
UsersThe server that carries them, monitored and backed upAccounts, API tokens and permissions
BackupsEvery night, encrypted and kept off the machine; restores includedThe archives of the data folder, and the restore request, when you need one
MigrationYour current server migrated, free of chargeThe timing of the switch

If you would rather have our teams work inside the application itself, that service is billed by the hour or at a fixed rate, with an estimate shared before the work starts.

ArchiveBox, on a server run for you

With a Simafri Managed VPS, our teams keep your ArchiveBox server up to date, monitor it day and night and step in without waiting for your call; they also proactively monitor your instance and recommend useful fixes, which you apply, yourself or through your AI assistant. Backups are encrypted every night and kept off the machine, restores are included, and migrating your current server is free.

Explore Managed VPS

Frequently asked questions

Is ArchiveBox free?

Yes. ArchiveBox is under the MIT license: you can run it for yourself, your company or your clients with nothing to pay for the software. What remains is the cost of the server that runs it and the disk space your archive takes.

How do I install ArchiveBox with Docker Compose?

Use the archivebox/archivebox image with a pinned tag in a compose.yaml, mount a data folder on /data, publish port 5797 on 127.0.0.1, set BASE_URL to your https address, put the admin password in a .env file, run docker compose up -d --wait, and put an HTTPS reverse proxy in front.

How much memory does ArchiveBox need?

More than most web applications, because it runs Chromium. On our test VPS, the container used about 340 MB at rest and about 1.7 GB at the peak of a capture, and ArchiveBox ran up to two captures at a time. The image takes about 2.5 GB of disk.

Does ArchiveBox need wildcard DNS and subdomains?

No. On a single domain, set SERVER_SECURITY_MODE to safe-onedomain-nojsreplay: one certificate is enough and archived JavaScript does not run. Full JavaScript replay needs safe-subdomains-fullreplay, wildcard DNS and a wildcard certificate.

How do I keep my ArchiveBox archive private?

Set PUBLIC_INDEX to False, PERMISSIONS to private and PUBLIC_ADD_VIEW to False. Anonymous visitors then reach the login page instead of the list, the snapshots and the Add page, and the REST API refuses requests without a token.

How do I back up ArchiveBox in Docker?

Stop the container, archive the data folder with compose.yaml and .env, then start it again. The data folder holds the SQLite index, the settings and every snapshot. To restore, stop ArchiveBox, recreate the data folder empty, extract the archive and start again.

How do I update ArchiveBox in Docker?

Take a backup, change the image tag in compose.yaml, then run docker compose down, docker compose pull, docker compose run --rm archivebox init, docker compose run --rm archivebox update --migrate-only and docker compose up -d.

Does a managed VPS cover ArchiveBox?

A managed VPS covers the server: system, security, monitoring and backups. Our teams also proactively monitor your instance and recommend useful fixes, which you apply. Work inside the application is billed by the hour or at a fixed rate.

Contact us