Nextcloud- Developer Guide

Nextcloud- Developer Guide

Welcome to the Meetrix Nextcloud Developer Guide! Nextcloud is an open-source, self-hosted file storage and sync platform that combines powerful collaboration tools with a user-friendly interface. Perfect for managing documents, tasks, and more across desktop, mobile, and web, Nextcloud provides the flexibility and security you need. In this guide, we’ll take you through the steps to deploy and customize Nextcloud on AWS Marketplace. Let’s get started!

Prerequisites

Before you get started with the Nextcloud AMI, ensure you have the following prerequisites:

Launching the AMI

Step 1: Find and Select 'Nextcloud' AMI

  1. Log in to your AWS Management Console.
  2. Navigate to the 'Nextcloud' in  AWS Marketplace.

Step 2:  Initial Setup & Configuration

  1. Click the "Continue to Subscribe" button.
  2. After subscribing, you will need to accept the terms and conditions. Click on "Accept Terms" to proceed.
  3. Please wait for a few minutes while the processing takes place. Once it's completed, click on "Continue to Configuration".
  4. Select the "CloudFormation script to deploy Nextcloud" as the fulfilment option and choose your preferred region on the "Configure this software" page. Afterward, click the "Continue to Launch" button.
  5. From the "Choose Action" dropdown menu in "Launch this software" page, select "Launch CloudFormation" and click "Launch" button.

Create CloudFormation Stack

Step1: Create stack

  1. Ensure the "Template is ready" radio button is selected under "Prepare template".

2. Click "Next".

Step2: Specify stack options

  1. Provide a unique "Stack name".
  2. Provide the "Admin Email" for SSL generation.
  3. For "DeploymentName", enter a name of your choice.
  4. Provide a public domain name for "DomainName" (Nextcloud will automatically try to setup SSL based on provided domain name).
  5. Choose an instance type, "InstanceType" (Recommended: t3a.small).
    This instance type depends on the extra applications you wish to install along with the Nextcloud. Please refer to the Selecting the instance type section of this blog.
  6. Select your preferred "keyName".
  7. Set "SSHLocation" as "0.0.0.0/0". (If you want to restrict the ssh access to the server, you can set a CIDR block or IP address here)
  8. Keep "SubnetCidrBlock" as "10.0.0.0/24".
  9. Keep "VpcCidrBlock" as "10.0.0.0/16".
  10. Click "Next".

Step3: Configure stack options

  1. Choose "Roll back all stack resources" and "Delete all newly created resources" under the "Stack failure options" section.
  2. Click "Next".

Step4: Review

  1. Review and verify the details you've entered.

2. Tick the box that says, "I acknowledge that AWS CloudFormation might create IAM resources with custom names".

3. Click "Submit".

Afterward, you'll be directed to the CloudFormation stacks page.

Please wait for 5-10 minutes until the stack has been successfully created.

Update DNS

Step1: Copy IP Address

Copy the public Ip labeled "PublicIp" in the "Outputs" tab.

Step2: Update DNS

  1. Go to AWS Route 53 and navigate to "Hosted Zones".
  2. From there, select the relevant Hosted Zone for your provided "DomainName".
  3. Click on Create record.

3. Add record name and then paste the copied "PublicIp" into the "value" textbox.

4. Click "Save".

Access Nextcloud

1. You can setup the Nextcloud application through the "InitialSetupUrlDomain" provided in the "Outputs" tab. This will allow you to install the nextcloud and related applications.

2. You will be directed to a page like the following. Please save the passphrase. Click on Open Nextcloud AIO Login.

3. Enter the passphrase and click Log in

4. You will be directed to the initial setup page.

5. Please enter your domain name in the text box and click submit domain.

6. You can install several optional applications along with the nextcloud (ex: Collabora, ClamAV, ...). Tick the preferred options and click on save. Please check whether you have enough RAM and vCPUs in the instance. (See the "Selecting the instance type" note)

7. Then click on Download and start containers button.

Note: Selecting the instance type

  • When selecting the instance type, please read the below requirements and note down the required RAM and vCPU.
  • Go to AWS instance type page and select the appropriate type for your deployment. https://aws.amazon.com/ec2/instance-types/

8. After starting the containers in the previous step, you will see the screen like the following (see the next step).

9. Save the login details and click on Open your Nextcloud button.

10. Now log into the Nextcloud dashboard using the saved credentials.

11. Now you have successfully logged into the Nextcloud Dashboard.

12 Next time when you need to log into the dashboard, you can just use the domain_name (You can also find this in the output tab of the cloudformation stack page)

Access the Nextcloud Setup Interface

  1. To access the setup interface of the deployment, please go to the below link. (replace domain_name with your domain name)

https://<domain_name>/settings/admin/overview

2. Then click on Open Nextcloud AIO Interface

Backup

1. Go to the Setup Interface.

2. Enter the location of the backup (ex: /home/ubuntu)

3. Click on Submit backup location

4. Save the encryption password to access the backups later

5. Next click on Create backup button. (Note that all the containers will be stopped until the backup process is completed)

6. If you want to reset the backup location, click on Reset backup location button.

  • You won't be able to start the containers while the backup process is ongoing

7. After the successful backup process, you need to manually turn on the containers by pressing Start containers button

Run the Optional Containers

1. Stop the containers

2. Select the needed applications and click on save.
(In the below example Collabora container is selected)

3. Click on Start and update containers buton.

4. You will see the Collabora container is running

Shutting Down Nextcloud

1. Click the link labeled "Instance" in the "Resources" tab to access the EC2 instance, you will be directed to the Nextcloud instance in EC2.

2. Select the Nextcloud instance by marking the checkbox and click "Stop instance" from the "Instance state" dropdown. You can restart the instance at your convenience by selecting "Start instance".

Remove Nextcloud

Delete the stack that has been created in the AWS Management Console under 'CloudFormation Stacks' by clicking the 'Delete' button.

Troubleshoot

a. Check logs

1. Click on the Running in front of the container name.

2. You will see the logs in a new tab

b. Check Console

  • You can open the browser console in the meeting page and check for any visible errors

c. Check Instance Storage (EBS)

  • Log into the server and run the below command
df -h
  • If the used volume is between 90-100%, it is better to resize EBS volume. Please follow AWS documentation to increase the EBS volume.
  • Then reboot the instance and start the containers

Conclusion

The Meetrix Nextcloud Developer Guide is your comprehensive resource for setting up and fine-tuning Nextcloud in your projects. Whether you're a seasoned developer or new to the platform, this guide offers clear, step-by-step instructions for deploying Nextcloud through AWS Marketplace. Nextcloud provides a self-hosted, open-source platform that integrates smoothly with your existing systems, offering powerful file storage, synchronization, and collaboration features. It’s an ideal solution for managing documents, tasks, and more, all while maintaining full control over your data. With this guide, you’ll be equipped to harness the full capabilities of Nextcloud to build a secure and efficient file management system that meets your needs.

Technical Support

Reach out to Meetrix Support (aws@meetrix.io)  for assistance with Nextcloud issues.

Discover Seamless Meetings with >>>
Meetrix