# Raspberry Pi setup # Setup network sudo arp-scan -I ens33 --localnet # find your raspberry pi sudo apt-get -y update --allow-releaseinfo-change
# Setup static IP sudo vi /etc/dhcpcd.conf ----------------------------- interface wlan0 static routers=192.168.1.1 static domain_name_servers=8.8.8.8 static ip_address=192.168.1.198/24 ----------------------------- sudo ip link set wlan0 down && sudo ip link set wlan0 up
# install snap sudo apt install -y snapd sudo snap install core
sudo reboot
# LXD # install LXD sudo snap install lxd --channel=latest/stable sudo /snap/bin/lxd init ==> Size in GiB of the new loop device (1GiB minimum) [default=23GiB]: 115GiB
sudo usermod -a -G lxd ${USER} su - ${USER} # apply the new group membership
# create LXD container for nextcloud lxc image list images: architecture=armhf os=Ubuntu # check ubuntu images for Raspberry Pi lxc launch images:ubuntu/20.04 ubuntu-container lxc exec ubuntu-container -- passwd ubuntu # setup the default passwd for normal user lxc exec ubuntu-container -- apt-get update
# add proxy device lxc config device add ubuntu-container myport443 proxy listen=tcp:0.0.0.0:443 connect=tcp:127.0.0.1:443
# Nextcloud # install packages lxc exec ubuntu-container -- su --login ubuntu # enter the container sudo apt install -y snapd sudo snap install core sudo reboot
# install nextcloud lxc exec ubuntu-container -- su --login ubuntu # enter the container sudo snap install nextcloud
verify snap changes nextcloud snap info nextcloud sudo systemctl | grep nextcloud
# enable https sudo /snap/bin/nextcloud.enable-https self-signed
# verify https://192.168.1.198/ |