Installing NextCloud on Linux (Debian 10)
i12bretro
#Nextcloud #Debian #Self-Hosted
Full steps can be found at https://i12bretro.github.io/tutorials/0168.html
- Log into the Debian device
- Run the following commands in a terminal:
update repositories and install any available software updates
sudo apt-get update sudo apt-get upgradeinstall Apache HTTPD and MySQL
sudo apt-get install apache2 mariadb-server mariadb-clientinstall PHP components
sudo apt-get install php7.3 libapache2-mod-php7.3 php7.3-curl php7.3-intl php7.3-json php7.3-gd php7.3-mbstring php7.3-mysql php7.3-xml php7.3-zipconfigure the MySQL database
sudo su mysql_secure_installation - Press Enter to login as root
- Type Y and press Enter to set a root password, type the password twice to confirm
- Type Y and press Enter to remove anonymous users
- Type Y and press Enter to disallow root login remotely
- Type Y and press Enter to remove the test database
- Type Y and press Enter to reload privilege tables
- Run the following command to login into MySQL: mysql -u root -p
- Authenticate with the root password set earlier
- Run the following commands to create the Nextcloud database and database user NOTE: update 'password' with a secure password MariaDB [(none)]- CREATE DATABASE nextclouddb; MariaDB [(none)]- GRANT ALL ON nextclouddb.* to 'nextclouduser'@'localhost' IDENTIFIED BY 'N3xtCl0ud!'; MariaDB [(none)]- FLUSH PRIVILEGES; MariaDB [(none)]- EXIT; exit
- Continue with the following commands to download and extract Nextcloud in the Apache webroot
download latest nextcloud version
sudo wget https://download.nextcloud.com/server/releases/latest.zipextract latest.zip
sudo unzip latest.zip -d /var/wwwset the owner of the new nextcloud directory to www-data
sudo chown -R www-data:www-data /var/www/nextcloudcreate a new nextcloud.conf file to configure the site
sudo nano /etc/apache2/sites-available/nextcloud.conf - Paste the following configuration into nextcloud.conf
Alias /nextcloud "/var/www/nextcloud/"
directory /var/www/html/nextcloud/-
Options +FollowSymlinks
AllowOverride All
Require all granted
Dav off
SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud /directory- - Press CTRL+O, Enter, CTRL+X to write the changes to nextcloud.conf
- Continue with the following commands to enable the site and restart Apache:
enable the Nextcloud site and required PHP mod
2021-08-15
0.02926653 LBC
Copyrighted (contact publisher)
29574460 Bytes