Follow

Install Nextcloud on Ubuntu 14.04

  • Applies to: DV Developer or self-managed VPS
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: SSH with root access

Overview

This article explains how to install Nextcloud on your Media Temple VPS or dedicated server with Ubuntu 14.04. Nextcloud is an open source cloud solution that wants to be the secure home for all of your media. Often touted as the successor to the extremely popular ownCloud, Nextcloud includes many great features that anyone may find useful.

  • File storage & sharing
  • Mobile & dektop clients
  • Calendar and contacts management
  • Secure audio and video calls
  • Collabora Online Office (LibreOffice)

 

Important Note
This article is provided as a courtesy. Installing, configuring, and troubleshooting third-party applications is outside the scope of support provided by Media Temple. Please take a moment to review the Statement of Support.

Requirements

  • A VPS with Ubuntu 14.04 installed
  • Root SSH Access
  • Familiarity with basic shell commands

Instructions

These installation instructions assume that you have a fresh Ubuntu 14.04 install on your Media Temple VPS or dedicated server. To change your Media Temple VPS operating system through the Account Center, see these instructions. If you already have a standard LAMP stack or a web server and database software installed, you can skip to step 3. For more in-depth instructions for installing and configuring a LAMP stack, check out this community article

Begin by connecting to your server via SSH as either root or a user with sudo access. 
Connect via SSH - Community article with instructions. 

 

1. Install Apache and the required PHP modules

apt-get install apache2 libapache2-mod-php5
apt-get install php5-gd php5-json php5-mysql php5-curl
apt-get install php5-intl php5-mcrypt php5-imagick

 

2. Install and set up MariaDB

Nextcloud requires a database to work properly. These instructions are for MariaDB, which is a powerful database utility. There's no reason to change to MariaDB if you already have a different database utility installed.

apt-get install -y mariadb-server 
  • Though not technically a requirement, it's important to complete the secure installation process. Don't forget to write down your root user password. Select "yes" at the end when prompted to reload privilege tables.
mysql_secure_installation 

3. Download and unzip Nextcloud's files

Use 'wget' to download Nextcloud's installation files directly to your server. You may also download them to your computer and upload via S/FTP.

wget https://download.nextcloud.com/server/releases/nextcloud-9.0.53.zip

Unzip the installation files.

unzip nextcloud-9.0.53.zip 
  •  Copy Nextcloud's files into your doc root
cp -r nextcloud /var/www/html/ 

4. Create a Nextcloud configuration file

 Use your preferred shell editor to create and modify a Nextcloud configuration file.

vim /etc/apache2/sites-available/nextcloud.conf
  • Cut and paste the following content into that file:
Alias /nextcloud "/var/www/nextcloud/"

  Options +FollowSymlinks
  AllowOverride All
<IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/nextcloud SetEnv HTTP_HOME /var/www/html/nextcloud

5. Create a symlink for nextcloud.conf

ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf

6. Enable Apache Modules

Nextcloud requires that mod_rewrite be enabled. Env, dir, and mime, should already be enabled, but it's a good idea to verify.

  • Required:
a2enmod rewrite
  • Recommended:
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
  • Restart Apache:
service apache2 restart

7. Make sure that the Nextcloud installation files are web accessible

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

8. Use your browser to complete the installation

Navigate to yourdomain.com/nextcloud and follow the instructions.

  1. Create a new admin user. It is recommended that you use an original password for the admin user.
  2. Leave the Data folder as the default directory. (/var/www/html/nextcloud/data)
  3. Your database user should be root and use the password you created during MariaDB's installation.
  4. Use the default localhost setting.

9. Installation is complete!

If you have any questions or concerns, please feel free to contact Media Temple's award winning 24/7 support. You may also want to consider checking out Nextcloud's official support docs

 

Resources

Nextcloud's website
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk