Comments on How to Install NextCloud on Debian 10
NextCloud is a free and open-source file hosting and file sharing server forked from ownCloud project. It is very similar to other file sharing services like Google Drive, Dropbox and iCloud. In this tutorial, we will explain how to install NextCloud and secure it with Let's Encrypt SSL on Debian 10.
23 Comment(s)
Comments
We can use this Ansible playbook to install nextcloud, php, nginx or apache, mariadb or postgres, redis-server, onlyoffice or collabora office on Linux machines (Amazing role)https://github.com/ReinerNippes/nextcloud
Excelent
Awesome! This was a huge help. The Nextcloud provided VM Script did not work correctly for me and this did! Really great work.
Hi
How can I add Nextcloud safely without breaking a server with ISPConfig with Apache? (installed with the tutorial The Perfect Server - Debian 10 Apache ....)
Thanks
ISPConfig -> Sites -> Website
Add new website "nextcloud.example.tld", assign it to the client you want to install Nextcloud for "From now on I'll call him John Smith with customer ID 8), assign IP adresses, eventually set quota, set Auto-subdomain to None, enable SSL if you have LE, enable PHP. Then hit save.
Go to Database users
Add new user, assign it to John Smith, name it "nextcloud" and generate a password. Write the password down. Save.
Go to Databases
Add new database and configure: site = nextcloud.example.tld, database name = nextcloud, eventually set database quota, and select database user "c8nextcloud" (your customer ID will probably be different, so check that). Hit save.
Go to FTP accounts -> Add new FTP-user, assign it to nextcloud.example.tld, name it nextcloud and generate a password (write this password down).
Download Nextcloud to your laptop/PC, unpack the zip file, and upload the contents of the unzipped folder to your /web folder (using the FTP user we just created)
In your browser, go to nextcloud.example.tld and follow the setup steps. It will ask for you database name, user, and password. The database name is Nextcloud, user is c8nextcloud, and you've written down the password earlier, so just copy that.
That's it!
If you have a problem that the command "a2ensite nextcloud.conf" throws out the message "bash: a2ensite: commande introuvable" you should do the following:
run the command "nano ~/.bashrc" and add the following "export PATH ="/usr/sbin:$PATH"
then execute the "source ~/.bashrc" command
Me aparece el siguiente mensaje y no puedo acceder al programa nextcloud
IMPORTANT NOTES: - The following errors were reported by the server: Domain: nextcloud.example.com Type: None Detail: DNS problem: NXDOMAIN looking up A for nextcloud.example.com - check that a DNS record exists for this domain
¿Puedes ayudarme a corregir y terminar la configuración?
Alejandro, necesitas un dominio. Si no tienes puedes comprar uno o conseguir uno gratuito. Luego de comprarlo u obtenerlo tienes que crear un record A que apunte a nextcloud.tudominio.com (donde tudominio.com es el dominio que obtuviste) y que debe aputnar a la IP pública del servidor donde estas instalando Nextcloud.
The chmod command gives far too much permissions. Instead use the script provided by Nextcloud to harden the permissions on the website directory.It can be found here: https://docs.nextcloud.com/server/9.0/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
Perfect!
Nice tutorial. Consice but complete. A couple of quick questions:
1. Is there any issue adding SSL after the fact?
2. What are the implications for other services running from root. Specifically pihole.
My guess is neither of these will present an issue but would like to clarify iif possible.
Thanks!
Hi,when i tried to install Let's Encrypt Certificate for my domain, it always says the domain dns doesn't exist. What should i do?
Wow thanks, this work PERFECTLY. I still need to get a domain name but for testing purposes without encryption this walkthrough was excellent. Tried to do encryption with just the IP address but this was not allowed by the certbot command. :)
Great guide. I had a little issue where getting to the lets encrypt part wouldn't get a certificate the error said the request was invalid. This was because http://nextcloud.example.com would go to the apache default page and my nextcloud was at http://nextcloud.example.com/nextcloud. Took me a little while to realise how to fix this, by running
a2dissite 000-default.conf
and then
systemctl restart apache2After that certbot worked fine.
Hey I want to set this up for my own home server, as such I dont have a domain name or anything. How would I go about doing this? Also you should mention that most of the commands require sudo infront otherwise they wont work. And one more thing, having this on each command made it confusing. At first I wasnt sure if I should be including that as well.
MariaDB [(none)]>
Sudo is not required in front of the commands, the guide expects that you are logged in as root, see prerequisites.
There are some things I don't understand. Using port 80 is suggested in the apache configuration. But... isn't port 80 serving the http requests only? I thought that it would be port 443 that we should use here. I tried using port 443. I have opened for example port XXXX in my router and tunnel it to port 443 on my server's IP address. I acces now my nextcloud server over the internet on "https://my.domain.here:XXXX".
The installation instructions have some holes in them. For example, the instruction to edit php.ini says to set date.timezone = Asia/Kolkata which at least requires explanation. Do you mean that literally or is that intended to be replaced by the local timezone of the server I'm trying to set up? If the former, why? And if the latter, is there a list of valid possible entries you could point to?Later on, I am instructed to enter
MariaDB [(none)]> CREATE DATABASE nextclouddb; MariaDB [(none)]> CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password';but that returns a syntax error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MariaDB [(none)]> CREATE DATABASE nextclouddb' at line 1Of course, the issue is that you've got the MariaDB prompt in with the command. Perhaps I'm nitpicking but this could be confusing to people who just like to cut & paste commands. The larger issue is that it isn't clear if I just created a user with a password of "password" or a user who requires a password.
More pointedly, is "nextclouduser" - or "nextclouddb" for that matter, "magic" words that must be used for it to work, or could they be changed to something less obvious to someone trying to break into the system?
Thanks for setting up the wiki. I'm following it through step by step and perhaps some of these issues will be clearer by the time I've finished. However I'm worried that I may end up having to redo some of the work to make it fit my use better.
thank you for the guide.
i followed it wuthe the 20.0.4 version on a raspbian 10 buster but when i put my address i get this:
[PHP Code Removed from Post]where did i went wrong? what can i do?
thank you.
Thanks a million for such a great tutorial!
Excellent Tutorial! It's basically only "copy&paste" to get the system up and running! Thanks a lot!
The problem with so many manual, like this is: THERE IS NO DATE when it was written.
I am trying to install it since days an follow this manual. BUT things have probably changed and this manual is not working.
How old it it already? 5 years?
Important, always add a DATE - DATE - DATE...
Dates do not really matter for tutorials, as one can write a tutorial with today's date for an older software as well. What really matters is for which exact OS version it has been written and which software version was used in that guide. As the title says, this tutorial has been written for Debian 10, so do not use it e.g. on Debian 9 or Debian 11 (there are other guides for these versions here at howtoforge, see links in the top section of the guide). And as you can see in the text it states that it was written for "NextCloud is 17.0.1".