Nextcloud/ install script Debian

In addition to my other topic i created a script to do a full installation of Nextcloud on a debian 8.5 server. It’s a dumb script, nothing fancy, but it does save you some time.

All you need to prepare yourself is a debian 8.5 server with the bare minimal of ssh-server and system tools. After you installed the debian server download the script to your /root folder and chmod it to 754. After that you can execute the script. It will install:

apache, php, mariadb
configure ssl
create a certificate
install nextcloud and create a admin user (username admin) and mariadb database
install go (golang) for spreedme-server
install spreedme-server
install spreedme app

Just read the instruction on screen.

You need to enable the app when the script completed (in nextcloud / +apps/ not enabled apps). There is a configuration error. when entering there is an error stating you need to login to create rooms. Havent found a solution yet. If you do please post it here so i can edit the script. Also after a server reboot the server won’t start automaticly, but at the end of the script i show the command i use to let server run in the background.

Also for security reasons you should move /var/www/nextcloud/data to /var/ncdata but thats up to you.

Download the Script


moved to tips&tricks.

I read your script to create some ideas for my own script (not a shell script but a human readable script).

To download Nextcloud I used another command to download the latest version:
wget -O nextcloud-12-latest.tar.bz2

At line 126 you wrote:
mkdir /var/wwww/nextcloud/config
I guess you make a typo:
mkdir /var/www/nextcloud/config

I am using Ubuntu, so I can not use your script, but it gave my ideas :slight_smile:

Guido van Harten

1 Like

Hi there Guido. Thanks for your comment! I corrected the typo (www) and changed the specific version to In my other step by step guides i already use but forgot to change it in the script :+1:

Hi Erik,
I am learning to create scripts. When I read your script I also see the section where you want to copy and add the next line to your config.php, directly under the line 0 => ‘localhost’

I don’t know if it is possible and more efficient.
0 => 'localhost’
0 => ‘localhost’
\r\n"1 => ‘$nc_svr_ip’,"

I am looking for it.