ArchiveBox
Open-source self-hosted web archiving.
▶️ Quickstart | Demo | GitHub | Documentation | Info & Motivation | Community
ArchiveBox is a self-hosted app that lets you preserve content from websites in a variety of formats.
We aim to make your data immediately useful, and kept in formats that other programs can read directly. As output, we save standard HTML, PNG, PDF, TXT, JSON, WARC, SQLite, all guaranteed to be readable for decades to come. ArchiveBox also has a CLI, REST API, and webhooks so you can set up integrations with other services.
Without active preservation effort, everything on the internet eventually disappears or degrades.
ArchiveBox is an open source tool that lets organizations & individuals archive both public & private web content while retaining control over their data. It can be used to save copies of bookmarks, preserve evidence for legal cases, backup photos from FB/Insta/Flickr or media from YT/Soundcloud/etc., save research papers, and more...
➡️ Get ArchiveBox with pip install archivebox>=0.9.0rc0' on Linux/macOS, or via Docker ⭐️ on Linux/macOS.
Once installed, you can interact with it through the: Browser Extension, CLI, self-hosted web interface, Python API, or filesystem.
📥 You can feed ArchiveBox URLs one at a time, or schedule regular imports from your bookmarks or history, social media feeds or RSS, link-saving services like Pocket/Pinboard, our Browser Extension, and more. See Input Formats for a full list of supported input formats...
It saves snapshots of the URLs you feed it in several redundant formats. It also detects any content featured inside pages & extracts it out into a folder:
- 🌐 HTML/Any websites ➡️
original HTML+CSS+JS,singlefile HTML,screenshot PNG,PDF,WARC,title,article text,favicon,headers, ... - 🎥 Social Media/News ➡️
post content TXT,comments,title,author,images, ... - 🎬 YouTube/SoundCloud/etc. ➡️
MP3/MP4s,subtitles,metadata,thumbnail, ... - 💾 Github/Gitlab/etc. links ➡️
clone of GIT source code,README,images, ... - 📑 Google Docs/Dropbox/Scientific Papers ➡️
PDF,DOCX,CSV,PPTX, ... - ✨ and more, see Output Formats below...
uv-installed CLI, Python API, and SQLite3 APIs.
All the ways of using it are equivalent, and provide matching features like adding tags, scheduling regular crawls, viewing logs, and more...
🛠️ ArchiveBox uses standard tools like Chrome, wget, & yt-dlp, and stores data in ordinary files & folders.
(no complex proprietary formats, all data is readable without needing to run ArchiveBox)
The goal is to sleep soundly knowing the part of the internet you care about will be automatically preserved in durable, easily accessible formats for decades after it goes down.
📦 Install ArchiveBox using your preferred method: docker / uv / brew / apt / etc. (see full Quickstart below).
Expand for quick copy-pastable install commands... ⤵️
# Option A: Get ArchiveBox with Docker Compose (recommended):
mkdir -p ~/archivebox/data && cd ~/archivebox
curl -fsSL 'https://docker-compose.archivebox.io' > docker-compose.yml
docker compose pull
docker compose up -d --wait # initializes new collections automatically
open http://admin.archivebox.localhost:5797 to finish setup
docker compose run --rm archivebox add 'https://example.com'
docker compose run --rm archivebox help
Option B: Or use it as a plain Docker container:
mkdir -p ~/archivebox/data && cd ~/archivebox/data
docker run -d --name archivebox -v "$PWD:/data" -p 5797:5797 archivebox/archivebox:dev
open http://admin.archivebox.localhost:5797 to finish setup
docker run -it -v $PWD:/data archivebox/archivebox:dev add 'https://example.com'
docker run -it -v $PWD:/data archivebox/archivebox:dev help
Option C: Or install it with uv (see Quickstart below for apt, brew, and more)
uv tool install --python 3.13 --prerelease explicit --upgrade 'archivebox>=0.9.0rc0,<0.10'
mkdir -p ~/archivebox/data && cd ~/archivebox/data
archivebox init
archivebox install
archivebox add 'https://example.com'
archivebox help
archivebox server 0.0.0.0:5797
Option D: Or use the uv install shortcut for Option C
curl -fsSL 'https://get.archivebox.io' | bash
Open http://web.archivebox.localhost:5797 for the public UI and http://admin.archivebox.localhost:5797 for the admin UI ➡️
Set BASE_URL to change the public base domain. The default auto mode uses web. and admin. subdomains on *.localhost, but one host for ordinary DNS names. BIND_ADDR only controls the local listen address.
Key Features
- Free & open source, own your own data & maintain your privacy by self-hosting
- Powerful CLI with modular dependencies and support for Google Drive/NFS/SMB/S3/B2/etc.
- Comprehensive documentation, active development, and rich community
- Extracts a wide variety of content out-of-the-box: media (yt-dlp), articles (readability), code (git), etc.
- Supports scheduled/realtime importing from many types of sources
- Uses standard, durable, long-term formats like HTML, JSON, PDF, PNG, MP4, TXT, and WARC
- Powerful CLI, self-hosted web UI, Python API (BETA), REST API (ALPHA), or desktop app
- Saves all pages to archive.org as well by default for redundancy (can be disabled for local-only mode)
- Support for archiving content requiring login/paywall/cookies (see wiki security caveats!)
- Support for running JS during archiving to adblock, infiniscroll, modal-hide, thread-expand
Quickstart
🖥 Supported OSs: Ubuntu, macOS, Docker 👾 CPUs: amd64 (x86_64), arm64
✳️ Easy Setup
ArchiveBox Server.app (macOS)
ArchiveBox Server.app, move it to Applications, and open it.ArchiveBox.app, and optionally connect REST API clients, the mobile app, the browser extension, and other integrations to your server using your API Key.
docker-compose (macOS/Linux) 👈 recommended (click to expand)
👍 Docker Compose is recommended for the easiest install/update UX + best security + all extras out-of-the-box.
docker-compose.yml file into a new empty directory (can be anywhere).
mkdir -p ~/archivebox/data && cd ~/archivebox
curl -fsSL 'https://docker-compose.archivebox.io' > docker-compose.yml
docker compose pull
docker compose up -d --wait
/admin/ on the hostname or IP used to reach ArchiveBox (local example: http://admin.archivebox.localhost:5797/admin/) to create the first admin. If BASE_URL is not configured yet, continue through the web setup wizard.
For more info, see Install: Docker Compose in the Wiki. ➡️
run CLI commands inside the server container started above
docker compose exec archivebox archivebox add 'https://example.com'
docker compose exec archivebox archivebox help
Docker image channels: archivebox/archivebox:dev advances only after full CI passes. Development servers can opt into :dev-unstable, which follows the newest clean dev image after both architectures finish the Docker build and checks, without waiting for the rest of CI. The existing universal :sha-<12-character-commit> tag is published at the same time. Both channels include amd64 and arm64, and are also available at ghcr.io/archivebox/archivebox. The early dev-unstable and SHA images can contain changes that fail later checks; ordinary installations should keep using the fully tested release channels.
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
docker run (macOS/Linux)
mkdir -p ~/archivebox/data && cd ~/archivebox/data
docker run -d --name archivebox -v $PWD:/data -p 5797:5797 archivebox/archivebox:dev
/admin/ on the hostname or IP used to reach ArchiveBox (local example: http://admin.archivebox.localhost:5797/admin/) to create the first admin. If BASE_URL is not configured yet, continue through the web setup wizard.
For more info, see Install: Docker Compose in the Wiki. ➡️
completely optional, CLI can always be used without running a server
docker exec archivebox archivebox [subcommand] [--help]
docker exec archivebox archivebox help
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
bash uv install shortcut (macOS/Linux/BSD)
uv install method. It installs uv first when needed.
For more info, see Install: Bare Metal in the Wiki. ➡️
curl -fsSL 'https://get.archivebox.io' | bash
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
See setup.sh for the source code of the uv install shortcut.
See "Against curl | sh as an install method" blog post for my thoughts on the shortcomings of this install method.
🛠 Package Manager Setup
uv (macOS/Linux/BSD)
uv.
uv tool install --python 3.13 --prerelease explicit --upgrade 'archivebox>=0.9.0rc0,<0.10'
archivebox version
See the Install: Bare Metal Wiki for full install instructions for each OS...
mkdir -p ~/archivebox/data && cd ~/archivebox/data # for example
archivebox init # initialize a new collection
archivebox install # install all the runtime dependencies (e.g. chrome, single-file, yt-dlp, etc.)
/admin/ on the hostname or IP used to reach ArchiveBox (local example: http://admin.archivebox.localhost:5797/admin/) to create the first admin. If BASE_URL is not configured yet, continue through the same web setup wizard used by Docker installs.
archivebox server 0.0.0.0:5797
completely optional, CLI can always be used without running a server
archivebox [subcommand] [--help]
archivebox help
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
See the uv tool documentation for more details about this installation method.
apt (Ubuntu/Debian/etc.)
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.archivebox.
echo 'deb [trusted=yes] https://archivebox.github.io/debian-archivebox dev main' | sudo tee /etc/apt/sources.list.d/archivebox.list
sudo apt update
sudo apt install archivebox
(cd /tmp && archivebox version) # make sure the package is installed
mkdir -p ~/archivebox/data
cd ~/archivebox/data
archivebox init
sudo archivebox install
archivebox add 'https://example.com'
/admin/ on the hostname or IP used to reach ArchiveBox (local example: http://admin.archivebox.localhost:5797/admin/) to create the first admin. If BASE_URL is not configured yet, continue through the same web setup wizard used by Docker installs.
archivebox server 0.0.0.0:5797
completely optional, CLI can always be used without running a server
archivebox [subcommand] [--help]
archivebox help
The apt package is a thin dev-channel wrapper around the normal Python install flow. sudo archivebox install uses apt for missing system dependencies while preserving ownership of the user-owned collection. See the debian-archivebox repo for details.
brew (macOS and Linux)
Run Homebrew as your normal non-root user on both macOS and Linux; do not use sudo brew.
brew.
See the Install: Bare Metal Wiki for more granular instructions for macOS... ➡️
brew tap archivebox/archivebox
brew trust archivebox/archivebox
brew install archivebox
archivebox version # verify the installed version
mkdir -p ~/archivebox/data && cd ~/archivebox/data
archivebox init
archivebox install
/admin/ on the hostname or IP used to reach ArchiveBox (local example: http://admin.archivebox.localhost:5797/admin/) to create the first admin. If BASE_URL is not configured yet, continue through the same web setup wizard used by Docker installs.
archivebox server 0.0.0.0:5797
completely optional, CLI can always be used without running a server
archivebox [subcommand] [--help]
archivebox help
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
See the homebrew-archivebox repo for more details about this distribution.
pacman /
pkg /
nix (Arch/FreeBSD/NixOS/more)
Warning: These are contributed by external volunteers and may lag behind the official uv and Docker channels.
- Arch:
yay -S archivebox(contributed by@imlonghao, maintained by@jasongodev) - FreeBSD:
curl -fsSL 'https://get.archivebox.io' | bash(usesuv) - Nix:
nix-env --install archivebox(contributed by@siraben) - Guix:
guix install archivebox(contributed by@rakino) - More: contribute another distribution...!
🎗 Other Options
docker +
electron Desktop App (macOS/Linux/Windows)
Desktop app guide · Screenshots
TrueNAS / UNRAID / YunoHost / Cloudron / etc. (self-hosting solutions)
Warning: These are contributed by external volunteers and may lag behind the official Docker and uv channels.
- TrueNAS
- UnRaid
- Proxmox
- Yunohost
- Cloudron
- Saltbox
- Portainer
- AppImage
- Runtipi
- Umbrel (need contributors...)
- More: contribute another distribution...!
Third-party paid hosting options (cloud VPS)
(USD $29-250/mo, pricing)
(from USD $2.6/mo)
(from EUR €9.99/mo)
(USD $5-50+/mo, 🎗 referral link, instructions)
(USD $2.5-50+/mo, 🎗 referral link, instructions)
(USD $10-50+/mo, instructions)
(USD $0-5+/mo)
(USD $60-200+/mo)
(USD $60-200+/mo)
Referral links marked 🎗 provide $5-10 of free credit for new users and help pay for our demo server hosting costs.
For more discussion on third-party hosting options see here: Issue #531.
➡️ Next Steps
- Import URLs from some of the supported Input Formats or view the supported Output Formats...
- (Optional) Import browser cookies and settings into a persona.
- Tweak your UI or archiving behavior Configuration, read about some of the Caveats, or Troubleshoot
- Read about the Dependencies used for archiving, the Upgrading Process, or the Archive Layout on disk...
- Or check out our full Documentation or Community Wiki...
Usage
⚡️ CLI Usage
ArchiveBox commands can be run in a terminal directly on your host, or via Docker/Docker Compose. (depending on how you chose to install it above)
mkdir -p ~/archivebox/data # create a new data dir anywhere
cd ~/archivebox/data # IMPORTANT: cd into the directory
archivebox [subcommand] [--help]
archivebox version
archivebox help
equivalent: docker compose run --rm archivebox [subcommand] [--help]
docker compose run --rm archivebox help
equivalent: docker run -it -v $PWD:/data archivebox/archivebox:dev [subcommand] [--help]
docker run -it -v $PWD:/data archivebox/archivebox:dev help
ArchiveBox Subcommands
archiveboxhelp/versionto see the list of available subcommands / currently installed version infoarchiveboxsetup/init/config/status/shell/manageto administer your collectionarchiveboxadd/scheduleto pull in fresh URLs from bookmarks/history/RSS/etc.archiveboxlist/update/removeto manage existing Snapshots in your collection
CLI Usage Examples: non-Docker
make sure you have uv-installed ArchiveBox and it's available in your $PATH first
archivebox [subcommand] [--help]
mkdir -p ~/archivebox/data && cd ~/archivebox/data
archivebox init
archivebox install
archivebox add 'https://example.com'
archivebox version # get archivebox version info + check dependencies
archivebox help # get list of archivebox subcommands that can be run
For more info, see our Usage: CLI Usage wiki. ➡️
CLI Usage Examples: Docker Compose
For more info, see our Usage: Docker Compose CLI wiki. ➡️
make sure you have
docker-compose.yml from the Quickstart instructions first
docker compose exec archivebox archivebox [subcommand] [--help]
docker compose exec archivebox archivebox version
docker compose exec archivebox archivebox help
docker compose exec archivebox archivebox add 'https://example.com'
to start webserver: docker compose up
CLI Usage Examples: Docker
For more info, see our Usage: Docker CLI wiki. ➡️
make sure the
archivebox server container from the Quickstart is running first
docker exec archivebox archivebox [subcommand] [--help]
docker exec archivebox archivebox version
docker exec archivebox archivebox help
docker exec archivebox archivebox add 'https://example.com'
🗄 SQL/Python/Filesystem Usage
For more info, see our Python Shell, SQL API, and Disk Layout wikis. ➡️
archivebox shell # explore the Python library API in a REPL
sqlite3 ./index.sqlite3 # run SQL queries directly on your index
find ./archive/users -path '/snapshots////index.html' # inspect snapshot data directly
🖥 Web UI & API Usage
Start the server on bare metal (uv/apt/brew):
archivebox server 0.0.0.0:5797 # start the server
Or with Docker Compose:
docker compose up # start the server
Or with a Docker container:
docker run -v $PWD:/data -it -p 5797:5797 archivebox/archivebox:dev
Open http://admin.archivebox.localhost:5797/admin/ to create the first admin and finish web setup. Use http://web.archivebox.localhost:5797 for the public UI. ➡️
Advanced: archivebox manage createsuperuser remains available for creating accounts from the CLI.
Set BASE_URL to change the public base domain. The default auto mode uses web. and admin. subdomains on *.localhost, but one host for ordinary DNS names. BIND_ADDR only controls the local listen address.
For more info, see our Usage: Web UI wiki. ➡️
Optional: Change permissions to allow non-logged-in users
archivebox config --set PUBLIC_ADD_VIEW=True # allow guests to submit URLs
archivebox config --set PERMISSIONS=public # make newly added snapshots public
archivebox config --set PUBLIC_INDEX=True # allow guests to see list of all snapshots
or
docker compose run --rm archivebox config --set PERMISSIONS=public
restart the server to apply any config changes
Snapshot caching follows each snapshot's saved PERMISSIONS, including inherited defaults and snapshot overrides. Public content can be cached by browsers and shared proxies/CDNs; private and unlisted content uses Cache-Control: private so only the user's browser can cache it. Both retain normal artifact cache lifetimes and validators for fast repeat viewing. Authentication handoffs are not stored. Changing permissions does not revoke copies already cached under the previous policy; purge any affected shared cache when needed.
🐧 Desktop / Mobile / Extension Usage
- 📱
ArchiveBoxiOS Mobile App - 🖥️
ArchiveBox.appmacOS Desktop App - 🧩 ArchiveBox Browser Extension
- 💻 Linux/Windows Desktop App (Requires Docker Desktop)
[!TIP]
Whether in Docker or not, ArchiveBox commands work the same way, and can be used to access the same data on-disk.
For example, you could run the Web UI in Docker Compose, and run one-off commands with uv-installed ArchiveBox.
Expand to show comparison...
archivebox add --depth=1 'https://example.com' # add a URL with uv-installed archivebox on the host
docker compose run --rm archivebox add --depth=1 'https://example.com' # or w/ Docker Compose
docker run -it -v $PWD:/data archivebox/archivebox:dev add --depth=1 'https://example.com' # or w/ Docker, all equivalent
For more info, see our Docker wiki. ➡️
DEMO:
https://demo.archivebox.ioUsage | Configuration | Caveats
Overview
Input Formats: How to pass URLs into ArchiveBox for saving
From the official ArchiveBox Browser Extension
From the official ArchiveBox macOS Desktop App, iOS App, or Android App
- 💬 From ArchiveBox Bot in your chat apps
From manual imports of URLs from RSS, JSON, CSV, TXT, SQL, HTML, Markdown, etc. files
From manually exported browser history or browser bookmarks (in Netscape format)
From URLs visited through a MITM Proxy with
archivebox-proxy
From bookmarking services or social media (e.g. Twitter bookmarks, Reddit saved posts, etc.)
# archivebox add --help
archivebox add 'https://example.com/some/page'
archivebox add --depth=1 --plugins=parse_rss_urls "file://$HOME/Downloads/some_feed.xml"
archivebox add --depth=1 'https://news.ycombinator.com#2020-12-12'
echo 'http://example.com' | archivebox add
echo 'any text with <a href="https://example.com">urls</a> in it' | archivebox add
if using Docker, add -i when piping stdin:
echo 'https://example.com' | docker run -v $PWD:/data -i archivebox/archivebox:dev add
if using Docker Compose, add -T when piping stdin / stdout:
echo 'https://example.com' | docker compose run --rm -T archivebox add
See the Usage: CLI page for documentation and examples.
It also includes a built-in scheduled import feature with archivebox schedule, handled by the same orchestrator that powers archivebox server, so you can pull in URLs from RSS feeds and websites regularly without a separate cron container.
Output Formats: What ArchiveBox saves for each URL
For each web page added, ArchiveBox creates a Snapshot folder and preserves its content as ordinary files inside the folder (e.g. HTML, PDF, PNG, JSON, etc.).
It uses all available methods out-of-the-box, but you can disable extractors and fine-tune the configuration as-needed.
Expand to see the full list of ways it saves each page...
data/archive/users/{username}/snapshots/{YYYYMMDD}/{domain}/{Snapshot.id}/
- Index:
index.html&index.jsonHTML and JSON index files containing metadata and details - Title, Favicon, Headers Response headers, site favicon, and parsed site title
- SingleFile:
singlefile.htmlHTML snapshot rendered with headless Chrome using SingleFile - Wget Clone:
example.com/page-name.htmlwget clone of the site withwarc/TIMESTAMP.gz - Chrome Headless
- PDF:
output.pdfPrinted PDF of site using headless chrome - Screenshot:
screenshot.png1440x900 screenshot of site using headless chrome - DOM Dump:
output.htmlDOM Dump of the HTML after rendering using headless chrome
- PDF:
- Article Text:
article.html/jsonArticle text extraction using Readability & Mercury - Archive.org Permalink:
archive.org.txtA... (README truncated for length)