Install ArchiveBox on a One-Click Docker Application

Updated on May 5, 2021
Install ArchiveBox on a One-Click Docker Application header image


ArchiveBox is a self-hosted internet archiving solution to preserve and view sites offline. This guide explains how to self-host ArchiveBox on a Vultr One-Click Docker application, and publish it with a Caddy reverse proxy.


1. Set up ArchiveBox

  1. Log in to your One Click Docker as root via SSH.

  2. Switch to the docker user.

     # su - docker
  3. Create a new empty directory for ArchiveBox and it's data.

     $ mkdir ~/archivebox && cd ~/archivebox
  4. Download the official Docker Compose file for ArchiveBox.

     $ curl -O ''
  5. (Optional) You can set a restart policy for ArchiveBox.

    For example, to always restart automatically, edit docker-compose.yml and set restart: always, as shown here.

             image: ${DOCKER_IMAGE:-archivebox/archivebox:latest}
             command: server --quick-init
                 - 8000:8000
             restart: always
                 - ALLOWED_HOSTS=*
                 - MEDIA_MAX_SIZE=750m
                 - ./data:/data.
  6. Run the initial setup.

     docker-compose run archivebox init --setup
  7. Enter the username, email address, and password for the Web UI admin user.

  8. Start the server at localhost:8000

     docker-compose up -d
  9. Return to the root user account. All the following steps should be run as root.

     $ exit

2. Set the UFW Firewall Rules

Vultr's One Click Docker has the UFW firewall enabled and allows SSH traffic on port 22. To allow access to the web server, enable HTTP on port 80 and HTTPS on port 443.

# ufw allow 80
# ufw allow 443

Enable the firewall and verify the status.

# ufw enable
# ufw status

3. Add Server to DNS

Caddy handles SSL/TLS certificates and reverse-proxies the web traffic to ArchiveBox. You must be able to resolve your server by name for Caddy's automatic certificates to work.

  1. Point your server's DNS A record to the IP address of your Vultr One Click Docker server.

  2. Verify the DNS records are correct. Replace the name below with your server's DNS name.

     # dig
  3. Verify you have a valid Answer Section, and the IP address matches your server's DNS name.

     ;; ANSWER SECTION:  3600  IN  A

4. Set up a Caddy Reverse Proxy

  1. Install Caddy.

     # apt install -y debian-keyring debian-archive-keyring apt-transport-https
     # curl -1sLf '' | sudo apt-key add -
     # curl -1sLf '' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list
     # apt update
     # apt install caddy
  2. Edit Caddy's configuration file.

     # nano /etc/caddy/Caddyfile

    Replace the contents with the lines below, and substitute your server's domain name.
     reverse_proxy localhost:8000
  3. Reload the configuration.

     # caddy reload --config /etc/caddy/Caddyfile
  4. Navigate to your new site by name to verify it works. For example:

More Information

See these links for more information.