Skip to content

Instantly share code, notes, and snippets.

@stereosupersonic
Last active December 2, 2021 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stereosupersonic/3b6b67cb7e210f1d886b4a5f12eb3849 to your computer and use it in GitHub Desktop.
Save stereosupersonic/3b6b67cb7e210f1d886b4a5f12eb3849 to your computer and use it in GitHub Desktop.

My raspberry pi setup

create a bootable card

boot new raspberry PI

  • find IP in your network e.g. nmap -sP 192.168.1.*
  • login with ssh pi@ password: raspberry
  • change the password of the PI user with sudo raspi-config
  • and change locale to de_DE.UTF-8 within the raspi-config

run init setup

  • curl https://gist.githubusercontent.com/stereosupersonic/43367f3934b6de2354779aa1744b4fcc/raw/7bf2ed5a8bd2b9ec2a643cd6d2855e35986245fb/setup.sh | sudo bash -s
  • try to login from another console with stereosonic@ without any password

Congratulations everything is prepared!

hier gehts weiter mit ansible

  • TODO

use my linux setup as base

https://gist.github.com/stereosupersonic/4b9a2048c21349ed740f8427203819ec

add a new user

https://gist.github.com/stereosupersonic/4b9a2048c21349ed740f8427203819ec#setup-an-new-user

disable user pi

sudo passwd --lock pi

install docker

sudo apt-get update
sudo apt-get install -y -qq --no-install-recommends apt-transport-https ca-certificates curl

sudo curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | sudo apt-key add -
sudo apt-key finger 9DC858229FC7DD38854AE2D88D81803C0EBFCD88

sudo tee /etc/apt/sources.list.d/docker.list \
    <<< "deb [arch=armhf] https://download.docker.com/linux/raspbian buster stable"
    
sudo apt-get update
sudo apt-get install -y --no-install-recommends docker-ce
# add user to the docker group
sudo groupadd docker
sudo usermod -aG docker $USER
#enable autom start of the docker servics
sudo systemctl enable docker
# optinal docker compose
sudo apt install docker-compose

basic scripts

https://github.com/stereosupersonic/raspberrypi

security

http://www.netzmafia.de/skripten/hardware/RasPi/security.html

Apps

sync data with drobox e.g. backups

https://jarrodstech.net/how-to-raspberry-pi-dropbox-sync/

sudo apt-get install rclone

rclone config # https://rclone.org/remote_setup/


# show config
cat $HOME/.config/rclone/rclone.conf

# list dir
rclone lsd MyDropbox:

# copy local data to dropbox
https://rclone.org/commands/rclone_copy/

e.g.:

rclone copy /data/backups MyDropbox:backup/raspi4

access via ssl tunnel

https://gist.github.com/stereosupersonic/c778d43e707fc767b9e98ced7d637112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment