this post was submitted on 02 Sep 2023
73 points (97.4% liked)

Open Source

31359 readers
209 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

I want to use pi-hole and it comes highly recommended to use raspberry pi to cover the house and have an always on capability. I started looking at just starter packages at Amazon and they don't come with a monitor, which it looks like you need. How do I do this? I want a raspberry pi to run pi-hole to protect my house.

Edit: Thank you all so much for the tips and all the different ways to get this up and going , I am officially on my pi-hole journey!

all 27 comments
sorted by: hot top controversial new old
[–] [email protected] 26 points 1 year ago* (last edited 1 year ago)

Raspberry Pi's come with VNC pre-installed and you can pre-set up things like hostname, username, password, WiFi, locale, and SSH using the Raspberry Pi Imager, and then once you boot it for the first time and it has fully started up, you can log in with SSH, use raspi-config and enable VNC, and then you can remotely log in with a PC that has a monitor.

You can do setup entirely without ever needing a monitor as long as you have another PC you can connect to it with on your local network.

[–] [email protected] 13 points 1 year ago* (last edited 1 year ago)

You get a raspberry pi. Then you get a durable SD card. You make the card bootable with the appropriate tool on your PC. While you're on the PC, you can make additional configuration changes in text files to configure wifi network credentials, static IP address and others. WIFI credentials being most important if you don't plan to connect it by ethernet or don't have extra monitors, keyboards, and mouse.

Then you place the SD card to the Pi and boot it up. It automatically connects to the WIFI using the credentials you set in the SD card. If you used an static IP address, use it to ssh into it. Then copy the pihole installation code from the pihole website. And you're done.

If you want to give pihole a try before you get a Raspberry pi, you can install it within other Linux OS, like Linux mint. You can move all the configurations by exporting them later.

https://www.jucktion.com/pihole-adblock-linux-mint

[–] [email protected] 11 points 1 year ago (1 children)

I promise you, the Pi-hole is a great and simplistic tool. Just look at my post history, if I can get this thing running you can too. I can't give you a full detailed post right now, but you need a card to load the files up. I used an SD card loaded with DietPi (they have tutorials on this) and it sets itself up pretty easily once you set up SSH (I use putty, it's also great and easy to set up). As far as the model of Pi goes, most people say you can use whichever you want because its not resource intensive, but I went with a model that has a native Ethernet port, and its been 10/10. Good luck, I can help you out more later if you'd like

[–] [email protected] 2 points 1 year ago (1 children)

Obligatory not the OP, but I'd also be interested in reading up a detailed post if you ever get the chance!

[–] [email protected] 3 points 1 year ago

Still haven't had a chance to sit down and really type this up, but what I did was YouTube search for "pi-hole setup" and watch probably the first 30-40 videos that popped up because if anything can break, it WILL break for me, and I wanted to know my money wasn't going to be wasted. I can tell you from experience that the Pi-hole support team is one of the best you'll find, and they can help you with any problems you might have.

[–] [email protected] 9 points 1 year ago

If you don't already have a raspberry pi, get a pi zero W and put dietpi on it. You configure the wireless settings via text file once you etch the SD card. You don't need a monitor. Personally, I set it up, looked at what DHCP address it had, and told my router to reserve that address. You can ssh into it to install pihole on the headless installation.

[–] [email protected] 8 points 1 year ago (1 children)

Rasperry PIs have micro-HDMI outputs, so you can use those (with an appropriate cable/adapter) to hook the PI to any monitor (or to your TV) for the initial setup (you'll also need a keyboard and - possibly - a mouse). After that, you can unplug everything and use the raspberry pi without keyboard/monitor/mouse (pi hole has a web interface).

Note that you don't strictly need a raspberry pi to run pi hole: any old x86 PC or a cheap thin client bought on ebay will do just as well (actually, they will most probably perform better).

[–] [email protected] 2 points 1 year ago

Only the Pi 4 has micro HDMI outputs. The other ones (except the zero) have regular HDMI.

[–] Potatos_are_not_friends 6 points 1 year ago

When I first started years ago, I just used my TV as the monitor.

Now, I connect directly to my raspberry pi from another computer.

What I'm trying to say is there's lots of ways to do this. And hopefully a raspberry pi is your first step to coding/hacking/taking control of your tech. Godspeed!

[–] [email protected] 6 points 1 year ago

Everyone here has laid out very good instructions on setup.

My method is a little less sophisticated but when I'm setting up new devices, I'll plug them into the only monitor I have, and eventually get them to the point where everything else can be done headless with either ssh or the webUI of whatever application I'm using. After that, it really never needs a monitor again.

[–] [email protected] 5 points 1 year ago (1 children)

A raspberry pi running pihole does not need a monitor. Pihole itself only requires a lan connection (wifi should also work, check pihole docs for that) and only uses the monitor to show your ip address at the start. You can use any monitor with the pi, you don't need a dedicated one

[–] [email protected] 3 points 1 year ago

Works on wifi just fine. That's what I do. I just have mine sitting in a random closet.

[–] [email protected] 4 points 1 year ago

You can use any PC to run pihole. The reason for Raspberry Pi is because it’s a machine you can set and forget, and leave it on for years at a time with very little power usage.

Don’t buy from Amazon, use an official reseller off the Raspberry Pi website. Only get an Amazon one if the price with free shipping is less than an official reseller + shipping; otherwise, you’re getting ripped off. Pi Zero W should be all you need, but if you want a little more power you can use a Pi Zero 2W.

You don’t need a monitor to run a pi. Most people run their pis “headless” without anmonitor, and you can google headless tutorials. However, you can use an adapter to temporarily connect it to a tv or monitor if you wish.

[–] [email protected] 4 points 1 year ago (1 children)

Lots of guides on YouTube to do this: https://youtu.be/KQVQOq0Tpgo?si=sYUEz1CnBPQGQ6Ch

Basically, you need to use SSH to communicate with your Pi. That way you don't need a monitor.

[–] [email protected] 3 points 1 year ago

Here is an alternative Piped link(s): https://piped.video/KQVQOq0Tpgo?si=sYUEz1CnBPQGQ6Ch

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source, check me out at GitHub.

[–] [email protected] 4 points 1 year ago (1 children)

It's not all that hard.

Youll need a pihole and a micro SD card for it. On that micro SD you're going to install the operating system. There is a guide for how to do this on the raspberry pi website. As part of that installation, you can tell the installer to also install an SSH server. That will allow you to connect remotely. You can also have the installer create a user account for you. Do that.

Once you've done that you'll put the SD card into the pihole and plug in the pihole. It should boot from the SD card. Plug the pihole into your router via ether net, this is very important. It guarantees it will get an IP address.

Check your router for the pihole. You should see it. Grab it's ip address, and use whatever SSH client you like. On windows I like mRemoteNG. SSH into your pis IP address using the username and password you made earlier, when you installed the OS. Then, Google pihole. Follow the install directions on the pihole. Once it's set up, set your router to use it for DNS.

That's all!

[–] [email protected] 2 points 1 year ago (1 children)

Plus your PiHole into your router via Ethernet net, this is very important. It guarantees it will get an IP address.

Are you suggesting that Wifi-connected devices don't get IP Addresses?

[–] [email protected] 3 points 1 year ago (1 children)

No, but I can't remember whether the OS installation includes options for setting up a wifi connection. Safest bet is to use ethernet.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Raspberry Pi Imager indeed has options for setting up your WiFi during image creation.

However, you're still correct that Ethernet is best bet, simply because if you mistype your WiFi info... it won't be able to connect.

[–] [email protected] 4 points 1 year ago

Raspberry pi can run pihole easy, but you can install pihole on any linux machine. Just saying because raspberry pi is not that cheap anymore, but it is one of the most power efficient options.

[–] [email protected] 3 points 1 year ago

You don't need it persistently hooked up to a monitor. It can make the setup process easier (though there are ways to set up the initial image to immediately be configurable over the network), but it will run fine after that without one.

What you probably will want is a video cable. The raspberry pi 4b has two micro HDMI ports, so you would most commonly hook it up to a monitor or display with a micro HDMI to HDMI cable. If you want a different model I can double check (I'm not sure if they used different outputs on earlier ones).

[–] Bytemeister 3 points 1 year ago

I'll add here that not only can you setup your pi to block ads, but you can also host your own VPN on it at the same time. So now I can block ads with mine, even when I'm not at home.

[–] [email protected] 2 points 1 year ago (2 children)

Build a proper router with PF sense. I can do everything that pie hole can do, and more, and you get to have fully custom eternally upgradable router software in general that you can use to do things like network scanning and all sorts of other fun stuff.

I briefly used the raspberry pi for that purpose, but honestly I'm much happier having built a full router.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

As this is a sound suggestion, this is probably not suited to this users needs right now and he should start small. I started my home lab by deploying Pihole on in podman on a virtual machine in my VMware environment and even that had a little learning curve for me as a network engineer. If he wants to tackle pfense at some point, then migrating Pihole via gravity sync should be a cake walk.

[–] [email protected] 1 points 1 year ago

Been running pfsense for years, and I definitely recommend it.

[–] [email protected] 2 points 1 year ago

It's been a while since I've set up my pi hole, but you shouldn't need a monitor, the initial configuration should be done through the command line.

Once it's set up, you'll have a webpage inside your network that you can visit to monitor / configure further.

That being said, you can connect any HDMI monitor to a raspberry pi, and it should work.