Skip to content

Nextcloud

In this article

Information

Nextcloud is an open source server software. It allows you to create your own cloud service for data storage and collaboration. It is based on the PHP programming language and provides the ability to use various databases such as MySQL, PostgreSQL and SQLite. Nextcloud supports client-level data encryption, which ensures security while transferring data over the Internet. With the help of Nextcloud, you can synchronize data between different devices and work online and offline. Nextcloud offers an extensive set of collaboration tools such as document exchange, task management, calendars, and contacts. Nextcloud can also be integrated with other services such as Google Drive, Dropbox and Microsoft OneDrive.

Nextcloud. Key Features

Nextcloud has many features that make it an effective tool for storing and processing data:

  • File storage. Nextcloud allows you to store files on a server and access them through a web interface or through applications for desktop computers and mobile devices.
  • File synchronization. Ability to synchronize files between different devices makes the service a convenient tool for working in various conditions.
  • Version control. Nextcloud allows you to save multiple versions of the same file. It will also let you restore previous versions if needed.
  • Access to files through the web interface. Nextcloud has a web interface that allows you to access files through a browser, making it a convenient tool to work on any device.
  • Management of calendars and tasks. Nextcloud lets you create and manage calendars and tasks, making it a useful tool for organization.
  • Contact management. Nextcloud allows you to create and manage contacts, making it a handy tool for managing communications.
  • Access to files through applications. Nextcloud has applications for desktop computers and mobile devices which let you access files through them.
  • Expandability. Nextcloud has many additional applications that can be installed and used to expand the functionality. They are applications for online collaboration, document editing, project management, etc.

Deployment Features

  1. OC with kernel 5.6 and higher, installation on RHEL 8+ and Ubuntu 20.04+ families is possible.
  2. Nextcloud is included in the kernel and no additional installation is required. We provide a web interface through which the service is installed and configured.
  3. The configuration files are located in:
    • /opt/nextcloud - Nextcloud installation and configuration;
    • /opt/nginx - installation and configuration of Nginx service;
    • /opt/nextcloud/compose.yml - run docker compose, which starts a bunch of Nextcloud + Onlyoffice containers.
  4. SSL certificate generation is based on jonasal/nginx-certbot assembly.
  5. These commands may be necessary to update containers' versions and edit the configuration file.

    • To stop containers, run the command
    cd /opt/nextcloud/
    

    Then

    docker compose down
    
    • To enable containers, run the command
    cd /opt/nextcloud/
    

    Then

    docker compose up -d
    
  6. Docker compose up -d runs compose.yml file, which downloads and launches the following containers:

    • db - container, PostgreSQL is downloaded, and the following settings are made:
      • The Nextcloud database (or base) is created;
      • The Nextcloud user is generated;
      • SSH password (Is delivered via email);
      • The standard port is 5432.
    • redis - container, storing calls to Nextcloud in memory and only after records in the PostgreSQL database. PotgreSQL
    • app - container, Nextcloud service has the following parameters:
      • Access to an application is carried out from a web browser or mobile app using the link https://nextcloud(server_id).hostkey.in (for example, https://nextcloud16094.hostkey.in);
      • login: admin;
      • password: from ssh;
    • onlyoffice-document-server - container, OnlyOffice service runs on port 80.

    Attention

    This container starts within 6 minutes. At this time, you can go to the Nextcloud web interface, upload and download files, but the ability to edit documents will appear only 6 minutes after running docker compose up -d (it takes some time to start some components).

    • nginx - container, Nginx service that accepts requests on ports 80 and 443 and redirects requests to the Nextcloud container.

Getting started after deploying Nextcloud

A notification will be sent to the e-mail specified during registration that the server is ready for work after paying for the order. It will contain the IP address of the VPS, as well as the login and password for the connection. Clients of our company manage the hardware in the server`s and API control panel — Invapi.

You can find the authorization data either in the Info >> 'Tags tab of the server control panel or in the email that was sent.

  • Link to access the Nextcloud dashboard with a web interface: in the webpanel tag;
  • Login: admin;
  • Password: Sent to your email address after the server is ready for use following software deployment.

After moving to the Nextcloud control panel, you must enter your login and password:

After logging in successfully, you can start using the service.

Note

For more information on the basic settings of Nextcloud, see documentation of the developers.

Attention

To order the Nextcloud server, you should choose a server in accordance with the recommendations of the developers.

Changing the Domain name

To change the domain name, you need to:

  1. Modify the current domain (nextcloud.hostkey.in) to the new one in the /opt/nginx/user_conf.d/nextcloud<server_id>.hostkey.in.conf file in the following lines:

    Line 4:

    server_name nextcloud<server_id>.hostkey.in;
    

    Line 15:

    server_name nextcloud<server_id>.hostkey.in;
    

    Line 17:

    ssl_certificate /etc/letsencrypt/live/nextcloud<server_id>/fullchain.pem;
    

    Line 18:

    ssl_certificate_key /etc/letsencrypt/live/nextcloud<server_id>/privkey.pem;
    

    Line 19:

    ssl_trusted_certificate /etc/letsencrypt/live/nextcloud<server_id>/chain.pem;
    

    Also, rename the file itself, replacing the old domain name with the new one in its name. For example, if the new domain is example.com, the new file name will be /opt/nginx/user_conf.d/example.com.conf.

    Make sure that the old domain is replaced with the new one in all mentioned lines. This is crucial for Nextcloud to work correctly with the new domain name.

  2. Modify the current domain (nextcloud.hostkey.in) to the new one in the /opt/nextcloud/compose.yml file in the following lines:

    Line 40:

    - OVERWRITECLIURL=https://nextcloud<server_id>.hostkey.in/
    

    Line 41:

    - OVERWRITEHOST=nextcloud<server_id>.hostkey.in
    
  3. Modify the current domain (nextcloud.hostkey.in) to the new one in the /opt/nextcloud/set_configuration.sh file in the following lines:

    Line 11:

    if ! grep -q "nextcloud<server_id>.hostkey.in" trusted_domain.tmp; then
    

    Line 13:

    docker exec -u www-data app-server php occ --no-warnings config:system:set trusted_domains $TRUSTED_INDEX --value="nextcloud<server_id>.hostkey.in"
    

    Line 23:

    docker exec -u www-data app-server php occ --no-warnings config:system:set onlyoffice StorageUrl --value="https://nextcloud<server_id>.hostkey.in/"
    
  4. Navigate to the /opt/nextcloud directory and execute:

    docker compose down && docker compose up -d
    
  5. Then run:

    bash /opt/nextcloud/set_configuration.sh
    

Ordering Nextcloud using the API

To install this software using the API, follow these instructions.