Raspberry Pi based on Ubuntu - install script w/ smb, docker, watchtower, traefik, portainer, glances, certs-extraction, muximux, owncloud
- Micro-SD Card 16Go or more
- Ubuntu image ubuntu-18.04.4-preinstalled-server-arm64+raspi3.img.xz
- Clone the image to SD Card with Rufus
- Your favorite terminal, PuTTY or MobaXterm
Add hostname
or static lease on your routerto target RPi IP address
(and theLocal domain: local
) (for local reverse-proxy setup):- media.rpi.local
- monit.rpi.local
- proxy.rpi.local
- docker.rpi.local
- On your main router,
open firewall tcp ports
80, 443 forward to target your RPi IP address
- Raspberry Pi 4 Modèle B 4 Go ARM-Cortex-A72
- Sandisk 32 Go Carte microSD Extreme
- ZkeeShop Boitier en Aluminium avec Ventilateur et 4 dissipateur Thermique
- ESSAGER Câble USB de Type C
- UGREEN Quick Charge 3.0 Chargeur Secteur USB Rapide 18W 3A QC 3.0
- CSL - Câble Ethernet plat 0,5m - RJ45 Cat 6
-
Write SD card with the preinstalled image w/ Rufus, and power on the RPi
-
Add 'media' user, password and hostname
Default password: ubuntu
$ ssh ubuntu@ubuntu
$ sudo -i
# Change default root password
$ passwd
# Add new 'media' user
$ useradd -m -d /home/media -s /bin/bash -c "RPi's main user" -g users media
$ usermod -a -G adm,dialout,cdrom,floppy,sudo,audio,dip,video,plugdev,lxd,netdev,www-data,syslog media
$ usermod -g 100 media
# Set 'media' user password
$ passwd media
# Change host name from ubuntu to rpi
$ echo "rpi" > /etc/hostname
$ reboot
- Remove default user and prepare directories
$ ssh media@rpi
$ sudo -i
$ deluser ubuntu
$ rm -Rf /home/ubuntu
$ mkdir /var/docker
$ chown media:users /var/docker
$ exit
$ ln -sf /var/docker $HOME/docker
- Launch RPi installation
Setup is located on $HOME/.env
TZ
: timezone name (like Etc/UTC or Europe/Paris)DOMAIN
: sub.example.com the domain name dns resolutionACME_COPY
: 1 to enable copy acme certificates to your router (used on $HOME/docker-nas/docker-compose.yml > certs-extraction)MAIL_ADR
: email address ([email protected])MAIL_PWD
: email password
Samba users list:
USER
: < User Login>|< User Password (can be empty)>|< Full Name User / Description>|< User mail>
$ ssh media@rpi
$ git clone https://github.com/joweisberg/rpi-docker-owncloud.git
$ cp -pR rpi-docker-owncloud/* .
$ sudo $HOME/os-install.sh 2>&1 | tee /var/log/os-install.log
- Launch setup backup (can be use after a complete setup)
Data to backup are located on $HOME/os-backup.conf
$ ssh media@rpi
$ sudo $HOME/os-backup.sh
- Setup docker / onwcloud
Edit and adapt to your needs: $HOME/docker-nas/.env
DOMAIN
: sub.example.com the domain name dns resolutionLE_MAIL
: Letsencrypt email address
$ ssh media@rpi
$ cd $HOME/docker-nas && ./docker-build.sh
- RPi web access:
- http://media.rpi.local/ - RPi console management
- https://sub.example.com/owncloud (default login/password: admin/owncloud)