Skip to content

Raspberry PI install script w/ smb, docker, traefik, owncloud, glances, muximux

Notifications You must be signed in to change notification settings

joweisberg/rpi-docker-owncloud

Repository files navigation

Raspberry Pi based on Ubuntu - install script w/ smb, docker, watchtower, traefik, portainer, glances, certs-extraction, muximux, owncloud

Requirements

  • 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 router to target RPi IP address (and the Local 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

My RPi hardware setup

Install steps

  1. Write SD card with the preinstalled image w/ Rufus, and power on the RPi

  2. 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
  1. 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
  1. 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 resolution
  • ACME_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
  1. 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
  1. Setup docker / onwcloud

Edit and adapt to your needs: $HOME/docker-nas/.env

  • DOMAIN: sub.example.com the domain name dns resolution
  • LE_MAIL: Letsencrypt email address
$ ssh media@rpi
$ cd $HOME/docker-nas && ./docker-build.sh
  1. RPi web access:

About

Raspberry PI install script w/ smb, docker, traefik, owncloud, glances, muximux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published