Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Google Cloud

Install ownCloud on Ubuntu 18.04 with Let’s Encrypt- Google Cloud

by Cloudbooklet
4 years ago
in Google Cloud, Compute Engine
Install Owncloud On Ubuntu 18.04 - Google Cloud
ShareTweetSendShare
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

Install ownCloud on Ubuntu 18.04 – Google Cloud. ownCoud is an open-source, self-hosted file syncing and file sharing collaboration platform, similar to OneDrive, Google Drive and others. OwnCloud has free desktop client and the free ownCloud app, you can access your photos, documents and films at any time from any where. It keeps your files […]

ADVERTISEMENT

Install ownCloud on Ubuntu 18.04 – Google Cloud. ownCoud is an open-source, self-hosted file syncing and file sharing collaboration platform, similar to OneDrive, Google Drive and others.

OwnCloud has free desktop client and the free ownCloud app, you can access your photos, documents and films at any time from any where. It keeps your files synced and always up-to-date.

This tutorial is tested on Google Cloud Platform with the following infrastructure setup.

ADVERTISEMENT
  • Compute Engine VM Instance: (1.75 GB RAM with SSD 10 GB).
  • Cloud SQL 2nd Generation Instance: 614 MB RAM with MySQL 5.7

So this setup runs fine on other cloud platforms like AWS, Azure or any VPS or any Dedicated servers running Ubuntu 18.04.

Prerequisites

  • A running Compute Engine, see the Setting up Compute Engine Instance with Ubuntu 18.04
  • Initial Ubuntu Server Set up.
  • Setup Google Cloud DNS for your Domain name.
  • A running Cloud SQL instance, see How to set up Cloud SQL in Google Cloud

Step 1: Install Apache

Apache2 is available by default in the Ubuntu repository, so you can install it directly using the apt command.

You might also like

How To Setup Ssh Keys On Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

4 months ago
Draggan Ai Editing Tool Install And Use Draggan Photo Editor

DragGAN AI Editing Tool Install and Use DragGAN Photo Editor

4 months ago
sudo apt install apache2

This will install apache2 and all required dependencies.

ADVERTISEMENT

Step 2: Setup Firewall

Now you can set up Uncomplicated Firewall (UFW) with Apache to allow public access on default web ports for HTTP and HTTPS

sudo ufw app list

You will see all listed applications.

ADVERTISEMENT
Output
Available applications:
Apache
Apache Full
Apache Secure
OpenSSH
sudo ufw allow 'Apache Full'

With this command you can view the status of UFW.

sudo ufw status

You will see the output as follows.

ADVERTISEMENT
Output
Status: active
To Action From
-- ------ ----
Apache Full ALLOW Anywhere
OpenSSH ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)

Step 3: Configure Apache

Once Apache is installed is is started automatically and already be up and running.

Every process in Apache is managed with the systemctl command. Check the status of Apache with the following command.

ADVERTISEMENT
sudo systemctl status apache2

Step 4: Install PHP 7.3

Here we will install PHP 7.3 the current supported version for ownCloud. Add the ondrej/php which has PHP 7.3 package and other required PHP extensions.

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

Once you have added the PPA you can execute the following command to install PHP 7.3.

sudo apt install php7.3 libapache2-mod-php7.3 openssl php7.3-common php7.3-mysql php7.3-xml php7.3-xmlrpc php7.3-curl php7.3-gd php7.3-imagick php7.3-dev php7.3-imap php7.3-mbstring php7.3-zip php7.3-intl php7.3-json php-ssh2 php-apcu php-redis redis-server unzip mysql-client -y

Step 5: Configure PHP 7.3 for ownCloud

Now we configure PHP for Web Applications by changing some values in php.ini file.

For PHP 7.3 with Apache the php.ini location will be in following directory.

sudo nano /etc/php/7.3/apache2/php.ini

Hit F6 for search inside the editor and update the following values for better performance.

upload_max_filesize = 64M 
post_max_size = 64M 
memory_limit = 256M 
max_execution_time = 600 
max_input_vars = 5000 
max_input_time = 1000

Once you have modified your PHP settings you need to restart your Apache for the changes to take effect.

Step 6: Download ownCloud

Now you can download latest ownCloud package from the official website using the wget command.

wget https://download.owncloud.org/community/owncloud-10.3.2.zip

Once the download is completed you can extract the zip file inside the /var/www/html directory using the following command.

sudo unzip owncloud-10.3.2.zip  -d /var/www/html

Now ownCloud will be located inside this directory /var/www/html/owncloud

Now you need to setup correct permissions.

sudo chmod -R 755 /var/www/html/owncloud
sudo chown -R www-data:www-data /var/www/html/owncloud

Step 7: Configure Apache for ownCloud

Disable default Apache configuration.

sudo a2dissite 000-default

Create a new virtual host configuration.

sudo nano /etc/apache2/sites-available/owncloud.conf

Paste the following configurations in the new file.

<VirtualHost *:80>
     ServerAdmin admin@domainname.com
     ServerName domainname.com
     ServerAlias www.domainname.com

     DocumentRoot /var/www/html/owncloud

     <Directory /var/www/html/owncloud>
         Options Indexes FollowSymLinks
         AllowOverride All
         Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log 
     CustomLog ${APACHE_LOG_DIR}/access.log combined 
 </VirtualHost>

Enable the new configuration.

sudo a2ensite domainname.conf

Step 8: Install Let’s Encrypt SSL

HTTPS is a protocol for secure communication between a server (instance) and a client (web browser). Due to the introduction of Let’s Encrypt, which provides free SSL certificates, HTTPS are adopted by everyone and also provides trust to your audiences.

sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt install python-certbot-apache

Now we have installed Cert bot by Let’s Encrypt for Ubuntu 18.04, run this command to receive your certificates.

sudo certbot --apache --agree-tos --redirect -m [email protected] -d domainname.com -d www.domainname.com

Select the appropriate option and hit Enter

This command will install Free SSL, configure redirection to HTTPS and restarts the Apache server.

Step 9: Renewing SSL Certificate

Certificates provided by Let’s Encrypt are valid for 90 days only, so you need to renew them often. So, let’s test the renewal feature using the following command.

sudo certbot renew --dry-run

This command will test the certificate expiry and configures the auto-renewable feature.

Now you are ready to install ownCloud from your web interface.

Step 10: Install ownCloud

Once all the above setup is done, go to your web browser and enter your domain name. You should see the welcome page to create a new account and setup database.

Install Owncloud

Enter the appropriate details of your CloudSQL connection details and click Finish setup.

Wait for sometime for the setup to complete.

Once the installation is done you can login using the credentials you set and start using ownCloud.

Owncloud Dashboard

Get your Professional Google Cloud Architect certificate with this easy to learn course now.

Conclusion

Now you have learned how to install ownCloud on Ubuntu 18.04 with PHP 7.3 and secure the installation using Let’sEncrypt SSL certificate.

Thanks for your time. If you face any problem or any feedback, please leave a comment below.

Tags: Compute EngineGoogle Cloud PlatformPHPUbuntu 18.04
Share1Tweet1SendShare
Cloudbooklet

Cloudbooklet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

Set Up Deep Learning With Nvidia, Cuda, Cudnn On Ubuntu

How to Set Up Deep Learning with Nvidia, CUDA, cuDNN on Ubuntu 22.04

7 months ago
How To Install Or Upgrade Php 8.2 On Ubuntu 22.04

How to Install or Upgrade PHP 8.2 on Ubuntu 22.04

9 months ago
How To Change Timezone On Ubuntu 22.04

How to Change Timezone on Ubuntu 22.04

1 year ago
How To Install Ansible On Ubuntu 22.04

How to Install Ansible on Ubuntu 22.04

1 year ago

Follow Us

Trending Articles

Covers Ai

Create High Quality AI Cover Song with Covers AI

September 18, 2023

Create a Professional Website with Wix AI Website Builder

10 Best AI Song Generator in 2023 (Free and Paid)

How to Create and Customize Stunning Contact Poster on iPhone

AI Annotation Jobs: Everything You Need to Know

AI Statistics and Trends: What You Need to Know in 2023

Popular Articles

Ai Cover Song

6 Best AI Cover Song Generators for Free Online

September 13, 2023

How to Find Songs on YouTube by Humming the Tune

7 Best Deepswap AI Free Online Tools to Create FaceSwap Videos and Photos

OpenAI Introduces ChatGPT Enterprise for Businesses

How to Use the Donne App: A Step-by-Step Guide for Fashion Lovers

Remodeled AI: How to Transform Your Home with AI Interior Design

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Cloudbooklet Logo

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Applications
  • Linux

Cloudbooklet © 2023 All rights reserved.