The Smarter Camper

Setting up the Pi from scratch #

There are a million and two ways to set up a Pi, but here are the steps I think need to be done every time to set up a Pi from scratch to work well as a Smart Camper media and information hub (recorded here for my own future reference as much as anything).

These steps may also be useful for other Pis acting as similar hubs, such as Magic Mirrors or car-puters.

First, get an OS on the Pi #

  1. Use Raspberry Pi Imager to install Raspbian on a good-quality, 32GB SD card. It's a wonderfully simple solution. I continue to debate using Raspian-lite and forgo the GUI in favor of more power for Plex. But for now, I keep it.
  2. Put the new card in the Pi and boot up. Assuming it starts OK, go through the first-run setup steps.
  3. Set a good password.
  4. Be sure to enable SSH
  5. And set a static IP. You'll be glad you did and aren't chasing ever-changing IP addresses set by your router. Note that your ISP and router may require additional work to make this happen.

Install Plex #

  1. Ensure the external drive containing the media library is mounted and will mount automatically.
  2. Follow the steps to prep for Plex server installation:sudo apt-get install apt-transport-https curl | sudo apt-key add - echo deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list deb public main
  3. Update packages: sudo apt-get update.
  4. Now get the Plex server: sudo apt-get install plexmediaserver
  5. And upgrade: sudo apt-get upgrade. In the past I've cleaned up some unneeded packages, but honestly, it's probably not worth it. They're not hurting anything, really.

Pi Configuration and further installations #

  1. Reset the resolution to 1440x900 (at 1920 it's too fine for fat fingers)
  2. Enable 1-wire interfacing, either through the raspi-config "interfacing" option or by manually editing the config.
  3. Install xscreensaver. It's by far the easiest way to control when the Pi and display go to sleep.

Code setup #

  1. Pull my smarter camper code from the repo.
  2. Make sure it's on pythonpath: export PYTHONPATH="${PYTHONPATH}:$HOME/var/www"
  3. And just to be sure, put it in ~/.bashrc too.
  4. Pip install dependencies from the repo's requirements file: pip3 install -r REQUIREMENTS.txt
  5. Set environment variables for services we're using. See for details.
  6. Follow my remaining instructions to re-install the web server and monitoring page
← Home