# Usage # # mkdir -p ~/archivebox/data && cd ~/archivebox # curl -fsSL 'https://docker-compose.archivebox.io' > docker-compose.yml # docker compose up -d # Open /admin/ on the hostname or IP used to reach ArchiveBox e.g: http://admin.archivebox.localhost:5797/ # # docker compose exec archivebox archivebox add --depth=1 'https://news.ycombinator.com' # docker compose exec -T archivebox archivebox add < ~/Downloads/bookmarks.txt # docker compose exec archivebox archivebox help # # More Info: https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose services: archivebox: image: ${ARCHIVEBOX_IMAGE:-archivebox/archivebox:latest} restart: unless-stopped ports: - "${ARCHIVEBOX_PORT:-5797}:5797" volumes: - ./data:/data # Required: main data directory must be on a fast local SSD # - /mnt/archivebox/data/archive:/data/archive # Optional: store the bulky data/archive content on a slower HDD or remote network store - tmp:/tmp/archivebox # lets one-off `docker compose run` commands reuse main server's runners environment: # - ADMIN_USERNAME=admin # optional admin user to create on first run, skips first-time setup admin creation UI # - ADMIN_PASSWORD=SomeSecretPassword - BASE_URL # canonical URL users will access this server at, can be set up via first-run wizard in the UI as well - SERVER_SECURITY_MODE # defaults to "auto", can be set up via first-run wizard in the UI as well - PUBLIC_ADD_VIEW=False # set to True to allow anonymous users to submit new URLs to archive - ARCHIVEDOTORG_ENABLED=True # set to False if you dont want to send URLs to Archive.org - PUID # optional numeric UID for NFS/CIFS/FUSE mounts (defaults to collection owner or 911) - PGID # optional numeric GID for NFS/CIFS/FUSE mounts (defaults to collection group or 911) # For all other options, it's better to use data/ArchiveBox.conf or the new Personas config feature in the admin UI... # - TIMEOUT=60 # - CHECK_SSL_VALIDITY=False # settings here data/ArchiveBox.conf to be able to edit it in the UI # - USER_AGENT="..." # ... move any settings like these into # ... # For more info, see: https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#configuration shm_size: 1gb # chrome runs better when it can use a decently sized shm pool pids_limit: 2048 # avoids low systemd task caps with Chrome and parallel extractors #################################################################################################################### ### No Separate containers are needed for sonic or scheduled archiving, these are all optional addons: ### ### Optional: HTTPS ingress using Cloudflare # https://developers.cloudflare.com/tunnel/reference/run-parameters/ # # cloudflared: # image: cloudflare/cloudflared # command: tunnel --no-autoupdate --loglevel debug --retries 15 --protocol http2 --overwrite-dns --url http://archivebox:5797 --hostname archivebox.io --name archivebox.io # volumes: # ^ (replace archivebox.io with your own domain) # # Download a cert.pem into this folder from https://dash.cloudflare.com/argotunnel # - ./etc/cloudflared:/etc/cloudflared ### Optional: ArchiveBox Bot + ArchiveBox AI Bot: save links and run archiving tasks from Slack, WhatsApp, etc. # https://github.com/ArchiveBox/archivebox-chat-bot # # archivebox-chat-bot: # build: https://github.com/ArchiveBox/archivebox-chat-bot.git#main # restart: unless-stopped # ports: # - "127.0.0.1:5798:5798" # # Open http://localhost:5798, choose a console password, then connect to http://archivebox:5797 with your API key. # volumes: # - ./archivebox-chat-bot:/data # # Optional: set ADMIN_PASSWORD to skip the first-run password setup UI. # # environment: # # ADMIN_PASSWORD: your-console-password ### Optional: container to run xvfb+noVNC so you can watch the ArchiveBox browser screen as it archives things / # remote control it to set up a chrome profile w/ logins for sites you want to archive # # https://github.com/ArchiveBox/ArchiveBox/wiki/Chromium-Install#setting-up-a-chromium-user-profile # https://github.com/ArchiveBox/ArchiveBox/wiki/Chromium-Install#docker-vnc-setup # # novnc: # image: theasp/novnc:latest # environment: # - DISPLAY_WIDTH=1920 # - DISPLAY_HEIGHT=1080 # - RUN_XTERM=no # healthcheck: # test: ["CMD", "xdpyinfo", "-display", ":0"] # interval: 2s # timeout: 2s # retries: 10 # ports: # # to view/control ArchiveBox's browser, visit: http://127.0.0.1:8080/vnc.html # # restricted to access from localhost by default because it has no authentication # - 127.0.0.1:8080:8080 ### Optional: VPN to your home IP to avoid rate limits and captchas # https://tailscale.com/docs/features/containers/docker/how-to/connect-docker-container # tailscale: # image: tailscale/tailscale:latest # cap_add: # - net_admin # - net_raw # environment: # - TS_AUTHKEY= # - TS_STATE_DIR=/var/lib/tailscale # volumes: # - ./tailscale:/var/lib/tailscale # restart: unless-stopped ### Optional: Run ChangeDetection.io to watch for changes to websites, then trigger ArchiveBox to archive them # https://github.com/ArchiveBox/ArchiveBox/wiki/Change-Detection # # changedetection: # image: ghcr.io/dgtlmoon/changedetection.io # volumes: # - ./data-changedetection:/datastore ### Optional: Set up remote network storage for your ./data/archive bulky files (to S3, B2, Google Drive, OneDrive, SFTP, etc.) # Follow the steps here to set up the Docker RClone Plugin https://rclone.org/docker/ # https://github.com/ArchiveBox/ArchiveBox/wiki/Setting-Up-Storage # # $ docker plugin install rclone/docker-volume-rclone:amd64 --grant-all-permissions --alias rclone # $ nano /var/lib/docker-plugins/rclone/config/rclone.conf # [examplegoogledrive] # type = drive # scope = drive # drive_id = 1234567... # root_folder_id = 0Abcd... # token = {"access_token":...} # # volumes: # archive: # driver: rclone # driver_opts: # remote: 'examplegoogledrive:archivebox' # allow_other: 'true' # vfs_cache_mode: full # poll_interval: 0 volumes: # if you run multiple archivebox containers (or run multiple "docker run" commands) tmp: # this lets them share a single orchestrator instead of fighting over which one is the leader