One place for hosting & domains

      Nextcloud

      How to Deploy Nextcloud on Linode with One-Click Apps


      Updated by Linode

      Contributed by
      Linode

      Installing Nextcloud OCA

      Nextcloud is an open source solution to file hosting and sharing. With Nextcloud, you can synchronize files from a local computer to the Linode server and share them with collaborators. Nextcloud’s customizable security features and intuitive user interface help to keep files safe and easy to manage.

      Before You Begin

      While a Domain Name is not strictly required, it is recommended. If you plan to use a domain name for the deployment, complete the following steps:

      1. Create a Linode API v4 access token. The Nextcloud One-Click App needs a Linode API v4 token to create a domain name system (DNS) record for the Nextcloud instance.

      2. Register (purchase) a domain name.

      3. Set the domain name to use Linode’s name servers. You need to do this on the domain registrar’s website and then wait up to 24 hours for the change to take effect.

      Deploy a NextCloud One-Click App

      Linode’s One-Click App Marketplace allow you to easily deploy software on a Linode using the Linode Cloud Manager. To access Linode’s One-Click App Marketplace:

      1. Log in to your Linode Cloud Manager account.

      2. From the Linode dashboard, click on the Marketplace button in the left-hand navigation menu.

      3. The Linode creation page will appear, with the One-Click and Marketplace tabs pre-selected.

      4. Under the Select App section, select the app you would like to deploy:

        Select a One-Click App to deploy

      5. Once you have selected the app, proceed to the app’s Options section and provide values for the required fields.

      NextCloud Options

      Field Description
      MySQL database root password The root user’s password for the Nextcloud database. Required.
      MySQL user password Your new MySQL user’s password. Required.

      Advanced Options

      LAMP Stack Options
      Field Description
      MySQL database username The name of a new MySQL user to create. If no value is provided, the user is named nextcloud. Required.
      MySQL database name The name to assign to the Nextcloud instance’s MySQL database. If no value is provided, the database is named nextcloud. Required.
      Linode Server Security Options
      Field Description
      Linode limited sudo username The username for a new limited user account with sudo privileges. Advanced Configuration.
      Linode limited user password The password for the new limited user account. Advanced Configuration.
      SSH Public Key A public key belonging to the user that accesses the Linode. If you do not have an authentication key-pair see the Securing Your Server guide for steps on creating one. Advanced Configuration.
      Enable passwordless sudo Enable passwordless sudo access for the limited user account. Advanced Configuration.
      Disable root access Disable root user access for the Linode server. Advanced Configuration.
      Domain Options
      Field Description
      Linode API v4 token The Linode API v4 token is required to create a domain name system (DNS) record for the Nextcloud instance. See the Getting Started with the Linode API guide to learn how to generate an API token. Advanced Configuration.
      Linode hostname The hostname to assign to the Linode server. If no value is provided, the hostname is set as nextcloud. Advanced Configuration.
      Domain name The domain name to use when creating a DNS record for the Linode. The One-Click app creates a subdomain named nextcloud. You can access the Nextcloud instance using the nextcloud subdomain; for example, www.nextcloud.example.com. Advanced Configuration.
      Admin email address The email address to use for the Nextcloud instance’s admin user. Advanced Configuration.
      Enable SSL Enable a free HTTPS CertBot SSL certificate on the Nextcloud domain. If you do not provide a value, no is set by default. Advanced Configuration.
      Timezone The timezone to use for the Linode server. If you do not provide a value, the Linode data center’s timezone is used. Refer to TZ database names for possible timezone values. Advanced Configuration.

      Linode Options

      After providing the app specific options, provide configurations for the Linode server:

      Configuration Description
      Select an Image Debian 10 is currently the only image supported by the Nextcloud One-Click App, and it is pre-selected on the Linode creation page. Required.
      Region The region where you would like the Linode to reside. In general, it’s best to choose a location that is closest to you. For more information on choosing a DC, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between the Linode server and each of our data centers. Required.
      Linode Plan Your Linode’s hardware resources. You should select a Linode plan type based on the amount of data you would like to store on the Nextcloud instance. You can always resize your Linode to a different plan later if you feel you need to increase or decrease the system resources. Required.
      Linode Label The name for the Linode server, which must be unique between all of the Linodes on your account. This name helps you identify the server in the Cloud Manager’s Dashboard. Required.
      Add Tags A tag to help organize and group the Linode resources. Tags can be applied to Linodes, Block Storage Volumes, NodeBalancers, and Domains.
      Root Password The primary administrative password for the Linode instance. This password must be provided when you log in to the Linode using SSH. It must be at least 6 characters long and contain characters from two of the following categories: lowercase and uppercase case letters, numbers, and punctuation characters. The root password can be used to perform any action on the server, so make it long, complex, and unique. Required.

      When you’ve provided all required Linode Options, click the Create button.

      Note

      Your Nextcloud app completes installation anywhere between 5-7 minutes after your Linode has finished provisioning. It is recommended that you wait the full 5-7 minutes prior to beginning the steps in the Getting Started after Deployment section of this guide. You may experience unexpected behavior if you begin those steps while your Nextcloud instance is still being deployed and setup by the One-Click App on the Linode instance.

      Getting Started after Deployment

      Log Into Your Nextcloud Instance

      1. Open a browser window and navigate to the Nextcloud instance’s domain. For example, enter nextcloud.example.com into the browser, replacing example.com with the value of your own domain. If you do not install the App with a domain name, the domain is the public IP address of the Linode appended with a forward slash and “nextcloud. For example, 192.168.17.43/nextcloud/.

      2. Create a Nextcloud admin account by providing values in the presented form.

        Create a Nextcloud admin account.

      3. In the Storage & database section, provide the MySQL database values that you used in the Nextcloud Options section.

        Provide your MySQL database values

      4. Click the Finish setup button to complete the configuration. The set up takes a couple of minutes to complete. The Nextcloud Hub page appears where you can upload files to the Nextcloud server.

        Nextcloud Hub

      Next Steps

      Note

      Currently, Linode does not manage software and systems updates for One-Click Apps. It is up to the user to perform routine maintenance on software deployed in this fashion.

      More Information

      You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

      This guide is published under a CC BY-ND 4.0 license.



      Source link

      How to Configure Nextcloud to use Linode Object Storage as an External Storage Mount


      Updated by Linode

      Contributed by
      Linode

      Marquee image for How to Configure Nextcloud to use Linode Object Storage as an External Storage Mount

      Nextcloud is an open source solution for file hosting and sharing. With Nextcloud, you can synchronize files from a local computer to the Linode server and share them with collaborators. Nextcloud’s customizable security features and intuitive user interface keeps the files safe and easy to manage.

      You can configure Nextcloud to enable external storage devices and services, like Linode Object Storage, to use as a secondary place to store files. Using Linode Object Storage to store files prevents you from running out of storage space limited by the Linode’s plan size. When using Nextcloud’s graphical user interface (GUI) to manage files, the external storage device shows up just like any other folder.

      Before You Begin

      1. Deploy a Nextcloud server instance. You can use the Linode Nextcloud One-Click App for an easy and quick deployment.

      2. Enable the Object Storage service on your Linode account.

      3. Generate Object Storage access keys.

      4. If you are not familiar with Linode Object Storage, review the How to Use Linode Object Storage guide.

      In This Guide

      Nextcloud Configurations

      Enable the External Storage App

      In this section you enable the External Storage Support Nextcloud app in order to use external storage sources.

      Note

      You must belong to the admin user group in order to install the External storage support app.

      1. Log into your Nextcloud instance.

      2. Click the user icon (or cog wheel) in the top navigation menu and select Apps.

        Access Nextcloud App settings.

      3. Click Files to access all Nextcloud apps related to file management, in the left-hand navigation menu.

        Access the Files App settings.

      4. Use the search field in the top navigation to narrow down the visible apps. You can enter external as your search term.

      5. Viewing the External storage support app, click the Enable button in order to install it to the Nextcloud instance.

        Enable the external storage support app.

      Create a New Linode Object Storage External Storage Mount

      After enabling the External Storage Support app, you are now ready to add a new external storage mount. You configure the new external storage mount to use the Linode Object Storage service.

      Note

      1. Click the user icon (or cog wheel) in the top navigation menu and select Settings.

        Access Nextcloud settings.

      2. In the left-hand navigation menu, under the Administration heading, click External Storages. The External Storages administration page appears.

        Access external storage configurations.

      3. In the Folder name text entry box, provide a name for the external storage directory.

      4. From the External Storage dropdown menu, select the Amazon S3 option.

        Note

        Linode Object Storage is S3-compatible. Nextcloud connects to Amazon’s Object Storage service by default, however, in the next step you override the default behavior to use Linode Object Storage hosts instead.

      5. Select Access Key from the Authentication dropdown menu.

      6. Under the Configuration heading, provide the following configurations:

        Configuration Description
        Bucket The name to assign to the Object Storage bucket. If this bucket name already exists in the data center region you select, an error occurs.
        Hostname The hostname used for the Object Storage region where the bucket is be stored. Refer to the Linode Object Storage Region and Hostname Values note located below this table for available hostname values.
        Port The port number to use to access the Object Storage host. This value must be 443.
        Region The data center region to store your Object Storage bucket. Refer to the Linode Object Storage Region and Hostname Values note located below this table for available data center region IDs.
        Enable SSL A configuration to enable secure sockets layer (SSL). This configuration must be enabled.
        Enable Path Style This configuration changes the default path format used by Nextcloud to access the Object Storage bucket. Do not enable this configuration.
        Legacy (v2) Authentication This configuration enables version 2 authentication to the Object Storage service. By default Nextcloud uses version 4 authentication that is compatible with Linode Object Storage. Do not enable this configuration.
        Access Key The value of the Access Key you created using the Linode Cloud Manager.
        Secret Key The value of the Secret Key you created using the Linode Cloud Manager.



        Linode Object Storage Region and Hostname Values

        Region Region ID Hostname
        Newark, NJ, USA us-east-1 us-east-1.linodeobjects.com
        Frankfurt, Germany eu-central-1 eu-central-1.linodeobjects.com
        Singapore, Singapore ap-south-1 ap-south-1.linodeobjects.com
      7. In the Available for text entry box, enter the group name(s) you would like to give access to the Linode Object Storage external storage. To learn more about user and group permissions related to external storage, see Nextcloud’s documentation.

      8. Click the check icon to save the configurations. If all your configurations are valid, you should see a green check box appear next to the external storage entry.

        Save your external storage configurations.

      9. Using the top navigation menu, click the Files menu item. The external storage folder appears in the list of folders.

        Access all your Nextcloud files.

      10. Click the external storage folder to view its contents. You should not see anything stored there yet.

      11. Test out the external storage mount by adding a file to the folder. Click the + button in the top breadcrumbs area of the screen and select Upload file.

        Upload a file to your Linode Object Storage bucket.

      12. The local file browser appears. Select a test file to add to the external storage folder and click Open. The file appears in the folder.

        Your should see your uploaded file appear in the folder.

        Note

      More Information

      You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

      This guide is published under a CC BY-ND 4.0 license.



      Source link

      How To Install and Configure Nextcloud on Ubuntu 20.04


      Introduction

      Nextcloud, a fork of ownCloud, is a file sharing server that permits you to store your personal content, like documents and pictures, in a centralized location, much like Dropbox. The difference with Nextcloud is that all of its features are open-source. It also returns the control and security of your sensitive data back to you, thus eliminating the use of a third-party cloud hosting service.

      In this tutorial, we will install and configure a Nextcloud instance on an Ubuntu 20.04 server.

      Prerequisites

      In order to complete the steps in this guide, you will need the following:

      • A non-root** sudo-enabled user and firewall configured on your server**: You can create a user with sudo privileges and set up a basic firewall by following the Initial Server Setup with Ubuntu 20.04.
      • (Optional) A domain name pointed to your server: We will be securing connections to the Nextcloud installation with TLS/SSL. Nextcloud can set up and manage a free, trusted SSL certificate from Let’s Encrypt if your server has a domain name. If not, Nextcloud can set up a self-signed SSL certificate that can encrypt connections, but won’t be trusted by default in web browsers. If you are using DigitalOcean, you can read our DNS documentation to learn how to add domains to your account and manage DNS records, if you intend to use Let’s Encrypt.

      Once you have completed the above steps, continue on to learn how to set up Nextcloud on your server.

      Step 1 – Installing Nextcloud

      We will be installing Nextcloud using the Snap packaging system. This packaging system, available on Ubuntu 20.04 by default, allows organizations to ship software, along with all associated dependencies and configuration, in a self-contained unit with automatic updates. This means that instead of installing and configuring a web and database server and then configuring the Nextcloud app to run on it, we can install the snap package which handles the underlying systems automatically.

      To download the Nextcloud snap package and install it on the system, type:

      • sudo snap install nextcloud

      The Nextcloud package will be downloaded and installed on your server. You can confirm that the installation process was successful by listing the changes associated with the snap:

      Output

      ID Status Spawn Ready Summary 4 Done today at 16:12 UTC today at 16:12 UTC Install "nextcloud" snap

      The status and summary indicate that the installation was completed without any problems.

      Getting Additional Information About the Nextcloud Snap

      If you’d like some more information about the Nextcloud snap, there are a few commands that can be helpful.

      The snap info command can show you the description, the Nextcloud management commands available, as well as the installed version and the snap channel being tracked:

      Snaps can define connections they support, which consist of a slot and plug that, when hooked together, gives the snap access to certain capabilities or levels of access. For instance, snaps that need to act as a network client must have the network connection. To see what snap connections this snap defines, type:

      • snap connections nextcloud

      Output

      Interface Plug Slot Notes network nextcloud:network :network - network-bind nextcloud:network-bind :network-bind - removable-media nextcloud:removable-media - -

      To learn about all of the specific services and apps that this snap provides, you can take a look at the snap definition file by typing:

      • cat /snap/nextcloud/current/meta/snap.yaml

      This will allow you to see the individual components included within the snap, if you need help with debugging.

      Step 2 – Configuring an Administrative Account

      There are a few different ways you can configure the Nextcloud snap. In this guide, rather than creating an administrative user through the web interface, we will create one on the command line in order to avoid a small window where the administrator registration page would be accessible to anyone visiting your server’s IP address or domain name.

      To configure Nextcloud with a new administrator account, use the nextcloud.manual-install command. You must pass in a username and a password as arguments:

      • sudo nextcloud.manual-install sammy password

      The following message indicates that Nextcloud has been configured correctly:

      Output

      Nextcloud was successfully installed

      Now that Nextcloud is installed, we need to adjust the trusted domains so that Nextcloud will respond to requests using the server’s domain name or IP address.

      Step 3 – Adjusting the Trusted Domains

      When installing from the command line, Nextcloud restricts the host names that the instance will respond to. By default, the service only responds to requests made to the “localhost” hostname. We will be accessing Nextcloud through the server’s domain name or IP address, so we’ll need to adjust this setting to accept these type of requests.

      You can view the current settings by querying the value of the trusted_domains array:

      • sudo nextcloud.occ config:system:get trusted_domains

      Output

      localhost

      Currently, only localhost is present as the first value in the array. We can add an entry for our server’s domain name or IP address by typing:

      • sudo nextcloud.occ config:system:set trusted_domains 1 --value=example.com

      Output

      System config value trusted_domains => 1 set to string example.com

      If we query the trusted domains again, we will see that we now have two entries:

      • sudo nextcloud.occ config:system:get trusted_domains

      Output

      localhost example.com

      If you need to add another way of accessing the Nextcloud instance, you can add additional domains or addresses by rerunning the config:system:set command with an incremented index number (the “1” in the first command) and adjusting the --value.

      Step 4 – Securing the Nextcloud Web Interface with SSL

      Before we begin using Nextcloud, we need to secure the web interface.

      If you have a domain name associated with your Nextcloud server, the Nextcloud snap can help you obtain and configure a trusted SSL certificate from Let’s Encrypt. If your Nextcloud server does not have a domain name, Nextcloud can configure a self-signed certificate which will encrypt your web traffic but won’t be automatically trusted by your web browser.

      With that in mind, follow the section below that matches your scenario.

      Option 1: Setting Up SSL with Let’s Encrypt

      If you have a domain name associated with your Nextcloud server, the best option for securing your web interface is to obtain a Let’s Encrypt SSL certificate.

      Start by opening the ports in the firewall that Let’s Encrypt uses to validate domain ownership. This will make your Nextcloud login page publicly accessible, but since we already have an administrator account configured, no one will be able to hijack the installation:

      • sudo ufw allow 80,443/tcp

      Next, request a Let’s Encrypt certificate by typing:

      • sudo nextcloud.enable-https lets-encrypt

      You will first be asked whether your server meets the conditions necessary to request a certificate from the Let’s Encrypt service:

      Output

      In order for Let's Encrypt to verify that you actually own the domain(s) for which you're requesting a certificate, there are a number of requirements of which you need to be aware: 1. In order to register with the Let's Encrypt ACME server, you must agree to the currently-in-effect Subscriber Agreement located here: https://letsencrypt.org/repository/ By continuing to use this tool you agree to these terms. Please cancel now if otherwise. 2. You must have the domain name(s) for which you want certificates pointing at the external IP address of this machine. 3. Both ports 80 and 443 on the external IP address of this machine must point to this machine (e.g. port forwarding might need to be setup on your router). Have you met these requirements? (y/n)

      Type y to continue.

      Next, you will be asked to provide an email address to use for recovery operations:

      Output

      Please enter an email address (for urgent notices or key recovery):

      Enter your email and press Enter to continue.

      Finally, enter the domain name associated with your Nextcloud server:

      Output

      Please enter your domain name(s) (space-separated): example.com

      Your Let’s Encrypt certificate will be requested and, provided everything went well, the internal Apache instance will be restarted to immediately implement SSL:

      Output

      Attempting to obtain certificates... done Restarting apache... done

      You can now skip ahead to the next step to sign into Nextcloud for the first time.

      Option 2: Setting Up SSL with a Self-Signed Certificate

      If your Nextcloud server does not have a domain name, you can still secure the web interface by generating a self-signed SSL certificate. This certificate will allow access to the web interface over an encrypted connection, but will be unable to verify the identity of your server, so your browser will likely display a warning.

      To generate a self-signed certificate and configure Nextcloud to use it, type:

      • sudo nextcloud.enable-https self-signed

      Output

      Generating key and self-signed certificate... done Restarting apache... done

      The above output indicates that Nextcloud generated and enabled a self-signed certificate.

      Now that the interface is secure, open the web ports in the firewall to allow access to the web interface:

      • sudo ufw allow 80,443/tcp

      You are now ready to log into Nextcloud for the first time.

      Step 5 – Logging in to the Nextcloud Web Interface

      Now that Nextcloud is configured, visit your server’s domain name or IP address in your web browser:

      https://example.com
      

      Note: If you set up a self-signed SSL certificate, your browser may display a warning that the connection is insecure because the server’s certificate is not signed by a recognized certificate authority. This is expected for self-signed certificates, so feel free to click through the warning to proceed to the site.

      Since you have already configure an administrator account from the command line, you will be taken to the Nextcloud login page. Enter the credentials you created for the administrative user:

      Nextcloud login page

      Click the Log in button to log in to the Nextcloud web interface.

      The first time you enter, a window will be displayed with some introductory text and links to various Nextcloud clients that can be used to access your Nextcloud instance:

      Nextcloud client modal

      Click through to download any clients you are interested in, or exit out of the window by clicking the X in the upper-right corner. You will be taken to the main Nextcloud interface, where you can begin to upload and manage files:

      Nextcloud main page

      Your installation is now complete and secured. Feel free to explore the interface to get more familiarity with the features and functionality of your new system.

      Conclusion

      Nextcloud can replicate the capabilities of popular third-party cloud storage services. Content can be shared between users or externally with public URLs. The advantage of Nextcloud is that the information is stored securely in a place that you control.

      For additional functionality, take a look at Nextcloud’s app store, where you can install plugins to extend the service’s capabilities.



      Source link