Deploying Nextcloud on Oracle Cloud with MySQL Database Service and Object Storage


If like me you like to share some data between all your devices (presentations, keypassX file, pictures, …), you probably use a cloud platform to store all that.

I do like to keep control of such solution, I used ownCloud and now I’m using Nextcloud.

In this article I will show you how to easily deploy Nextcloud on Oracle Cloud (OCI) using MySQL Database Service (MDS) and Object Storage.

The easiest way to deploy solutions on OCI is to use Terraform and Resource Manager’s Stack.

If you already have an account on Oracle Cloud, just click on the button:

If not, you can try MySQL Database Service for Free with extra $300 by using this link:

The Terraform modules can also by used without Resource Manager and are available on GitHub:

Let’s see it in action as soon as you click on the Deploy to Oracle Cloud button :

Once accepted the Oracle Terms of Use, the wizard is accessible:

We just click next. Then we need at least to provide the password for the MySQL admin user. You can see that there is also the user_ocid prefilled, you should not touch it. If you want, you can enable High Availability for you MySQL Database Service

Then you have the details related to Nextcloud like credentials and Object Storage Bucket’s name:

If you have not enabled HA, you can enable HeatWave Cluster if the selected Shape is compatible:

You can then process by clicking on Next.

The next screen is an overview, you can enable “Run Apply” and click on Create.

The job will start… and when finished, it will be green like this if everything went smoothly and you can click on Outputs to get the required information to use Nextcloud:

We just need to use the public IP in a browser with the credentials (values of nextcloud_admin & nextcloud_admin_pass):

And as you can see there is already an external storage configured to point to Object Storage:

Let’s add a file in it:

And we can see that it’s also available in OCI Object Storage’s Bucket:

And this is it, no need to configure mount point, customer private key and secret, bucket’s hostname etc… all this is automatic and directly enabled when using these modules.

cerbot is also already installed on the Nextcloud compute instance. If you configure your DNS to point on the public IP, you can easily enable https.

This is the architecture of what we just deployed: