Portainer Templates logo

Portainer Templates

Archivebox Archivebox

Container

OtherTools

ArchiveBox is a powerful, self-hosted internet archiving solution to collect, save, and view sites you want to preserve offline.

Image details

Pulls: 11.3M
Architecture: amd64, arm64
Image size: 881 MB
Latest: 0.9.35rc286
User: archivebox
Created: Nov 23, 2020
Updated: 38 minutes ago
Status: active

Source details

Stars: 28.1k
Forks: 2k
Language: Python
License: MIT
Updated: 41 minutes ago
Website: archivebox.io/

Configuration

Type
Container
Platform
linux
Image
archivebox/archivebox:latest
Ports
8002:8000/tcp
Volumes
/data : /portainer/Files/AppData/Config/archivebox
Env vars
ALLOWED_HOSTS=*MEDIA_MAX_SIZE=750mPUBLIC_INDEX=truePUBLIC_SNAPSHOTS=truePUBLIC_ADD_VIEW=false
Restart
unless-stopped

Template by novaspirit

Notes

Template created by Pi-Hosted Series
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

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. 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 demo

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...


snapshot detail page
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 user

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 --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:dev

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: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.




bookshelf graphic   logo   bookshelf graphic

Demo | Screenshots | Usage
. . . . . . . . . . . . . . . . . . . . . . . . . . . .

cli init screenshot cli init screenshot server snapshot admin screenshot server snapshot details page screenshot

Key Features



🤝 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 compliance
Contact 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.




grassgrass

Quickstart

🖥  Supported OSs: Ubuntu, macOS, Docker   👾  CPUs: amd64 (x86_64), arm64


✳️  Easy Setup

Docker 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.

  1. Install Docker on your system (if not already installed).
  2. Download the 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
    
  3. 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
    
  4. Next steps: Log in to the Admin UI at http://admin.archivebox.localhost:8000.

    run CLI commands inside the server container started above

    docker compose exec archivebox archivebox add 'https://example.com' docker compose exec archivebox archivebox help
    For more info, see Install: Docker Compose in the Wiki. ➡️

See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.


Docker docker run (macOS/Linux)
  1. Install Docker on your system (if not already installed).
  2. 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
    
  3. Optional: Start the server then log in to the Admin UI at http://admin.archivebox.localhost:8000.
    docker run -v $PWD:/data -p 8000:8000 archivebox/archivebox:dev

    completely 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
    For more info, see Install: Docker Compose in the Wiki. ➡️

See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.


curl sh automatic setup script bash auto-setup script (macOS/Linux)
  1. Install Docker on your system (optional, highly recommended but not required).
  2. Run the automatic setup script.
    curl -fsSL 'https://get.archivebox.io' | bash
    For more info, see Install: Bare Metal in the Wiki. ➡️

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 uv (macOS/Linux/BSD)

  1. Install uv on your system (if not already installed).
  2. Install the ArchiveBox package using 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...
  3. 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.)
    
  4. 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:8000

    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.


aptitude apt (Ubuntu/Debian/etc.)
  1. Add the third-party ArchiveBox apt repo and install 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
    
  2. Create a new empty directory and initialize your collection (can be anywhere).
    mkdir -p ~/archivebox/data
    cd ~/archivebox/data
    archivebox init
    archivebox install
    archivebox add 'https://example.com'
    

  3. 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:8000

    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.
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.


homebrew brew (macOS and Linux)
Run Homebrew as your normal non-root user on both macOS and Linux; do not use sudo brew.
  1. Install Homebrew on your system (if not already installed).
  2. Install the ArchiveBox package using brew.
    brew tap archivebox/archivebox
    brew trust archivebox/archivebox
    brew install archivebox
    archivebox version                         # verify the installed version
    
    See the Install: Bare Metal Wiki for more granular instructions for macOS... ➡️
  3. Create a new empty directory and initialize your collection (can be anywhere).
    mkdir -p ~/archivebox/data && cd ~/archivebox/data
    archivebox init
    archivebox install
    
  4. 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:8000

    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.


Arch pacman / FreeBSD pkg / Nix nix (Arch/FreeBSD/NixOS/more)

Warning: These are contributed by external volunteers and may lag behind the official uv and Docker channels.

Serve 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.com to http://archivebox:8000

Add 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: 137 means killed, usually out of memory. 126 or 127 means 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:8000 only 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 login to 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-stopped restart 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 no so the failure stays visible.

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 is 0.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:8000 means it's reachable on port 8002 of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, open http://your-server-ip:8002 in 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:

  • /data from /portainer/Files/AppData/Config/archivebox on 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 to 750m
  • PUBLIC_INDEX, defaults to true
  • PUBLIC_SNAPSHOTS, defaults to true
  • PUBLIC_ADD_VIEW, defaults to false

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 like docker 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 MIT license. 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.