Install Nextcloud on Ubuntu VM on Proxmox with Tailscale

I’m so sick of doing this over and over every few months when something messes up, this is just here for reference to stop me going insane.

sudo apt update && sudo apt upgrade -y
sudo apt install apache2 mariadb-server libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip unzip -y
sudo service apache2 restart
cd /var/www/html
sudo wget https://download.nextcloud.com/server/releases/latest.zip
sudo unzip latest.zip
sudo chmod 750 nextcloud -R
sudo chown www-data:www-data nextcloud -R

sudo mysql
CREATE USER ‘nextcloud’ IDENTIFIED BY ‘password’;
CREATE DATABASE nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO ‘nextcloud’@localhost IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
quit;

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

sudo reboot now

sudo -i
sudo nano /var/www/html/nextcloud/config/config.php
ADD TAILSCALE IP

Theme: Overlay by Kaira