Nextcloud: setup file hosting service



  1. Meet the prerequisites:

    • A virtual server running Linux (e.g. Ubuntu server with IP address xxx.xxx.xxx.xxx)
    • A domain name (e.g. yyy.com)
  2. ssh to the virtual server, make sure that host is a sudo user.

    ssh [email protected]
    
  3. Setup the firewall.

    ufw allow OpenSSH
    ufw enable
    
  4. Install Nextcloud and create a account (e.g. account user1 with password password123).

    sudo snap install nextcloud
    sudo nextcloud.manual-install user1 password123
    
  5. Setup the domain on the server.

    sudo nextcloud.occ config:system:set trusted_domains 1 --value=yyy.com
    sudo ufw allow 80,443/tcp
    
  6. Setup Let’s Encrypt for SSL/TLS certificates.

    sudo nextcloud.enable-https lets-encrypt
    
  7. Setup DNA records on the domain provider. Point the hostname to the IP address of virtual server. (e.g. figure below shows the setting for Digital Ocean)

    WESTERLIES

  8. Wait until the domain presents a Nextcloud login page. Login with user1 and password123.

    WESTERLIES