A common use for the Raspberry Pi is a low-powered headless server on which you can install a web server such as Nginx, a Plex media tracker such as Tautulli, a network-throughput measuring tool such as tshark, or network-device management tools such as UNMS or Unifi Controller. This guide will show you how to use your Linux machine to set up your Pi so that you can use it for one these purposes. If you need the Linux guide instead, look here.
Download “Raspian Stretch Lite” from the Raspberry Pi website. Do not download either of the desktop versions on offer. You do not need them for a headless installation.
Install Balena Etcher on your Mac using Homebrew.
brew cask install balenaetcher
WAIT If you haven’t yet installed Homebrew, do that first. Do not skip this step. You can find a full installation and user guide here.
Insert the MicroSD card that came with your Raspberry Pi into your Mac. For most Macs, you will need an adapter.
Open Balena Etcher on your Mac. Click “Select Image.” Navigate to the “Raspian Stretch Lite” file that you downloaded in step one. Then click “Flash.” You may be asked to enter your computer’s password.
After Balena Etcher has finished flashing the image, it will automatically dismount the MicroSD card. Once you are satisfied that it has finished, re-insert the MicroSD card and wait for your Mac to recognize it as an external drive with the name
In Finder, navigate to the MicroSD card. In the root directory, add a blank file named
ssh. Do not add an extension (.e.g
.txt). This will allow you to connect to the Raspberry Pi using SSH.
WARNING If you skip this step, you will not be able to proceed.
Physically remove the MicroSD card from your Mac (and any adapter). Insert the MicroSD card into the Raspberry Pi. Connect the Raspberry Pi to your network with an ethernet cable. Plug the Raspberry Pi in.
On most networks, the Raspberry Pi will automatically be given an IP address by the DHCP server Before proceeding, you will need to find what this IP address is. If you have a Fingbox, or other network monitoring tool, it will tell what you what this is automatically. Alternatively, you can log in to your router and look at the DHCP tables.
Next, we will SSH in to the Pi from the Mac. The default username is
pi. The default password is
raspberry. Assuming that its IP address is
10.0.1.179, you would type:
If prompted, type
yes when asked to “accept authenticity.”
Then enter the default password, which is
Once you are logged in, you should update the software on the Pi. To do this, type:
sudo apt-get update && sudo apt-get upgrade
Settle in. This can take ten minutes or so.
Once the software has updated, we will change some system-wide settings. To enter the configuration area, type:
First, you should change the default user password to a password of your choice. When you’ve done this, write it down. If you lose it, you’ll need to start over.
Next, you should change the Pi’s hostname (
Network Options →
Hostname). This can be anything, but if you intend to give the device a fully qualified domain name, you’ll want to keep it consistent with the rest of your network: e.g.
Next, you can change the localization options. This step is not mandatory.
Next, you should expand the file system so that the Pi can use the entire MicroSD card. (
Advanced Options →
When you are done, exit the configuration tool by selecting “Finish” and agreeing to reboot.
Given that our purpose here is to set up the Pi as a server, we highly recommend assigning it a static IP address. To avoid multiple devices trying to take the same IP address, this is best done from the DHCP side—that is, on your router or standalone DHCP server.
Your Pi is now ready to be used as a headless server. To make accessing it via SSH easier, we would recommend first setting up passwordless access via keys, and then setting up SSH shortcuts on your client machine.