Debian install
Installing Nextcloud on DebianΒΆ
After Debian Minimal InstallΒΆ
-
Install Necessary Packages:
-
Change zram Configuration:
-
Replace
.bashrc
:
Downloading and Installing NextcloudΒΆ
-
Download Nextcloud:
-
Install MariaDB:
-
Create Nextcloud Database:
Inside the MariaDB shell:
CREATE DATABASE nextcloud; GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost' IDENTIFIED BY 'mypassword'; FLUSH PRIVILEGES;
Exit the MariaDB shell with
CTRL+D
. -
Set Up Apache Webserver:
-
Install Required Packages:
-
Enable Apache Modules:
-
Unzip and Move Nextcloud:
-
Configure Apache for Nextcloud:
Add the following contents to
nextcloud.conf
:<VirtualHost *:80> DocumentRoot "/var/www/nextcloud" ServerName nextcloud <Directory "/var/www/nextcloud/"> Options MultiViews FollowSymlinks AllowOverride All Order allow,deny Allow from all </Directory> TransferLog /var/log/apache2/nextcloud_access.log ErrorLog /var/log/apache2/nextcloud_error.log </VirtualHost>
-
Enable Nextcloud Site and Restart Apache:
-
-
Adjust PHP Settings (for Debian 12):
Update the following parameters:
-
Restart Apache:
For additional configuration related to using an external USB drive, see 02 Using an external USB drive. sudo mysql_secure_installation
CTRL+D to exitApache Webserver SetupΒΆ
Installing the required packages to support Apache:
sudo apt install php php-apcu php-bcmath php-cli php-common php-curl php-gd php-gmp php-imagick php-intl php-mbstring php-mysql php-zip php-xml
Unzip and move nextcloudΒΆ
unzip latest.zip
sudo chown -R www-data:www-data nextcloud
sudo mv nextcloud.learnlinux.cloud /var/www
sudo a2dissite 000-default.conf
<VirtualHost *:80>
DocumentRoot "/var/www/nextcloud"
ServerName nextcloud
<Directory "/var/www/nextcloud/">
Options MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
TransferLog /var/log/apache2/nextcloud_access.log
ErrorLog /var/log/apache2/nextcloud_error.log
</VirtualHost>
As of Debian 12
Adjust the following parameters:
- memory_limit = 512M
- upload_max_filesize = 16G
- max_execution_time = 360
- post_max_size = 16G
- date.timezone = America/New_York
- opcache.enable=1
- opcache.interned_strings_buffer=32
- opcache.max_accelerated_files=10000
- opcache.memory_consumption=128
- opcache.save_comments=1
- opcache.revalidate_freq=1