Build your Nextcloud Server using one shell script
updated: May, 14th, 2018: Updated to TLSv1.3
The initial script (install-nextcloud.sh) will install your self hosted Nextcloud within few minutes fully automated. Your server will be built of:
- Fail2Ban (Nextcloud and SSH jails)
- Nextcloud 13.0.2
- NGINX 1.14
- OpenSSL 1.1.0h
- PHP 7.2.5
- self signed or Let’s Encrypt SSL using the second script
- UFW (22, 80, 443)
The only precondition for the install-nextcloud.sh script is to use Ubuntu 18.04 LTS as your server OS. You will find a script for Ubuntu 16.04.4 LTS either, it is called install-nextcloud-Ubuntu16044LTS.sh. At least but optionally you may request a ssl certificate from letsencrypt by issuing the second script called “ssl-certificat.sh”.
Ready to go? Let’s start:
(1) Build your self hosted Nextcloud server
If you are on Ubuntu 18.04 LTS:
sudo -s cd /usr/local/src git clone https://github.com/riegercloud/install-nextcloud.git cd install-nextcloud chmod +x install-nextcloud.sh ./install-nextcloud.sh
If you are on Ubuntu 16.04.4 LTS:
sudo -s cd /usr/local/src git clone https://github.com/riegercloud/install-nextcloud.git cd install-nextcloud chmod +x install-nextcloud-Ubuntu16044LTS.sh ./install-nextcloud-Ubuntu16044LTS.sh
… be patient
Open your browser and call the shown URL from your shell
Nextcloud is already up, optimized and running!
(2) Optionally: Request your ssl certificate from Let’s Encrypt
Before you request your certificate ensure that your web-ports (80+443) are forwared to your server and your dyndns is properly configured to point to your server!
sudo -s cd /usr/local/src/install-nextcloud chmod +x ssl-certificate.sh ./ssl-certificate.sh
You only have to enter your DYNDNSNAME (YOUR.DEDYN.IO).
Then LetsEncrypt will ask you for
- your email adress
Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel):
- to agree to their Terms of Service
- if you are willing to share your email address with the Electronic Frontier Foundation
Y or N
Wait while your certificates are obtained.
If you receive this message:
Call: https://your.dedyn.io and enjoy your Nextcloud
your server is up and running using a certificate from Let’s Encrypt.
Enjoy your self hosted Nextcloud.