[GH-ISSUE #1262] Can't get ArchiveBox running with Pihole #2286

Closed
opened 2026-03-01 17:57:55 +03:00 by kerem · 4 comments
Owner

Originally created by @firyx on GitHub (Nov 3, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1262

Describe the bug

  • Running ArchiveBox with a default docker-compose.yml is ok (a link is archived).
  • Running ArchiveBox with Pihole => get DNS error.

Steps to reproduce

  1. Download docker-compose.yml file
  2. In docker-compose.yml uncomment
    • services.archivebox.dns
    • services.pihole...
  3. Run docker compose run archivebox init --setup
  4. Run docker compose up -d
  5. Try to archive a link => DNS errors

Running shell inside archivebox container I can wget the pihole/admin page => so the archivebox container should see the Pihole container.

Screenshots or log output

Snippet from ArchiveBox logs:

      > headers
        Extractor failed:
            ConnectionError HTTPSConnectionPool(host='learn.microsoft.com', port=443): Max retries exceeded with url: /en-us/archive/msdn-magazine/... (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fcb01375290>: Failed to resolve 'learn.microsoft.com' ([Errno -3] Temporary failure in name resolution)"))

Pihole log:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service cron: starting
s6-rc: info: service cron successfully started
s6-rc: info: service _uid-gid-changer: starting
s6-rc: info: service _uid-gid-changer successfully started
s6-rc: info: service _startup: starting
  [i] Starting docker specific checks & setup for docker pihole/pihole
  [i] Setting capabilities on pihole-FTL where possible
  [i] Applying the following caps to pihole-FTL:
        * CAP_CHOWN
        * CAP_NET_BIND_SERVICE
        * CAP_NET_RAW
  [i] Ensuring basic configuration by re-running select functions from basic-install.sh

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf

  [✓] Installing latest logrotate script
  [i] Creating empty /etc/pihole/setupVars.conf file.
  [i] Assigning password defined by Environment Variable
  [✓] New password set
  [i] Added ENV to php:
                    "TZ" => "",
                    "PIHOLE_DOCKER_TAG" => "",
                    "PHP_ERROR_LOG" => "/var/log/lighttpd/error-pihole.log",
                    "CORS_HOSTS" => "",
                    "VIRTUAL_HOST" => "f231f43a461f",
  [i] Using IPv4 and IPv6

  [✓] Installing latest Cron script
  [i] setup_blocklists now setting default blocklists up: 
  [i] TIP: Use a docker volume for /etc/pihole/adlists.list if you want to customize for first boot
  [i] Blocklists (/etc/pihole/adlists.list) now set to:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [i] Configuring default DNS servers: 8.8.8.8, 8.8.4.4
  [i] Applying pihole-FTL.conf setting LOCAL_IPV4=0.0.0.0
  [i] FTL binding to default interface: eth0
  [i] Enabling Query Logging
  [i] Testing lighttpd config: Syntax OK
  [i] All config checks passed, cleared for startup ...
  [i] Docker start setup complete

  [i] pihole-FTL (no-daemon) will be started as pihole

s6-rc: info: service _startup successfully started
s6-rc: info: service pihole-FTL: starting
s6-rc: info: service pihole-FTL successfully started
s6-rc: info: service lighttpd: starting
s6-rc: info: service lighttpd successfully started
s6-rc: info: service _postFTL: starting
s6-rc: info: service _postFTL successfully started
s6-rc: info: service legacy-services: starting
  Checking if custom gravity.db is set in /etc/pihole/pihole-FTL.conf
s6-rc: info: service legacy-services successfully started
  [i] Creating new gravity database
  [i] Migrating content of /etc/pihole/adlists.list into new database
  [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [✓] Preparing new gravity database
  [✓] Creating new gravity databases
  [i] Using libz compression

  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [✓] Status: Retrieval successful
  [✓] Parsed 150827 exact domains and 0 ABP-style domains (ignored 1 non-domain entries)
      Sample of non-domain entries:
        - "0.0.0.0"


  [✓] Building tree
  [✓] Swapping databases
  [✓] The old database remains available
  [i] Number of gravity domains: 150827 (150827 unique domains)
  [i] Number of exact blacklisted domains: 0
  [i] Number of regex blacklist filters: 0
  [i] Number of exact whitelisted domains: 0
  [i] Number of regex whitelist filters: 0
  [✓] Cleaning up stray matter

  [✓] FTL is listening on port 53
     [✓] UDP (IPv4)
     [✓] TCP (IPv4)
     [✓] UDP (IPv6)
     [✓] TCP (IPv6)

  [i] Pi-hole blocking will be enabled
  [i] Enabling blocking
  [✓] Pi-hole Enabled

  Pi-hole version is v5.17.2 (Latest: v5.17.2)
  web version is v5.20.2 (Latest: v5.20.2)
  FTL version is v5.23 (Latest: v5.23)
  Container tag is: 2023.10.0

ArchiveBox version

find: ‘/root/.config/chromium/Crash Reports/pending/’: No such file or directory
0.6.3
ArchiveBox v0.6.3 a61f544 Cpython Linux Linux-6.1.0-13-amd64-x86_64-with-glibc2.31 x86_64
DEBUG=False IN_DOCKER=True IS_TTY=False TZ=UTC FS_ATOMIC=True FS_REMOTE=True FS_PERMS=644 0:0 SEARCH_BACKEND=ripgrep

[i] Dependency versions:
 √  PYTHON_BINARY         v3.11.6         valid     /usr/local/bin/python3.11                                                   
 √  SQLITE_BINARY         v2.6.0          valid     /usr/local/lib/python3.11/sqlite3/dbapi2.py                                 
 √  DJANGO_BINARY         v3.1.14         valid     /usr/local/lib/python3.11/site-packages/django/__init__.py                  
 √  ARCHIVEBOX_BINARY     v0.6.3          valid     /usr/local/bin/archivebox                                                   

 √  CURL_BINARY           v7.74.0         valid     /usr/bin/curl                                                               
 √  WGET_BINARY           v1.21           valid     /usr/bin/wget                                                               
 √  NODE_BINARY           v18.17.1        valid     /usr/bin/node                                                               
 √  SINGLEFILE_BINARY     v1.0.63         valid     /node/node_modules/single-file-cli/single-file                              
 √  READABILITY_BINARY    v0.0.2          valid     /node/node_modules/readability-extractor/readability-extractor              
 √  MERCURY_BINARY        v1.0.0          valid     /node/node_modules/@postlight/mercury-parser/cli.js                         
 √  GIT_BINARY            v2.30.2         valid     /usr/bin/git                                                                
 √  YOUTUBEDL_BINARY      v2023.10.13     valid     /usr/local/bin/yt-dlp                                                       
 √  CHROME_BINARY         v118.0.5993.70  valid     /usr/bin/chromium                                                           
 √  RIPGREP_BINARY        v12.1.1         valid     /usr/bin/rg                                                                 

[i] Source-code locations:
 √  PACKAGE_DIR           23 files        valid     /app/archivebox                                                             
 √  TEMPLATES_DIR         3 files         valid     /app/archivebox/templates                                                   
 -  CUSTOM_TEMPLATES_DIR  -               disabled                                                                              

[i] Secrets locations:
 -  CHROME_USER_DATA_DIR  -               disabled                                                                              
 -  COOKIES_FILE          -               disabled                                                                              

[i] Data locations:
 √  OUTPUT_DIR            5 files @       valid     /data                                                                       
 √  SOURCES_DIR           3 files         valid     ./sources                                                                   
 √  LOGS_DIR              1 files         valid     ./logs                                                                      
 √  ARCHIVE_DIR           3 files         valid     ./archive                                                                   
 √  CONFIG_FILE           81.0 Bytes      valid     ./ArchiveBox.conf                                                           
 √  SQL_INDEX             232.0 KB        valid     ./index.sqlite3 

Question

  • Are there some Pihole configuration settings missing in the docker-compose.yml?
Originally created by @firyx on GitHub (Nov 3, 2023). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1262 #### Describe the bug * Running ArchiveBox with a default docker-compose.yml is ok (a link is archived). * Running ArchiveBox with Pihole => get DNS error. #### Steps to reproduce 1. Download `docker-compose.yml` file 2. In `docker-compose.yml` uncomment * `services.archivebox.dns` * `services.pihole...` 3. Run `docker compose run archivebox init --setup` 4. Run `docker compose up -d` 5. Try to archive a link => DNS errors Running shell inside archivebox container I can wget the `pihole/admin` page => so the archivebox container should see the Pihole container. #### Screenshots or log output Snippet from ArchiveBox logs: ```logs > headers Extractor failed: ConnectionError HTTPSConnectionPool(host='learn.microsoft.com', port=443): Max retries exceeded with url: /en-us/archive/msdn-magazine/... (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fcb01375290>: Failed to resolve 'learn.microsoft.com' ([Errno -3] Temporary failure in name resolution)")) ``` Pihole log: ```logs s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service cron: starting s6-rc: info: service cron successfully started s6-rc: info: service _uid-gid-changer: starting s6-rc: info: service _uid-gid-changer successfully started s6-rc: info: service _startup: starting [i] Starting docker specific checks & setup for docker pihole/pihole [i] Setting capabilities on pihole-FTL where possible [i] Applying the following caps to pihole-FTL: * CAP_CHOWN * CAP_NET_BIND_SERVICE * CAP_NET_RAW [i] Ensuring basic configuration by re-running select functions from basic-install.sh [i] Installing configs from /etc/.pihole... [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone! [✓] Installed /etc/dnsmasq.d/01-pihole.conf [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf [✓] Installing latest logrotate script [i] Creating empty /etc/pihole/setupVars.conf file. [i] Assigning password defined by Environment Variable [✓] New password set [i] Added ENV to php: "TZ" => "", "PIHOLE_DOCKER_TAG" => "", "PHP_ERROR_LOG" => "/var/log/lighttpd/error-pihole.log", "CORS_HOSTS" => "", "VIRTUAL_HOST" => "f231f43a461f", [i] Using IPv4 and IPv6 [✓] Installing latest Cron script [i] setup_blocklists now setting default blocklists up: [i] TIP: Use a docker volume for /etc/pihole/adlists.list if you want to customize for first boot [i] Blocklists (/etc/pihole/adlists.list) now set to: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts [i] Configuring default DNS servers: 8.8.8.8, 8.8.4.4 [i] Applying pihole-FTL.conf setting LOCAL_IPV4=0.0.0.0 [i] FTL binding to default interface: eth0 [i] Enabling Query Logging [i] Testing lighttpd config: Syntax OK [i] All config checks passed, cleared for startup ... [i] Docker start setup complete [i] pihole-FTL (no-daemon) will be started as pihole s6-rc: info: service _startup successfully started s6-rc: info: service pihole-FTL: starting s6-rc: info: service pihole-FTL successfully started s6-rc: info: service lighttpd: starting s6-rc: info: service lighttpd successfully started s6-rc: info: service _postFTL: starting s6-rc: info: service _postFTL successfully started s6-rc: info: service legacy-services: starting Checking if custom gravity.db is set in /etc/pihole/pihole-FTL.conf s6-rc: info: service legacy-services successfully started [i] Creating new gravity database [i] Migrating content of /etc/pihole/adlists.list into new database [i] Neutrino emissions detected... [✓] Pulling blocklist source list into range [✓] Preparing new gravity database [✓] Creating new gravity databases [i] Using libz compression [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts [✓] Status: Retrieval successful [✓] Parsed 150827 exact domains and 0 ABP-style domains (ignored 1 non-domain entries) Sample of non-domain entries: - "0.0.0.0" [✓] Building tree [✓] Swapping databases [✓] The old database remains available [i] Number of gravity domains: 150827 (150827 unique domains) [i] Number of exact blacklisted domains: 0 [i] Number of regex blacklist filters: 0 [i] Number of exact whitelisted domains: 0 [i] Number of regex whitelist filters: 0 [✓] Cleaning up stray matter [✓] FTL is listening on port 53 [✓] UDP (IPv4) [✓] TCP (IPv4) [✓] UDP (IPv6) [✓] TCP (IPv6) [i] Pi-hole blocking will be enabled [i] Enabling blocking [✓] Pi-hole Enabled Pi-hole version is v5.17.2 (Latest: v5.17.2) web version is v5.20.2 (Latest: v5.20.2) FTL version is v5.23 (Latest: v5.23) Container tag is: 2023.10.0 ``` #### ArchiveBox version ```logs find: ‘/root/.config/chromium/Crash Reports/pending/’: No such file or directory 0.6.3 ArchiveBox v0.6.3 a61f544 Cpython Linux Linux-6.1.0-13-amd64-x86_64-with-glibc2.31 x86_64 DEBUG=False IN_DOCKER=True IS_TTY=False TZ=UTC FS_ATOMIC=True FS_REMOTE=True FS_PERMS=644 0:0 SEARCH_BACKEND=ripgrep [i] Dependency versions: √ PYTHON_BINARY v3.11.6 valid /usr/local/bin/python3.11 √ SQLITE_BINARY v2.6.0 valid /usr/local/lib/python3.11/sqlite3/dbapi2.py √ DJANGO_BINARY v3.1.14 valid /usr/local/lib/python3.11/site-packages/django/__init__.py √ ARCHIVEBOX_BINARY v0.6.3 valid /usr/local/bin/archivebox √ CURL_BINARY v7.74.0 valid /usr/bin/curl √ WGET_BINARY v1.21 valid /usr/bin/wget √ NODE_BINARY v18.17.1 valid /usr/bin/node √ SINGLEFILE_BINARY v1.0.63 valid /node/node_modules/single-file-cli/single-file √ READABILITY_BINARY v0.0.2 valid /node/node_modules/readability-extractor/readability-extractor √ MERCURY_BINARY v1.0.0 valid /node/node_modules/@postlight/mercury-parser/cli.js √ GIT_BINARY v2.30.2 valid /usr/bin/git √ YOUTUBEDL_BINARY v2023.10.13 valid /usr/local/bin/yt-dlp √ CHROME_BINARY v118.0.5993.70 valid /usr/bin/chromium √ RIPGREP_BINARY v12.1.1 valid /usr/bin/rg [i] Source-code locations: √ PACKAGE_DIR 23 files valid /app/archivebox √ TEMPLATES_DIR 3 files valid /app/archivebox/templates - CUSTOM_TEMPLATES_DIR - disabled [i] Secrets locations: - CHROME_USER_DATA_DIR - disabled - COOKIES_FILE - disabled [i] Data locations: √ OUTPUT_DIR 5 files @ valid /data √ SOURCES_DIR 3 files valid ./sources √ LOGS_DIR 1 files valid ./logs √ ARCHIVE_DIR 3 files valid ./archive √ CONFIG_FILE 81.0 Bytes valid ./ArchiveBox.conf √ SQL_INDEX 232.0 KB valid ./index.sqlite3 ``` <!-- Tickets without full version info will closed until it is provided, we need the full output here to help you solve your issue --> #### Question * Are there some Pihole configuration settings missing in the `docker-compose.yml`?
kerem closed this issue 2026-03-01 17:57:55 +03:00
Author
Owner

@pirate commented on GitHub (Nov 3, 2023):

If you log into the pihole admin dashboard, can you verify that it's allowing connections from "all networks" / "all interfaces"?

image

Pihole in docker is bad at detecting that requests coming from the Docker subnet are local.

I also recommend trying the latest 0.7.0 docker image, there are lots of improvements and fixes.

<!-- gh-comment-id:1793028613 --> @pirate commented on GitHub (Nov 3, 2023): If you log into the pihole admin dashboard, can you verify that it's allowing connections from "all networks" / "all interfaces"? ![image](https://github.com/ArchiveBox/ArchiveBox/assets/511499/8eab8c56-269e-4a73-9a98-2a88009bcd6e) Pihole in docker is bad at detecting that requests coming from the Docker subnet are local. I also recommend trying the latest 0.7.0 docker image, there are lots of improvements and fixes.
Author
Owner

@firyx commented on GitHub (Nov 3, 2023):

So, I have pulled latest archivebox/archivebox:dev image:

# archivebox version
0.7.0
ArchiveBox v0.7.0 Cpython Linux Linux-6.1.0-13-amd64-x86_64-with-glibc2.36 x86_64
DEBUG=False IN_DOCKER=True IN_QEMU=False IS_TTY=True TZ=UTC FS_ATOMIC=True FS_REMOTE=True FS_USER=0:0 FS_PERMS=644 SEARCH_BACKEND=ripgrep

[i] Dependency versions:
 √  PYTHON_BINARY         v3.11.6         valid     /usr/local/bin/python3.11                                                   
 √  SQLITE_BINARY         v2.6.0          valid     /usr/local/lib/python3.11/sqlite3/dbapi2.py                                 
 √  DJANGO_BINARY         v3.1.14         valid     /usr/local/lib/python3.11/site-packages/django/__init__.py                  
 √  ARCHIVEBOX_BINARY     v0.7.0          valid     /usr/local/bin/archivebox                                                   

 √  CURL_BINARY           v8.4.0          valid     /usr/bin/curl                                                               
 √  WGET_BINARY           v1.21.3         valid     /usr/bin/wget                                                               
 √  NODE_BINARY           v21.1.0         valid     /usr/bin/node                                                               
 √  SINGLEFILE_BINARY     v1.1.18         valid     /app/node_modules/single-file-cli/single-file                               
 √  READABILITY_BINARY    v0.0.9          valid     /app/node_modules/readability-extractor/readability-extractor               
 √  MERCURY_BINARY        v1.0.0          valid     /app/node_modules/@postlight/parser/cli.js                                  
 √  GIT_BINARY            v2.39.2         valid     /usr/bin/git                                                                
 √  YOUTUBEDL_BINARY      v2023.10.13     valid     /usr/local/bin/yt-dlp                                                       
 √  CHROME_BINARY         v119.0.6045.9   valid     /usr/bin/chromium-browser                                                   
 √  RIPGREP_BINARY        v13.0.0         valid     /usr/bin/rg                                                                 

[i] Source-code locations:
 √  PACKAGE_DIR           24 files        valid     /app/archivebox                                                             
 √  TEMPLATES_DIR         4 files         valid     /app/archivebox/templates                                                   
 -  CUSTOM_TEMPLATES_DIR  -               disabled  None                                                                        

[i] Secrets locations:
 -  CHROME_USER_DATA_DIR  -               disabled  None                                                                        
 -  COOKIES_FILE          -               disabled  None                                                                        

[i] Data locations:
 √  OUTPUT_DIR            5 files @       valid     /data                                                                       
 √  SOURCES_DIR           0 files         valid     ./sources                                                                   
 √  LOGS_DIR              1 files         valid     ./logs                                                                      
 √  ARCHIVE_DIR           0 files         valid     ./archive                                                                   
 √  CONFIG_FILE           81.0 Bytes      valid     ./ArchiveBox.conf                                                           
 √  SQL_INDEX             204.0 KB        valid     ./index.sqlite3  

Deleted all persistent folders (data, etc) to start fresh.

Set Pihole to Permit all origins (Pihole seems to have a newer UI than your screenshot above, it looks like this: https://docs.pi-hole.net/ftldns/interfaces/).

But when I do wget from archivebox container the domain is still not resolved:

# wget https://aaa.com
--2023-11-03 21:49:40--  https://aaa.com/
Resolving aaa.com (aaa.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘aaa.com’
<!-- gh-comment-id:1793147567 --> @firyx commented on GitHub (Nov 3, 2023): So, I have pulled latest `archivebox/archivebox:dev` image: ```logs # archivebox version 0.7.0 ArchiveBox v0.7.0 Cpython Linux Linux-6.1.0-13-amd64-x86_64-with-glibc2.36 x86_64 DEBUG=False IN_DOCKER=True IN_QEMU=False IS_TTY=True TZ=UTC FS_ATOMIC=True FS_REMOTE=True FS_USER=0:0 FS_PERMS=644 SEARCH_BACKEND=ripgrep [i] Dependency versions: √ PYTHON_BINARY v3.11.6 valid /usr/local/bin/python3.11 √ SQLITE_BINARY v2.6.0 valid /usr/local/lib/python3.11/sqlite3/dbapi2.py √ DJANGO_BINARY v3.1.14 valid /usr/local/lib/python3.11/site-packages/django/__init__.py √ ARCHIVEBOX_BINARY v0.7.0 valid /usr/local/bin/archivebox √ CURL_BINARY v8.4.0 valid /usr/bin/curl √ WGET_BINARY v1.21.3 valid /usr/bin/wget √ NODE_BINARY v21.1.0 valid /usr/bin/node √ SINGLEFILE_BINARY v1.1.18 valid /app/node_modules/single-file-cli/single-file √ READABILITY_BINARY v0.0.9 valid /app/node_modules/readability-extractor/readability-extractor √ MERCURY_BINARY v1.0.0 valid /app/node_modules/@postlight/parser/cli.js √ GIT_BINARY v2.39.2 valid /usr/bin/git √ YOUTUBEDL_BINARY v2023.10.13 valid /usr/local/bin/yt-dlp √ CHROME_BINARY v119.0.6045.9 valid /usr/bin/chromium-browser √ RIPGREP_BINARY v13.0.0 valid /usr/bin/rg [i] Source-code locations: √ PACKAGE_DIR 24 files valid /app/archivebox √ TEMPLATES_DIR 4 files valid /app/archivebox/templates - CUSTOM_TEMPLATES_DIR - disabled None [i] Secrets locations: - CHROME_USER_DATA_DIR - disabled None - COOKIES_FILE - disabled None [i] Data locations: √ OUTPUT_DIR 5 files @ valid /data √ SOURCES_DIR 0 files valid ./sources √ LOGS_DIR 1 files valid ./logs √ ARCHIVE_DIR 0 files valid ./archive √ CONFIG_FILE 81.0 Bytes valid ./ArchiveBox.conf √ SQL_INDEX 204.0 KB valid ./index.sqlite3 ``` Deleted all persistent folders (`data`, `etc`) to start fresh. Set Pihole to `Permit all origins` (Pihole seems to have a newer UI than your screenshot above, it looks like this: https://docs.pi-hole.net/ftldns/interfaces/). But when I do wget from archivebox container the domain is still not resolved: ```logs # wget https://aaa.com --2023-11-03 21:49:40-- https://aaa.com/ Resolving aaa.com (aaa.com)... failed: Temporary failure in name resolution. wget: unable to resolve host address ‘aaa.com’ ```
Author
Owner

@pirate commented on GitHub (Nov 3, 2023):

Hmm strange, maybe docker DNS requires a static IP, can you try this:

docker-compose.yml:


services:

  archivebox:
    ...
    depends_on:
      - pihole
    dns:
      - 172.20.0.53
        
  pihole:
    ...
    environment:
      ...
      - DNSMASQ_LISTENING=all
    networks:
      archiveboxnet:
        ipv4_address: 172.20.0.53
        
networks:
  archiveboxnet:
    ipam:
      config:
        - subnet: 172.20.0.0/24
<!-- gh-comment-id:1793197794 --> @pirate commented on GitHub (Nov 3, 2023): Hmm strange, maybe docker DNS requires a static IP, can you try this: `docker-compose.yml`: ```yaml services: archivebox: ... depends_on: - pihole dns: - 172.20.0.53 pihole: ... environment: ... - DNSMASQ_LISTENING=all networks: archiveboxnet: ipv4_address: 172.20.0.53 networks: archiveboxnet: ipam: config: - subnet: 172.20.0.0/24 ```
Author
Owner

@firyx commented on GitHub (Nov 6, 2023):

Ok, thanks, made it finally working, needed to add the network also to archivebox service.

For the record, working docker-compose.yml looks this way:

version: '3.9'

services:
  archivebox:
    image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
    command: server --quick-init 0.0.0.0:8000
    ports:
    - 127.0.0.1:8000:8000
    volumes:
    - ./data:/data
    depends_on:
    - pihole
    dns:                                           # uncomment this and pihole container below for ad-blocking during archiving
    - 172.20.0.53
    networks:
      archiveboxnet:
        ipv4_address: 172.20.0.6
    environment:
    - ALLOWED_HOSTS=*                   # restrict this to only accept incoming traffic via specific domain name

  ### Example: To run pihole in order to block ad/tracker requests during archiving,
  # uncomment this block and set up pihole using its admin interface

  pihole:
    image: pihole/pihole:latest
    ports:
    - 127.0.0.1:8090:80       # uncomment to access the admin HTTP interface on http://localhost:8090
    - 127.0.0.1:53:53/tcp
    - 127.0.0.1:53:53/udp
    environment:
    - WEBPASSWORD=...
    - DNSMASQ_LISTENING=all
    volumes:
    - ./etc/pihole:/etc/pihole
    - ./etc/dnsmasq:/etc/dnsmasq.d
    dns:
    - 127.0.0.1
    - 1.1.1.1
    - 1.0.0.1
    networks:
      archiveboxnet:
        ipv4_address: 172.20.0.53

networks:
  archiveboxnet:
    ipam:
      driver: default
      config:
        - subnet: 172.20.0.0/24
<!-- gh-comment-id:1794968162 --> @firyx commented on GitHub (Nov 6, 2023): Ok, thanks, made it finally working, needed to add the network also to archivebox service. For the record, working `docker-compose.yml` looks this way: ```yaml version: '3.9' services: archivebox: image: ${DOCKER_IMAGE:-archivebox/archivebox:dev} command: server --quick-init 0.0.0.0:8000 ports: - 127.0.0.1:8000:8000 volumes: - ./data:/data depends_on: - pihole dns: # uncomment this and pihole container below for ad-blocking during archiving - 172.20.0.53 networks: archiveboxnet: ipv4_address: 172.20.0.6 environment: - ALLOWED_HOSTS=* # restrict this to only accept incoming traffic via specific domain name ### Example: To run pihole in order to block ad/tracker requests during archiving, # uncomment this block and set up pihole using its admin interface pihole: image: pihole/pihole:latest ports: - 127.0.0.1:8090:80 # uncomment to access the admin HTTP interface on http://localhost:8090 - 127.0.0.1:53:53/tcp - 127.0.0.1:53:53/udp environment: - WEBPASSWORD=... - DNSMASQ_LISTENING=all volumes: - ./etc/pihole:/etc/pihole - ./etc/dnsmasq:/etc/dnsmasq.d dns: - 127.0.0.1 - 1.1.1.1 - 1.0.0.1 networks: archiveboxnet: ipv4_address: 172.20.0.53 networks: archiveboxnet: ipam: driver: default config: - subnet: 172.20.0.0/24 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2286
No description provided.