Comments on How to Install Nextcloud 13 Server on Debian 9

NextCloud is a free, open source and an alternative to another open source file hosting solution OwnCloud. NextCloud eliminates your need of using third party cloud hosting software like Dropbox for storing your documents. In this tutorial, we will explain how to install and configure NextCloud on Debian 9.

31 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Steve L

 The apache2 configtest failed.

Aug 11 14:12:59 ubuntu1604 apache2[2403]: Output of config test was:

Aug 11 14:12:59 ubuntu1604 apache2[2403]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 17 of /etc/apache2/sites-enabled

Aug 11 14:12:59 ubuntu1604 apache2[2403]: Action 'configtest' failed.

Aug 11 14:12:59 ubuntu1604 apache2[2403]: The Apache error log may have more information.

Aug 11 14:12:59 ubuntu1604 systemd[1]: apache2.service: Control process exited, code=exited status=1

Aug 11 14:12:59 ubuntu1604 systemd[1]: Failed to start LSB: Apache2 web server.

Aug 11 14:12:59 ubuntu1604 systemd[1]: apache2.service: Unit entered failed state.

Aug 11 14:12:59 ubuntu1604 systemd[1]: apache2.service: Failed with result 'exit-code'.

 

By: till

There was an issue in the config file /etc/apache2/sites-available/nextcloud.conf in the tutorial. Please update your file so that it matches the updated tutorial.

By: MegaXLR

Dont forget to generate an SSL certificate for a named server. And don't forget to apply the latest security patches in the settings menu. (There are quite a few important ones)

By: Boubou

I prefer Seafile . It's much simpler and more stable and faster than nextcloud

By: nguyenhappy92

Add row<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/var/www/html/nextcloud" ServerName My Server IP <Directory "/var/www/html/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>run apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 17 of /etc/apache2/sites-enabledPlease check it help me

By: Euquias Junior

Error executing command systemctl enable mysql:

failed to enable unit: refusing to operate on linked unit file mysql.service

any suggestion?

 

By: holebas

Use instead of mysql.service mariadb.service

By: Manuel Luque

In Section "1 Installing LAMP Server", after executing the command:

systemctl enable mysql

I obtain the next error message in console:

Executing: /lib/systemd/systemd-sysv-install enable mysql Failed to enable unit: Refusing to operate on linked unit file mysql.service

By: d00d

This doesn't work. "systemctl enable mysql" returns an error. After finishing the installation and navigating to the IP, php information is shown. 

By: Viperdriver2000

php does not work for me. have to install apt install libapache2-mod-php7.0 libapache2-mod-php then it works.

By: DogeZaemon

Thanks, it helps ;-)

By: Raham

Thanks! I had the same issue. Installing "libapache2-mod-php7.0" is missing in the tutorial.

By: Roger

You open only port 80 in firewall configuration. What about port 22 for SSH and the mariadb port? 

By: KJ

Yes!

Thx for your advice!

By: Gushasad

Why the IP must be set to 192.168.0.187? Can't it be set to something else?

By: till

You have to use your own IP there instead of 192.168.0.187.

By: Alex A

Thanks, that was easy, for a basic setup or a demo your guide should be fine. Thanks a lot.

By: Carl K

It's probably better to download 12.0.4 by now. https://download.nextcloud.com/server/releases/nextcloud-12.0.4.zip

By: Sascha

CAUTON!!!STEP 4 - Installing der UFW Firewall! Be careful when you do that on a VPS! I also had a VPS and was connected via SSH (Port 22). The next day I wanted to login and I was locked out. It took me several hours to get in touch with my provider and to fix the problem! BE CAREFUL!

By: Ishmum R

I followed this tutorial on Debian 9 and it did not work. However, I ended up fixing the whole thing and it works no problems now. Obviously, change the passwords and such to your liking and don't leave them at default. 

Apply each command in order (and fill into nano every time ofc) and you will have a working latest Nextcloud base. As of Mar 20 2018, it works like a charm:

apt-get install apache2 mariadb-server -y

 

systemctl start apache2

systemctl enable apache2

systemctl start mysql

systemctl enable mysql

 

apt-get install php7.0-xml php7.0 php7.0-cgi php7.0-cli php7.0-gd php7.0-curl php7.0-zip php7.0-mysql php7.0-mbstring wget unzip -y

 

mysql_secure_installation

 

mysql -u root -p

 

CREATE DATABASE nextclouddb;

 

CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'yourpw';

 

GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'localhost';

 

FLUSH PRIVILEGES;

 

\q

 

wget https://download.nextcloud.com/server/releases/latest.zip

 

unzip latest.zip

 

mv nextcloud /var/www/html/

 

chown -R www-data:www-data /var/www/html/nextcloud

 

nano /etc/apache2/sites-available/nextcloud.conf

fill in this:

<VirtualHost *:80>

ServerAdmin [email protected]

DocumentRoot "/var/www/html/nextcloud"

ServerName 192.168.1.46

<Directory "/var/www/html/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>

 

a2dissite 000-default

a2ensite nextcloud

 

 

systemctl restart apache2

 

 

apt-get install ufw -y

 

ufw enable

 

ufw allow 80

 

ufw allow 22

By: Julius

What is this strange obsession with apache webserver? Who still needs it, if you have something like nginx?

By: Leon

I have a problem i came so far that i can get to the site in my browser but when i create the config of the cloud, the site shows a error message:

Access denied to database nextclouddb 

 

By: james lara

Thanks For sharing this information. It’s Nice..!!!

By: Aymeric

Thank you !!! Works perfect

By: khalsajings

Except for the wget for the latest.zip which failed with url not found - not because the instructions were incorrect, but the nextcloud download site was uncooperating. I went to the nextcloud website and manually downloaded the latest bits and continued. Got to the login screen - flawless instructions. Thank you.

By: cold_side_of_your_pillow

All instructions worked perfectly, except that it only shows up when typing localhost (127.0.0.1) rather than my configured IP address.

By: jonathan

saludos... muy bueno el tutorial pero hay unos detalles al tratar de agregar un cliente me da este error:

root@pc003-pc:/home/pc003# add-apt-repository ppa:nextcloud-devs/clientbash: add-apt-repository: no se encontró la orden

luego al tratar de descargar el nextcloud-client me sale este:

root@pc003-pc:/home/pc003# apt-get install nextcloud-clientLeyendo lista de paquetes... HechoCreando árbol de dependencias       Leyendo la información de estado... HechoE: No se ha podido localizar el paquete nextcloud-client

como creen que se pueda solucionar??? muchas gracias de ante mano por su colaboracion...

By: Filip

After instalation I Have small problem.

In the log I see this PHP Error. Otherwise, everything else works well.

 

Error PHP unlink(/var/www/html/nextcloud/data/appdata_occu8v80aw0e/css/systemtags/35c3-4842-systemtagsfilelist.css): No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#227

By: till

Nextcloud seems to try to remove a cached css file which does not exist. Might be just a small bug in that nextcloud release.

By: Filip

Is there nothing to solve? Is there no danger?

By: Szabolcs

 Hi!I followed step by step the instructions but still no success. I use my IP for openmediavault in this case what should I change in order to reach the nexcloud log in site? Thanks for your help.