Headless Raspberry Pi with WiFi

There are some people who my need to run a node with a wireless connection rather than an ethernet cable. This article is for them. “Headless” means no monitor/keyboard/mouse, not the fact that WiFi is being used. This article describes using both the HEADLESS and WIFI combination.

Watch this first, then read below for modifications necessary for the type of node you want to run.

For the RaspiBlitz, you can run it headless AND on WiFi which I’ll explain below – but when attempting to run WiFi with a monitor, it crashes – a known problem with the latest version I used. Solution is just don’t connect a monitor.

For the MyNode, you cannot run it with WiFi from my testing and best efforts, you’ll need an Ethernet cable. You still run it headless (no monitor), but it needs an Ethernet Cable.

For any other Linux OS, the instructions below should work for the Raspberry Pi.

Step 1.

Download the latest RaspiBlitz file, “raspiblitz-v1.7.0-2021-04-25.img.gz”

Don’t unzip the file.

Verify the download (learn what that means here), then flash it to a micro SD card with Balena Etcher. (More detailed instructions). There are other programs you could use to flash, but is simple enough.

After the file is flashed, close Balena Etcher, and physically remove the micro SD card from the computer.

Step 2.

Reinsert the micro SD card into the computer. On a Windows computer, it will prompt you to format. Don’t. There are 2 partitions. One is called “boot”, and a Windows or Mac computer will be able to read it (Linux of course will). The other partition is a Linux specific partition and can’t be read by Windows (which is why it was eager to format it) or Mac, but that’s OK, we don’t need that partition on these computers, just the boot partition.

Create a new file with a text editor, and copy and paste this text.

country=AU
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
	ssid="MyWiFiNetwork"
	psk="Password"
	key_mgmt=WPA-PSK
}

Change your country code if you need to. Look up your country’s Alpha-2 code here.

Change “MyWiFiNetwork” to the name of your network. Do not delete the quotations marks (they indicate that there is a string of characters to the right of the equals sign instead of a value/number).

Change “Password” to your WiFi network’s password. Again, keep the quotations marks.

Then save the file. Name it wpa_supplicant.conf

Make sure the file’s extension is “.conf” not “.conf.txt”. If you’re using Windows, file extensions are usually hidden by default. You need to unhide them in order to rename the file correctly. Here’s a link to learn how, and here’s an image to show you how…

For a Mac, open a Finder window, go to the top menu called “Finder” and select “preferences”. You’ll see this…

Click “show all filename extensions”

Linux users will have no issues.

Naming the file exactly is important.

Then move the file to the micro SD card’s boot partition.

Step 3

Similar to step 2, create a file called ssh (no extension, just “ssh”), and save it to the boot partition of the micro SD. This file is empty, it needs no contents. Then move it to the boot partition of the micro SD card.

Step 4

Insert the micro SD card into the Pi and switch it on. (Don’t forget to connect the external SSD drive!) The wpa_supplicant.conf file will signal to the OS that WiFi should be used with the connection details provided. The ssh file wil permit remote access with the ssh command.

You should be able to find the IP address of the device from your router’s page. The router can often be accessed with http://192.168.0.1 or similar – you can look up your router’s manuel, or ask Google. One your router’s page, you will see a list of your connected devices.

Step 5

To connect to your RaspiBlitz, you use the terminal and the ssh command. (Details in the RaspiBlitz specific guide)

Step 6

Enjoy


On-chain or Lightning