Skip to content

Set up Nextcloud

Sander Steffann edited this page Jan 25, 2020 · 4 revisions

Setting up Nextcloud for a NOG

For all the following procedures we start with:

Create a subdomain

  • In the left menu select "Subdomain (Vhost)"
  • Click the green button "Add new subdomain"
  • As "Hostname" use cloud
  • Under "Domain" select the domain of the NOG
  • As "Web folder" use cloud
  • As "Auto-Subdomain" select "None"
  • Select "Let's Encrypt SSL"
  • Save

Now wait a while until the website is created and the SSL certificate has been created. Test this by opening http://cloud.<domain> in your browser. When that works and shows a welcome page also try https://cloud.<domain> and check that SSL works. Sometimes ISPConfig fails when creating the SSL certificate. When that happens:

  • In the left menu select "Subdomain (Vhost)"
  • Select the website from the list
  • Enable "Let's Encrypt SSL" again (the failure will have turned it off)
  • Save

Now that http and https both work let's make sure that we always use https:

  • In the left menu select "Subdomain (Vhost)"
  • Select the website from the list
  • Click on the "Redirect" tab
  • Enable "Rewrite HTTP to HTTPS"
  • Save

Create a database user

  • In the left menu select "Database Users"
  • Click the green button "Add new user"
  • Select the Client account of the NOG
  • As "Database user" use cloud (this will be prefixed by c.. where .. is the ID of the client account, you can look that up by selecting "Client" in the top menu)
  • Set or generate a password for the database user
  • Save

Create a database

  • In the left menu select "Databases"
  • Click on the green button "Add new database"
  • Select the NOG's website
  • As "Database name" use cloud (this will be prefixed by c.. where .. is the ID of the client account, you can look that up by selecting "Client" in the top menu)
  • As "Database user" select the user you created in the previous step
  • As "Database charset" select "UTF8MB4"
  • Save

Create FTP account

As there is no app package for Nextcloud that we can install we need to do it manually. To access the files we need an FTP user:

  • In the left menu select "FTP-Accounts"
  • Click the green button "Add new FTP-User"
  • Select the NOG's website
  • Under "Username" use ftp
  • Set or generate a password for the ftp user

Then wait a bit until the FTP user is created.

Installing Nextcloud

  • Go to https://nextcloud.com/install/#instructions-server
  • At the top choose "Web Installer"
  • Save the setup-nextcloud.php file
  • Connect using your FTP client to admin.nogalliance.org using the username (for example ugnogftp) and password you created before
  • Upload the setup-nextcloud.php file to the /cloud folder
  • Open https://cloud.<domain>/setup-nextcloud.php in your browser
  • Click "Next"
  • Enter . as the directory name
  • Keep clicking "Next"
  • When asked to create an administrator account use username admin and a secure password
  • Open the "Storage & database" options
  • Select "MySQL/MariaDB"
Clone this wiki locally