Linux Format

Seed your own cloud

Escape the clutches of the ‘evil empire’ – but not its convenienc­es.

-

Google (and its cloud-centric brethren) lure people by the ease with which they make your data omnipresen­t. Any content that you’ve hosted with Google can be accessed from anywhere on the internet. The downside to this approach, as we’ve been seening, is that you need to trust your data to a corporatio­n’s servers who host it for free with the intention of monetising it by some other means, which exposes you to some sort of privacy intrusion.

At the other end of the spectrum are the rising number of online services that promise to keep your data from prying eyes. We’ve explored many such services in this feature. Unlike Google’s, however, these services cost money. There is another option that’ll let you have your cake and eat it too. Self-hosting is a popular route taken by many to save their data from the grips of internet monopolies. In the past such options have only really been accessible to uber-geeks who had the skills to poke holes in their firewalls without exposing their home network to the perils of the internet. Open source solutions such as Nextcloud have democratis­ed this knowledge and essentiall­y turned self-hosting into an app that anyone can deploy.

Nextcloud isn’t the only open source self-hosting cloud platform available, but it is surely the most diverse. It offers several deployment options as well as sync clients for all popular desktop and mobile platforms. Nextcloud also has meaningful sharing options with privacy and security in mind. End-to-end encryption and support for popular authentica­tion mechanisms, plus specific permission controls, make it stand out from the competitio­n. On top of that, Nextcloud has an Apps ecosystem that’s flush with a large number of useful official and third-party apps that’ll help you replace many of the popular privacyint­ruding online services.

roll out Nextcloud

There are multiple mechanisms for deploying Nextcloud. The easiest, mouse-friendly option is to run it on a Virtual Private Server (VPS). You can find several VPS vendors that offer one-click Nextcloud deployment­s; find the one that’s closest to home and which suits your data-hosting requiremen­ts, and you’re good to go.

Our preferred option, though, involves a little effort, but is virtually free and most importantl­y keeps our data on computers under our direct supervisio­n. Hosting a Nextcloud instance on your computers which is accessible from anywhere on the web isn’t much work these days but offers unmatched advantages.

There are several ways you can deploy Nextcloud on your hardware. You can follow our detailed guide in LXF239 to configure a server from the ground up.

A faster way is to use the official Nextcloud Virtual Machine (VM) to get a secure instance up and running

with little effort. The official Nextcloud VMS are created by Sweden’s T&M Hansson IT AB. The company offers four preconfigu­red VMS with different-sized disks, from 40GB to 2TB. The VMS are available in the OVA format which works on the free (but proprietar­y) Vmware Player as well as on our preferred open source app,

Virtualbox. Head to www.hanssonit.se/nextcloud-vm and grab the OVA file for the Nextcloud VM that’s sized for your requiremen­ts.

When it’s finished downloadin­g, fire up Virtualbox and head to File > Import Appliance. Point the app to the downloaded OVA file and click the Import button. By default the VM is allocated 2GB of RAM. This value is editable, and for better performanc­e earmark at least 4GB. Also editable are the CPU values. By default the VM uses one CPU and two cores, but you can get better performanc­e by pushing up the values if you have more resources available on the physical host.

Continue to Import the VM after allocating more resources to the VM. The process will take some time. Once it’s done, bring up the VM’S configurat­ion page and head to the Network section to make sure it connects to the network adapter in bridged mode. You’ll also have to make sure the Nextcloud VM has a static IP address, Most routers enable you to set a fixed IP address for a machine based on the MAC address of its network hardware. Optionally, you can also set one during the configurat­ion process of the VM.

Now boot the VM and log in in using the default credential­s ncadmin and nextcloud . As this is the first time you’ve booted up the VM, it’ll take you through a brief configurat­ion wizard. The first step involves connecting to the network, which will fail inside

Virtualbox as its network card is still blocked. To get it to work, exit the setup wizard and drop to the shell. Here, run the following script:

$ bash /var/scripts/nextcloud-startup-script.sh

The command will make the network card usable and continue with the initial setup process. The options are self-explanator­y and easy to follow. The script can also help you fetch a SSL certificat­e from Let’s Encrypt. You can skip this step during initial setup and get back to it once your server is up and running with sudo bash /var/scripts/activate-ssl.sh .

sort out email

You are now all set. Point your browser to the Nextcloud server, either via the IP address on the local network or via the Dynamic DNS address if you’ve configured one, and log in with the credential­s you entered during the VM’S initial setup.

Your Nextcloud server is now up and running, but it’ll still require a bit of further tweaking and tuning before you can use it productive­ly. Before you start using the installati­on, first set it up by heading to the Administra­tion panel. You can access this by clicking your username in the top-right corner of the main interface and then selecting the Settings option from the drop-down menu.

The Nextcloud server sends various notificati­ons about different activities in the stored files via email. More importantl­y, it will send you a link to reset forgotten login passwords via email only. So to enable your Nextcloud server to send emails, use the navigation menu to switch to the Basic settings panel and scroll down to the Email Server section. Here you can specify the settings of the email server that Nextcloud can use.

The easiest option is to use a freely available public email service provider like Gmail, but these are the ones we’re trying to avoid, right? Sign up with one of the privacy-respecting services we’ve mentioned in the previous pages that supports SMTP and IMAP. Equip the Nextcloud server with these settings to enable it to send emails using this account.

Besides administra­tion emails, Nextcloud can also manage your personal inbox. The top panel lists the various applicatio­ns installed in your cloud. Hover over any of the icons to reveal the name of all the apps. Click the Mail app icon and enter the IMAP and SMTP details of your email service provider under the Advanced

THE power of THE cloud “Hosting a Nextcloud instance on your computers which is accessible from anywhere on the web isn’t much work these days.”

Settings section. Once you’ve finished you can send and receive emails via your privacy-respecting email service right from your own cloud.

allocate storage

A pristine Nextcloud installati­on has only one user, the administra­tor. While you can operate your cloud as the Administra­tor, it’s a good idea to employ Nextcloud’s excellent user-management facilities to create a new

user. Nextcloud enables you to create users and groups, send notificati­ons to new users, set data quotas and more. To get started, click the admin’s username in the top-right corner and select Users from the dropdown menu. This opens the Users page, which lists existing users in the Nextcloud server. To add a new user just fill in the username and email address. If you have lots of users, you can also optionally bunch them inside particular groups for easier management.

By default, Nextcloud will send an invitation email to all new users, along with a pointer to the Nextcloud installati­on. You can leave the password field empty, as the invitation email will include a link for users to set their own password. You can also make certain users group administra­tors so that they have the right to create, edit and delete users in their assigned groups. However, unlike system administra­tors, group administra­tors cannot access system settings, or add or modify users in other groups. Select one or multiple group names under the Group Admin column to assign group admin privileges to any added user.

Each user also gets a storage quota. You can set this value when creating a user by selecting a different value from the Quota drop-down menu. You can select either a preset value or enter a custom value with the usual abbreviati­ons (MB or GB). By default, all users get unlimited storage on the server. Click the gear icon on the lower-left side of the interface to bring up the option to define a value for the default storage quota. Individual users can keep an eye on their quotas in the bottom-left corner of their default Nextcloud landing page. Also note that deleted files that are still in the bin, and files shared by other users, don’t count towards the quota of the user they are shared with.

share files

You’re now all set to upload data to your Nextcloud server. Log out as the admin user, log back in as a regular user and you’ll arrive at the file management page. To upload a file, click the + button and choose Upload File from the drop-down menu. To organise files into folders, click the + button and select the New Folder option. If you’ve uploaded a file in a format that Nextcloud understand­s, you can click its name to view and edit the file. Nextcloud can visualise the data it houses in different views. For example, click the ‘view change’ icon in the top-right corner of the interface to switch to the Gallery view, which helps you view images in your cloud by filtering out all other types of content.

Instead of using the web interface, you can also upload files to the Nextcloud server using the WEBDAV protocol, which enables you to interact with your cloud server using the file manager. While in the Files view in Nextcloud, click the Settings icon at the bottom-left of the interface. It’ll reveal the address you can use in your file manager to access the Nextcloud data via the WEBDAV protocol. Enable the location bar in your file manager (Ctrl+l in GNOME Files) and paste this address. You’ll be asked to authentica­te, after which the Nextcloud storage is mounted and you can interact with it just like a normal folder.

To share uploaded files, go to the Files section in the web interface and click the Share button to the right of the filename. This shows a flap where you can specify the users and groups you want to share the file with, along with other options such as whether you want to give them permission to modify or further share the file. You can also share with someone who isn’t registered with your Nextcloud server by ticking the Share Link option. For better control, Nextcloud enables you to password-protect the link and set an expiration date.

it’s Good To Talk “Nextcloud Talk enables all users that are registered on your Nextcloud instance to communicat­e with each other using a variety of means.”

pool all data

In addition to what it houses, Nextcloud can also pool in data from external storage silos including Amazon S3, Openstack Object Storage, Google Drive and from across the network via popular protocols such as FTP, SFTP and WEBDAV. Head to the Apps store and switch to the list of disabled apps to enable the External Storage support app. If you want to pull in data from Google Drive as well, head to the Files category and install External Storage support for the Google Drive app. Once the apps have been installed and enabled, head to the admin settings panel and switch to External Storages under the Administra­tion section.

By default, Nextcloud allows only administra­tors to enable access to external drives. However, there’s a tickbox on this page that, when toggled, will enable normal users to mount external storage as well. The process of hooking up the supported external storage services is very intuitive. You can also restrict access to an added storage service to certain users or particular groups. The official documentat­ion has illustrate­d guides on how to individual­ly enable the supported external storage services.

sync with clients

While you can interact with the cloud using the web interface, it’s far easier to use one of its official clients for all major desktop and mobile platforms. These clients also help you synchronis­e folders from the desktop to your Nextcloud server with ease. Many Linux distros, such as Arch and Fedora, include the Nextcloud

Linux client in their official repos. The latest version of the client is packaged and distribute­d in the distroagno­stic Appimage format on Nextcloud’s website.

Once the client is installed, it prompts you for your login credential­s in order to connect to the Nextcloud installati­on. After establishi­ng the connection, the client creates a local sync folder under your home directory, ~/Nextcloud. Any files you move into this directory will automatica­lly be synced to the server. The client’s connection wizard also asks whether you’d like to sync everything from the connected Nextcloud installati­on to your computer, or selectivel­y sync files. After running through the client’s wizard, you can access it from your desktop’s notificati­on area.

When collaborat­ing with other users, you’ll appreciate Nextcloud’s version-control system, which creates backups of files before modifying them. The backups for each file are accessible through the Versions tab inside the Details flap, along with a Restore button to revert to an older version.

share calendars and contacts

In addition to files, you can also sync your calendar and address book with your Nextcloud server. Head to the Apps store and install the Calendar and Contacts apps from under the Organisati­on category. Once enabled, the navigation bar at the top of the Nextcloud interface will now include icons for accessing the Calendar and Contacts apps.

Before proceeding further, you need to import your contacts and calendar from your existing applicatio­ns into your cloud server. Nextcloud supports the popular vcard file format (which has the VCF file extension) and almost every popular email service, including online ones such as Gmail, can export their address books in this format. Similarly, calendars can be imported in the popular ical format. Explore your existing email and calendarin­g apps and export the VCF and ical files for your account before moving on.

Now head to Contacts in Nextcloud and click the gears icon at the bottom-right corner of the interface. Select Import Into Contacts and point to the export VCF file. The import process might take some time depending on the size of your address book. You can now sync these contacts with your desktop and mobile email applicatio­ns using CARDDAV. You can similarly import an existing calendar by clicking the Gears icon inside the Calendar app. Here again click the Import calendar button and point to the exported ical file.

make video calls

Another useful feature that you can add to your cloud is the ability to host video calls. Nextcloud Talk is a relatively new addition to Nextcloud that was only added towards the end of 2018. The app enables all users that are registered on your Nextcloud instance to communicat­e with each other using a variety of means, including text, audio and video. You can use the app to host private one-to-one sessions as well as passwordpr­otected group calls.

To use this feature, first head to Nextcloud’s Apps store and download the Talk app from under the ‘Social & communicat­ion’ category. Once installed, it’ll appear on the top panel along with the other apps. Head to the app to create conversati­ons and invite participan­ts.

The app has an intuitive interface. Create a new conversati­on and add participan­ts to a call. By default the conversati­ons allow only users registered on the Nextcloud instance. However you can invite anyone by marking a conversati­on as Public, which displays a URL that anyone can use to join in.

Talk has all the usual features you’d expect from a modern video-chat app. You can promote other users to become moderators, and even kick out unruly participan­ts… oh, the power.

Thanks to the diverse apps infrastruc­ture, there are several other popular online services and functions that you can move into your own cloud. For instance, the Maps app uses Openstreet­map and the Leaflet Javascript mapping library to help you replace Google Maps. Then there’s Forms, which you can use to create shareable forms much like Google Forms. The Nextcloud version has several question types and offers relevant privacy settings and access restrictio­ns.

But wait, there’s more!

Besides these, there are several other useful apps that you can use to cut down your dependence on other popular online services. Bookmarks can be used to file your favourite online destinatio­ns. It has impressive management features and, like other popular services, can also sync the saved bookmarks with other devices and web browsers. The Passwords app does a similar job for storing and syncing passwords.

One app that we particular­ly like is called Dropit. The app enables you to quickly share files: just drop the data inside the app and share the generated link. The app files it under its own folder from where you can delete it once it’s been grabbed by the recipients.

Advanced users will also appreciate the Phonetrack app that can be used to track and store the location of mobile devices. The app needs a logging app in the mobile phone, such as Phonetrack-android, that you can grab from the F-droid app store. Once connected, you can use the app in your cloud to track the location of your mobile device without sharing the informatio­n with a third-party service.

In short, Nextcloud offers just about everything you could want in one handy place!

 ??  ?? The VM uses the Swedish keyboard by default, in which the / key is accessible with Shift+7.
The VM uses the Swedish keyboard by default, in which the / key is accessible with Shift+7.
 ??  ?? The command ‘sudo bash /var/scripts/activate-ssl.sh’ launches a script to install a certificat­e with Let’s Encrypt.
The command ‘sudo bash /var/scripts/activate-ssl.sh’ launches a script to install a certificat­e with Let’s Encrypt.
 ??  ?? The ‘Password protect by Talk’ option asks recipients of passwordpr­otected files to request a password via a video call with the owner.
The ‘Password protect by Talk’ option asks recipients of passwordpr­otected files to request a password via a video call with the owner.
 ??  ?? The VM is configured to take ZFS snapshots on a default schedule. Use ‘sudo zfs list -t snapshot’ to list all snapshots.
The VM is configured to take ZFS snapshots on a default schedule. Use ‘sudo zfs list -t snapshot’ to list all snapshots.
 ??  ?? Nextcloud has an extensive apps ecosystem that you can use to replace quite a few popular thirdparty services.
Nextcloud has an extensive apps ecosystem that you can use to replace quite a few popular thirdparty services.
 ??  ?? Nextcloud’s CLI is a PHP script that gets its name from its origins in owncloud, and is called occ (for owncloud Console).
Nextcloud’s CLI is a PHP script that gets its name from its origins in owncloud, and is called occ (for owncloud Console).
 ??  ?? You can use the sharing settings to define file-sharing settings for your cloud server.
You can use the sharing settings to define file-sharing settings for your cloud server.

Newspapers in English

Newspapers from Australia