Archivebox
Container
ArchiveBox is a powerful, self-hosted internet archiving solution to collect, save, and view sites you want to preserve offline.
Image details
Source details
Configuration
TypeContainerlinuxarchivebox/archivebox:latest8002:8000/tcp/data : /portainer/Files/AppData/Config/archiveboxALLOWED_HOSTS=*MEDIA_MAX_SIZE=750mPUBLIC_INDEX=truePUBLIC_SNAPSHOTS=truePUBLIC_ADD_VIEW=falseunless-stoppedTemplate by novaspirit
Notes
Check our Github page: https://github.com/pi-hosted/pi-hosted
Official Webpage: https://archivebox.io/
Official Docker Documentation: https://github.com/ArchiveBox/ArchiveBox/wiki/Docker
By default an admin user is not created. You can do so by launching a shell in the container and executing 'archivebox manage createsuperuser'. Documentation is Available here.
Standalone Install
Select an install method, to see config/commands for deploying Archivebox
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Archivebox, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
More install options in our documentation, or see archivebox/archivebox for app-specific guidance.
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 uv tool install --python 3.13 --prerelease explicit --upgrade 'archivebox>=0.9.0rc0,<0.10' 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, ... - ✨ and more, see Output Formats below...
You can run ArchiveBox as a Docker web app to manage these snapshots, or continue accessing the same collection using the
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
docker compose exec archivebox archivebox manage createsuperuser # create the first Web UI userdocker 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 --rm -it -v "$PWD:/data" archivebox/archivebox:dev init
docker run --rm -it -v "$PWD:/data" archivebox/archivebox:dev install
docker run --rm -it -v "$PWD:/data" archivebox/archivebox:dev manage createsuperuser
docker run -d --name archivebox -v "$PWD:/data" -p 8000:8000 archivebox/archivebox:devdocker 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 installarchivebox add 'https://example.com'
archivebox help
archivebox server 0.0.0.0:8000
Option D: Or use the optional auto setup script to install it
curl -fsSL 'https://get.archivebox.io' | bash
Open
http://web.archivebox.localhost:8000 for the public UI and http://admin.archivebox.localhost:8000 for the admin UI ➡️Set
BASEURL to change the public base domain. The default auto mode uses web. and admin. subdomains on .localhost, but one host for ordinary DNS names. BINDADDR 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)
- Advanced users: support for archiving content requiring login/paywall/cookies (see wiki security caveats!)
- Planned: support for running JS during archiving to adblock, autoscroll, modal-hide, thread-expand
🤝 Professional Integration
ArchiveBox is free for everyone to self-host, but we also provide support, security review, and custom integrations to help NGOs, governments, and other organizations run ArchiveBox professionally:- Journalists:
crawling during research, preserving cited pages, fact-checking & review- Lawyers:
collecting & preserving evidence, detecting changes, tagging & review- Researchers:
analyzing social media trends, getting LLM training data, crawling pipelines- Individuals:
saving bookmarks, preserving portfolio content, legacy / memoirs archival- Governments:
snapshotting public service sites, recordkeeping complianceContact us if your org wants help using ArchiveBox professionally.
We offer: setup & support, CAPTCHA/ratelimit unblocking, SSO, audit logging/chain-of-custody, and more
ArchiveBox is a 🏛️ 501(c)(3) nonprofit FSP and all our work supports open-source development.
Quickstart
🖥 Supported OSs: Ubuntu, macOS, Docker 👾 CPUs:amd64 (x86_64), arm64✳️ Easy Setup
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.
- Install Docker on your system (if not already installed).
- Download the
docker-compose.ymlfile 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 - Start the server, which initializes a new collection automatically, then create the first admin user.
docker compose up -d --wait docker compose exec archivebox archivebox manage createsuperuser - Next steps: Log in to the Admin UI at http://admin.archivebox.localhost:8000.
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
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
docker run (macOS/Linux)
- Install Docker on your system (if not already installed).
- Create a new empty directory and initialize your collection (can be anywhere).
mkdir -p ~/archivebox/data && cd ~/archivebox/data docker run --rm -v $PWD:/data -it archivebox/archivebox:dev init docker run --rm -v $PWD:/data -it archivebox/archivebox:dev install - Optional: Start the server then log in to the Admin UI at http://admin.archivebox.localhost:8000.
For more info, see Install: Docker Compose in the Wiki. ➡️docker run -v $PWD:/data -p 8000:8000 archivebox/archivebox:devcompletely optional, CLI can always be used without running a server
docker run -v $PWD:/data -it archivebox/archivebox:dev subcommand --help
docker run -v $PWD:/data -it archivebox/archivebox:dev help
See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
bash auto-setup script (macOS/Linux)
- Install Docker on your system (optional, highly recommended but not required).
- Run the automatic setup script.
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 auto-install script.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)
- Install uv on your system (if not already installed).
- Install the ArchiveBox package using
uv.
See the Install: Bare Metal Wiki for full install instructions for each OS...uv tool install --python 3.13 --prerelease explicit --upgrade 'archivebox>=0.9.0rc0,<0.10' archivebox version - Create a new empty directory and initialize your collection (can be anywhere).
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.) - Create an admin account, then optionally start the server and log in to the Admin UI at http://admin.archivebox.localhost:8000.
archivebox manage createsuperuser archivebox server 0.0.0.0:8000completely 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.)
- Add the third-party ArchiveBox apt repo and install
archivebox.echo 'deb trusted=yes
mkdir -p ~/archivebox/data
cd ~/archivebox/data
archivebox init
archivebox install
archivebox add 'https://example.com'
archivebox manage createsuperuser
archivebox server 0.0.0.0:8000completely 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. See the
debian-archivebox repo for details, and run sudo archivebox install only if you want it to install missing system packages via apt.
brew (macOS and Linux)
Run Homebrew as your normal non-root user on both macOS and Linux; do not use
sudo brew.
- Install Homebrew on your system (if not already installed).
- Install the ArchiveBox package using
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 - Create a new empty directory and initialize your collection (can be anywhere).
mkdir -p ~/archivebox/data && cd ~/archivebox/data archivebox init archivebox install - Create an admin account, then optionally start the server and log in to the Admin UI at http://admin.archivebox.localhost:8000.
archivebox manage createsuperuser archivebox server 0.0.0.0:8000completely 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 byServe Archivebox on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying
archivebox.example.comtohttp://archivebox:8000Add this to your Caddyfile
archivebox.example.com { reverse_proxy http://archivebox:8000 }Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs archivebox - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:8002 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :8002 - Stop the other service, or pick a different host port. In
8002:8000only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:8002. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, archivebox can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 8002
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /portainer/Files/AppData/Config/archivebox
Image won't pull
Test the pull directly on the host:
docker pull archivebox/archivebox:latest- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64 - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The
unless-stoppedrestart policy relaunches the app after every crash, so the real error can scroll past.- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect archivebox --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue on archivebox/archivebox
- Template not working: Open an issue on novaspirit/pi-hosted
- This website not working: Open an issue on lissy93/portainer-templates
A single container
Archivebox runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.
The app image
An image is the app packed up ready to go, everything Archivebox needs bundled into one download. This template pulls
archivebox/archivebox:latest, which Docker fetches once (about 881 MB) and then starts your own copy from.Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. Archivebox's comes from Docker Hub, published by
archivebox.Version tags
The bit after the colon in the image name is the version tag. Here it's
latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is0.9.35rc286. Pin a specific tag if you would rather stay on one version.Which machines it runs on
Every image is built for particular CPU types. This one ships for
amd64, arm64, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.Ports
A port is the door the app answers on. A mapping like
8002:8000means it's reachable on port8002of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, openhttp://your-server-ip:8002in a browser. It opens:8002:8000, likely the web interface
Volumes
A volume is where Archivebox keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/datafrom/portainer/Files/AppData/Config/archiveboxon the host
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Archivebox takes 5 of them, all with defaults you can leave alone or tweak:
ALLOWED_HOSTS, defaults to*MEDIA_MAX_SIZE, defaults to750mPUBLIC_INDEX, defaults totruePUBLIC_SNAPSHOTS, defaults totruePUBLIC_ADD_VIEW, defaults tofalse
Restart policy
The restart policy here is
unless-stopped, so Docker restarts Archivebox after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).Networking
Nothing custom is set, so Archivebox sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Container name
Once it's deployed, Portainer names the container
archivebox. That's what you'll spot in the containers list and use in commands likedocker logs archivebox.Platform
The platform is
linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.Open source license
Archivebox is open source, released under the
MITlicense. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Archivebox up. Add the template list to Portainer once, then deploying Archivebox is a click rather than a wall of config.