brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: pihole -g rebuilds the DNS blocklist right after you add a list

Network and access
~/tips/tip-pihole-g-update-gravity

pihole -g

Download and apply new or changed blocklists now instead of waiting for the weekly run.

Adding a blocklist URL to Pi-hole does not block anything yet. The domains only arrive when gravity runs, and by default that happens once a week.

Run it by hand after you add or remove a list:

pihole -g

The docs explain what it does: it downloads every subscribed list and merges them into one unique set of domains for Pi-hole to use. You see each list being fetched, with a count of domains, and a warning when one fails.

That output is the useful part. A list that returns an error or zero domains is either down or the URL is wrong, and you would never notice otherwise.

The web interface has the same action under Tools, Update Gravity, if you prefer clicking. In Docker:

docker exec pihole pihole -g

It takes a while with big lists and uses a lot of memory on small hardware like an older Raspberry Pi, so I would not put it in a cron job every hour. The weekly run is enough, and running it by hand after a change covers the rest.

Single domains you allow or deny yourself apply right away. Gravity is only about the subscribed lists.

Further reading: The pihole command

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link