

Install ArchiveBox on a One-Click Docker Application
source link: https://www.vultr.com/docs/install-archivebox-on-a-oneclick-docker-application
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Introduction
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.
Prerequisites
- A Vultr One-Click Docker application running Ubuntu 18.04
1. Set up ArchiveBox
Log in to your One Click Docker as root via SSH.
Switch to the docker user.
# su - docker
Create a new empty directory for ArchiveBox and it's data.
$ mkdir ~/archivebox && cd ~/archivebox
Download the official Docker Compose file for ArchiveBox.
$ curl -O 'https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/docker-compose.yml'
(Optional) You can set a restart policy for ArchiveBox.
For example, to always restart automatically, edit
docker-compose.yml
and setrestart: always
, as shown here.services: archivebox: image: ${DOCKER_IMAGE:-archivebox/archivebox:latest} command: server --quick-init 0.0.0.0:8000 ports: - 8000:8000 restart: always environment: - ALLOWED_HOSTS=* - MEDIA_MAX_SIZE=750m volumes: - ./data:/data.
Run the initial setup.
docker-compose run archivebox init --setup
Enter the username, email address, and password for the Web UI admin user.
Start the server at
localhost:8000
docker-compose up -d
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.
- Point your server's DNS A record to the IP address of your Vultr One Click Docker server.
Verify the DNS records are correct. Replace the name below with your server's DNS name.
# dig archivebox.example.com
Verify you have a valid Answer Section, and the IP address matches your server's DNS name.
;; ANSWER SECTION: archivebox.example.com. 3600 IN A 192.0.2.123
4. Set up a Caddy Reverse Proxy
Install Caddy.
# apt install -y debian-keyring debian-archive-keyring apt-transport-https # curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo apt-key add - # curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list # apt update # apt install caddy
Edit Caddy's configuration file.
# nano /etc/caddy/Caddyfile
Replace the contents with the lines below, and substitute your server's domain name.
archivebox.example.com reverse_proxy localhost:8000
Reload the configuration.
# caddy reload --config /etc/caddy/Caddyfile
Navigate to your new site by name to verify it works. For example:
https://archivebox.example.com
More Information
See these links for more information.
Want to contribute?
You could earn up to $600 by adding new articles
Recommend
-
44
Debug deeper with HTTP View Intercept HTTP(S) with one click, explore & examine traffic up close, and discover exactly what your code is sending. HTTP View
-
49
README.md
-
48
ArchiveBox The open-source self-hosted web archive. :arrow_forward:
-
16
One Click Deployment for android developers
-
25
ArchiveBoxOpen-source self-hosted web archiving. Qui...
-
13
ArchiveBox - 自托管网站存档服务 - azhuge233's开源自托管的网站存档服务,自动对输入的 URL 进行信息爬取,将其中的 HTML、媒体文件、JS、PDF 文件等归档,方便离线查看 以下引用官网的 Background & Motivation The aim of Ar...
-
3
Removing duplicated One-Click Install files Overview There are several different ways to install WordPress. For example: Downloading the files directly from
-
4
Install and use ArchiveBox self-hosted internet archivingArchiveBox is a self-hosted and powerful internet archiving solution written in Python. It enables one to collect, save and view sites you want to save offline. Archive...
-
3
<?xml encoding="utf-8" ??>Introduction The Vultr One-Click Docker application is a Docker CE host that's ready to run in about a minute. Vul...
-
7
Using a Different System? Let...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK