GonzaloTorreras / raspberry-pi-setup

Handy guided setup for headless rpi (tested in Rpi 4)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raspberry pi guided setup

Handy setup to speed up your initial setup of the pi.

If you want a headless raspbian

  • Add an empty ssh file to /boot if you want to activate ssh (in Win make sure you remove the extension).
  • If you are not connected by lan you can activate also the wifi

Now login to your default pi user: pi:raspberry and answer the questions as you like!

wget https://raw.githubusercontent.com/GonzaloTorreras/raspberry-pi-setup/master/src/installer.sh && chmod +x installer.sh && ./installer.sh

It helps you to:

  • Update the system: apt update && upgrade -y
  • User related
    • Add a new user
    • Add new user to sudo group
    • Add new user to sudoers to avoid passwd promp
    • Handful aliases
      • To the current user
      • To the $newUser
    • Change default pi password
    • Lock pi user
    • Lock root user
    • Add new user as alias for root root: $newUser, root \n $newUser: your@email.com >> /etc/aliases
    • Delete pi (not yet, having issues if running through pi user)
  • Install UFW
    • Block any incoming
    • Allow any outgoing
    • Allow any from local (192.168.1.0/24)
    • Activate UFW
  • Install docker (latest)
  • Add current user ($USER) to docker group
  • Add NEW user ($newUser) to docker group
  • Install docker-compose (latest)
  • Install a *speed fan controller (PWM)

ALL the above tasks will be asked one by one BEFORE doing any change [y/n]

Note:

You can run it at any point of your setup, or with any user. Recomended to do it with pi user, or a passwordless sudo acces user.

To do

  • Improve/expand aliases (maybe split by categories to decide what install such docker related)

Docker image installers

  • Nginx (with certbot for LetsEncript).
  • Node-RED
  • Pi Hole
  • MySQL (MariaDB)
  • Traefik
  • NextCloud
  • Pi Hole
  • OpenVPN || piVPN
  • RaspberryCast

Possible ideas:

  • Localice the installer for translations
  • Maybe provide common services such MySQL (mariaDB), nginx, nodeRED etc as standalone installations instead all docker based? (at least the posibility to)

About

Handy guided setup for headless rpi (tested in Rpi 4)


Languages

Language:Shell 77.6%Language:Python 17.8%Language:Dockerfile 3.5%Language:HTML 0.5%Language:PHP 0.5%