How to Install Nextcloud on Ubuntu 18.04?


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Nextcloud on Ubuntu 18.04

Nextcloud is a self-hosted, open-source file syncing and sharing solution that allows you to store, edit, and share your files and data securely. With Nextcloud, you have full control over your data and can access it from anywhere using various devices.


Before installing Nextcloud, make sure you have:

  • An Ubuntu 18.04 server.
  • Sudo privileges.
  • Basic knowledge of the command line.

Installation Steps

Follow these steps to install Nextcloud on Ubuntu 18.04:

  1. Update your system by running the following commands:
sudo apt update
sudo apt upgrade
  1. Install Apache, PHP, and other required packages:
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mcrypt php-ldap php-zip php-curl
  1. Configure the database for Nextcloud:
sudo mysql

Once in the MySQL prompt, create a new database and user:

CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
  1. Download and install Nextcloud:
cd /tmp
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
sudo tar -xvf latest.tar.bz2 -C /var/www/html/
sudo chown -R www-data:www-data /var/www/html/nextcloud/
sudo chmod -R 755 /var/www/html/nextcloud/
  1. Configure Apache for Nextcloud:
sudo nano /etc/apache2/sites-available/nextcloud.conf

Add the following lines to the file:

Alias /nextcloud "/var/www/html/nextcloud/"

  Options +FollowSymlinks
  AllowOverride All

  Dav off

 SetEnv HOME /var/www/html/nextcloud
 SetEnv HTTP_HOME /var/www/html/nextcloud

sudo a2ensite nextcloud.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
  1. Enable HTTPS (optional but recommended):
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d your_domain.com
  1. Access Nextcloud:

You can now visit your Nextcloud installation by typing your server's IP or domain name followed by "/nextcloud" in your browser.

For example, if your server's IP is "", you would enter "".

Follow the on-screen instructions to complete the setup.

That's it! You have successfully installed Nextcloud on Ubuntu 18.04.

Refer A Friend
Get $25

Installing Nextcloud
Ubuntu 18.04
Nextcloud installation
Nextcloud on Ubuntu
Ubuntu 18.04 installation
Nextcloud setup
Nextcloud Ubuntu tutorial
Nextcloud installation guide
Ubuntu 18.04 Nextcloud
How to install Nextcloud on Ubuntu 18.04

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.