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.
By Simon Vasconcelos Lee
Published on 28 November 202612 minute read
archivebox/archivebox holds ArchiveBox, Chromium and the other capture tools, with port 5797 published on 127.0.0.1 behind an HTTPS reverse proxy.BASE_URL and SERVER_SECURITY_MODE=safe-onedomain-nojsreplay: one certificate is enough, and archived JavaScript never runs next to your admin session.PUBLIC_INDEX=False and PERMISSIONS=private, and create the administrator from ADMIN_PASSWORD on the first start, then remove it from the environment.data folder: stop the container, archive the folder, start it again. To update, follow the official steps: pull, init, update --migrate-only.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.
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.
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:
data/index.sqlite3 on a local disk, never on a network share, as the documentation asks.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.
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:
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:
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:
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
latest. A full version, here 0.9.77, lets you choose when each update happens. The dev tags and the rc tags follow development and release candidates: stay on releases.127.0.0.1, here as port 8104 of the server: the official file publishes it on every address. Published locally, ArchiveBox is reachable only through the reverse proxy.BASE_URL is your public address, with https://: ArchiveBox builds its links from it, and derives from it the hosts and origins Django accepts.SERVER_SECURITY_MODE=safe-onedomain-nojsreplay serves everything on that one host and stops the JavaScript of archived pages from running. Archived JavaScript is untrusted content: on the same origin as the admin interface, it could act with your session. SingleFile copies, screenshots and PDFs read normally in this mode.PUBLIC_INDEX=False requires a login to see the list of snapshots, PERMISSIONS=private makes new snapshots visible to signed-in users only, and PUBLIC_ADD_VIEW=False keeps the Add page closed to anonymous visitors.ARCHIVEDOTORG_ENABLED=False: the official file sends every URL you archive to the Internet Archive as well. That suits public pages; turn it off for a private archive, or set it to True if you want the extra copy.ADMIN_USERNAME with the password of ADMIN_PASSWORD, and skips its setup wizard. The documentation advises removing the password from the environment once the user exists, which we do below.shm_size and pids_limit come from the official file: Chromium needs shared memory, and the captures start many processes.tmp volume lets one-off docker compose run commands share the running server’s workers, as in the official file.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:
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.
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.
archivebox.example.com {
reverse_proxy 127.0.0.1:8104
}
systemctl reload caddy
snap- hostnames.SERVER_SECURITY_MODE=safe-subdomains-fullreplay, wildcard DNS and a wildcard certificate, usually obtained through a DNS-01 challenge. We kept the single-domain mode.example.com/archivebox/, which cannot isolate it.To check the result from the server:
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.
Open your address: ArchiveBox shows its login page. Sign in as admin with the password from .env, which this command displays:
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:
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:
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.
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:
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/.
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.
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.
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:
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.
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:
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
init checked the database and had no migration to apply, update --migrate-only finished without error, and the snapshot was still there in 0.9.77, through the command line and the API.init applies the database migrations and can run any number of times; update --migrate-only migrates the folders of older snapshots to the current layout. Each runs in a one-off container, ArchiveBox stopped.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.
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.
| Topic | Our teams | You |
|---|---|---|
| The server | System and security updates, server interventions included | The timing that suits you |
| Monitoring | Server monitored 24/7, with intervention without waiting for your call | What you archive and how you organize it |
| ArchiveBox | Proactive monitoring: errors, memory, disk space and failed captures spotted, fix recommended | Its installation, updates, plugins and settings, which you apply, yourself or through your AI assistant |
| Users | The server that carries them, monitored and backed up | Accounts, API tokens and permissions |
| Backups | Every night, encrypted and kept off the machine; restores included | The archives of the data folder, and the restore request, when you need one |
| Migration | Your current server migrated, free of charge | The 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Simafri
Let's talk about your project
Tell us what you need in a few words: we will get back to you quickly.
Thank you! Your request has been sent. We'll get back to you shortly.
Prefer email? Write to us at support@simafri.com.