First, some important disclaimers:
S-City Tech DOES NOT own or hold copyright, in whole or in part, in the Pi-Hole project or Raspbian operating system, or components thereof.
S-City Tech only owns and holds copyright in it’s own blocklist (found here), which they maintain as an OPTIONAL ADDON to the Pi-Hole software.
S-City Tech IS NOT affiliated with the Raspberry Pi Foundation or Pi-hole LLC in any way.
Raspberry Pi, and the logo thereof, are trademarks of the Raspberry Pi Foundation. Pi-hole, and the logo thereof, are trademarks of Pi-hole LLC.
Note: Do you want to build your own? Find out how
These are instructions for basic setup when you get your Pi-Hole ad blocker from us
Add your WiFi details
NOTE: You don’t need to do this if you sent us your WiFi details
You’ll need a computer or laptop with an SD card reader for this!
- Remove the top layers of the Pi’s case until you can remove the SD card
- Connect your SD card to your computer
- Your SD card (or part of it, if you’re on Linux) should show up as ‘BOOT’
- Open up your SD card, and look for files like bcm2708-rpi-zero-w.dtb, which will verify that your using the right disk
- Enter your details below and copy the output
NOTE: Only YOU can see this information – it’s not sent to us. You can also copy the output without updating it, and replace the text between the quote marks [ “” ] with your WiFi details from inside a text editor, if you wish. Remember to leave the quote marks, though!
Generate a WiFi config fileUpdate the Text
- Paste the output into a text file and save it to your SD card, with the name “wpa_supplicant.conf”
- That’s it! Eject your SD card, pop it back in your Pi and re-assemble the case!
Setup your Pi
When you first boot your Pi, you should first do some maintenance and optional security changes:
WARNING! First boot process can take up to 2 minutes, DO NOT turn off your Pi during this time as you’ll corrupt the data on the SD card – trust us, we found out the hard way!
- Plug in and turn on your Pi, and, on another computer, smartphone or tablet, use an app like PuTTY (no affiliation) to connect to SSH. Hint: you don’t need to know the IP address yet! Use ‘raspberrypi.local’ as the IP address for now. If asked for a port, enter 22.
- Next, update your Raspberry Pi with the following command:
$ sudo apt update && sudo apt upgrade, you’ll be asked to confirm this action by typing ‘y’.
- Next, type in
$ sudo raspi-config, and use arrow keys to navigate around (we’re unfortunately not sure how to do this on mobile yet – we’ll do some research and update this page).
- Navigate to ‘Change User Password’, type a new password and press Enter to confirm it
- Navigate to Network -> Hostname and type something new – we used ‘pihole’, then press Enter to confirm it
- Navigate to Advanced Options -> Memory Split and type 16, then press Enter to confirm it. This is because your Pi has no GUI so doesn’t need video memory – it’ll help a tiny little bit with speed
- You’ll need to reboot your Pi now to apply the changes – press the right arrow twice and press Enter to confirm – then press Enter again to confirm a reboot
If you’re an advanced user, you can make some more customisations here before you install and start the ad-blocker server.
Installing the Ad Blocker
Next, you’ll need to reconnect and download the ad-blocking software. Here are instructions for how to do that:
- Give it about 30 seconds then reconnect the same way as above
$ sudo curl -sSL https://install.pi-hole.net | bashto begin the installation
- When asked to “choose an interface”, choose wlan0, which is the name for the WiFi connection
- When asked to choose an “Upstream DNS provider”, we recommend Google, as it’s the most reliable and quickest to update with new sites or changes to sites – but you can use any that you want
- Next, it’ll ask you to choose lists, all of them selected is the most secure option, but if you don’t want to use any for any reason, navigate to them and press Enter, the asterisk (*) should disappear. When you’ve made your selection, press the right arrow and press Enter to confirm
- Next, you’ll need to fix your Pi’s IP address, otherwise Pi-Hole won’t work properly – take note of the IP address that’s listed – you’ll need it to use your new ad blocker
- You can safely ignore the FYI – your Pi will be on most of the time anyway so the IP is unlikely to be reassigned – during the over 30 days of testing we did, we didn’t run into any IP conflict while using a £16 Tp-link router with only very basic features – nevertheless advanced users can create a DHCP address reservation for their Pi if they’d like, to prevent anything except the Pi receiving the IP address – but we won’t detail that here as it’s a complex procedure that’s different for every router
- When asked if you’d like to install the web interface, you absolutely should – essential settings and more are managed by this interface, the option to skip installing the web interface is intended for developers who want to use their own interface
- Next, you’ll be asked to choose a privacy mode for the logs and statistics – this is purely the preference of individual users
- You don’t need to remember the randomly generated password – press Enter to close the dialog and type
$ sudo pihole -p, so that you can set a password that’s much easier to remember
Now, you can close your SSH connection with
$ logout, login to your Pi-Hole via a web browser by entering it’s IP address that you copied earlier into the address bar, followed by ‘/admin’ – for example ‘192.168.0.22/admin’ was ours.
Configuring the network
This is the tricky part – and just to make it worse it’s unique to every router. The below process is for a Tp-Link router, but it should be similar for other router designs:
NOTE: It may be helpful to search Google for your router’s landing page, login details and DNS settings then use those in place of the following instructions, which are Tp-Link centric.
To see your router’s landing or login page, you should navigate to 192.168.0.1 or 192.168.1.1, depending on your router. Most routers use the username “admin” and then either “admin” or “password” for the password, as default – of course, if you’ve changed it you’ll need to use your own details.
From there, you should be able to choose “DHCP > Settings” and then edit “DNS Server” or “Primary DNS Server” to match the IP address of your Pi:
If you have a second DNS option, as above, you should NOT set it! If you do, when your Pi reports that a website is blocked, your network will ask the secondary server instead – rendering the Pi essentially useless. From there, hit “Save” and close the tab – the router will probably reboot.
That’s it! Your Pi should now work network-wide, and you shouldn’t see any ads on any devices on your network.
But wait! Did you know you can make your own?
To begin, you’ll need your own Raspberry Pi, case, power supply, SD card, separate computer and so on.
- First, download Raspbian Lite (without a desktop) from here
- Flash the ISO file to your SD card from a program like Belena Etcher from here (not affiliated), which we recommend as it protects large drives like hard drives and SSDs from being flashed accidentally
- Create a text file in a text editor like Notepad called “wpa_supplicant.conf” and paste the output from here into it, saving it into the SD card
- Create another file in a similar way called “ssh” and save it to the SD card one again, but make sure to leave it empty!
- Eject the SD card and put it in your Pi
- Assemble your Pi’s case & connect it
- Follow the First Boot process above
Our optional add-on:
We’ve made our own blocklist, that anyone (yes, anyone!) can contribute to. If you’d like to add a website to this blocklist, simply enter it in the box below, and we’ll review it. If the URL meets either of the following criteria, we’ll add it for everyone to use:
- A provably-dangerous website, e.g. phishing or virus hosts
- A website that hosts ads for other sites
How to add the list to your PiHole:
- Login to your PiHole in a browser, via it’s IP address
- Navigate to the settings page and choose the blocklists tab
- Enter ‘https://s-city.tech/blocklist’ in the textbox
- Press Save & Update to finish!