🔌 Attach and Mount External Drive
- lsblk
- sudo fdisk -l
- sudo mkdir /mnt/mydrive
- sudo mount /dev/sda1 /mnt/mydrive
- sudo chown -R pi:pi /mnt/mydrive
- sudo nano /etc/fstab
- df -h
☁️ Install and Configure Nextcloud
- sudo apt update && sudo apt upgrade -y
- sudo apt install apache2 -y
- sudo systemctl enable apache2
- sudo systemctl start apache2
- sudo apt install mariadb-server -y
- sudo mysql_secure_installation
- sudo apt install php libapache2-mod-php php-mysql php-xml php-mbstring php-zip php-curl php-gd php-intl php-bcmath -y
- sudo mysql -u root -p
- CREATE DATABASE nextcloud;
- CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password';
- GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
- FLUSH PRIVILEGES;
- EXIT;
- cd /tmp
- wget https://download.nextcloud.com/server/releases/latest.zip
- sudo apt install unzip
- unzip latest.zip
- sudo mv nextcloud /var/www/html/
- sudo chown -R www-data:www-data /var/www/html/nextcloud
- sudo chmod -R 755 /var/www/html/nextcloud
🔐 Secure it with Tailscale VPN
- sudo apt update && sudo apt upgrade -y
- curl -fsSL https://tailscale.com/install.sh | sh
- sudo tailscale up
- sudo systemctl enable tailscaled
🌍 Access from Anywhere (Funnel)
- python3 -m http.server 3000
- sudo tailscale funnel 3000
- sudo tailscale funnel 80
- Edit
config.php
: -
'trusted_domains' => array ( 0 => '192.168.x.x', 1 => 'your.tailnet.ts.net', ),
- sudo systemctl restart apache2