MakeUseOf

How to Build a Raspberry Pi Cloud Server with ownCloud

Set up your own cloud storage server to access your data anywhere with ownCloud and a Raspberry Pi.

Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

Cloud storage is incredibly useful for accessing your data from any device. The downside is that you have to trust a corporation with the privacy and security of your precious documents and photos stored on remote servers.

Close

There is an alternative, though: you can host your files on your very own cloud server running on a computer in your home or office. One of the most popular services for achieving this is ownCloud.

We’ll show you how to install ownCloud on a Raspberry Pi, attach external storage, and choose a suitable case.

ownCloud vs Nextcloud for Raspberry Pi: Which Is Best?

Cloud storage

Another option for your home-based Raspberry Pi cloud server is Nextcloud, an independent spin-off of ownCloud created by some of the latter’s core contributors.

While the core features are very similar for both services, there are some key differences. Some of the more advanced features in ownCloud are only available for premium subscribers, whereas all features are free in Nextcloud.

Even so, ownCloud is a good, well-established option and is completely free to use if you’re self-hosting your server(s). Features include end-to-end encryption, two-factor authentication, antivirus, firewall, and file integrity checking.

1. Prepare Your Raspberry Pi

Unlike Nextcloud, which offers a custom OS image for Raspberry Pi in the form of NextCloudPi that you write to a microSD card, as well as an Ubuntu Appliance option ownCloud is installed within an existing iteration of the standard version of Raspberry Pi OS.

If you are yet to install Raspberry Pi OS, write it to a microSD card (8GB or higher is advisable) on another computer using the Raspberry Pi Imager tool.

Read More: How to Install an Operating System on Raspberry Pi

Once that’s done, insert the microSD card in your Raspberry Pi and power it up. Go through the welcome wizard, selecting a new password (for security reasons) and connecting to your Wi-Fi network.

Before installing ownCloud, you should make sure Raspberry Pi OS is fully up to date. If you haven't already done so during the welcome wizard, open up a Terminal window (Accessories > Terminal) and enter the following commands:

 sudo apt-get update
sudo apt-get upgrade

It may take a few minutes. With the Raspberry Pi to your wireless router, discover its IP address by entering:

 ip addr 

Note down the inet address under wlan0: this is the Raspberry Pi’s IP address. Some routers will reserve the same address for the Raspberry Pi each time it’s booted; if not, you’ll want to set up a static IP address for your Raspberry Pi.

2. Install Apache 2, PHP 5, and SQLite

Before installing ownCloud itself, you’ll need to add essential components of the server stack. To install the Apache HTTP Server, in the Terminal enter:

 sudo apt-get install apache2 

Once this has finished installing, you should check it’s working. Open a web browser on another computer and enter your Raspberry Pi’s IP address. You should get a default Apache web page saying ‘It works!’

Apache web server default screen

You are now ready to install the PHP web scripting language, SQLite database management system, and other required packages with this Terminal command:

 sudo apt-get install php7.3 php7.3-gd sqlite php7.3-sqlite php7.3-curl 
php7.3-zip php3-dom php7.3-intl

Once they’re all successfully installed, restart the Apache web server with the following command:

 sudo service apache2 restart 

3. Install ownCloud

You are now ready to install ownCloud itself. Download the latest stable ZIP file from the official ownCloud downloads page to your Raspberry Pi. We downloaded owncloud-complete-20210326.zip.

ownCloud download zip file

In a Terminal window, move the downloaded file to the /var/www/html directory with:

 cd Downloads
sudo mv owncloud-complete-20210326.zip /var/www/html

Change to that directory and unzip the file:

 cd /var/www/html
sudo unzip -q owncloud-complete-20210326.zip

Next, you need to create a data directory for ownCloud and alter its permissions. If you’re just using the microSD for your server’s storage, enter the following commands:

 sudo mkdir /var/www/html/owncloud/data
sudo chown www-data:www-data /var/www/html/owncloud/data
sudo chmod 750 /var/www/html/owncloud/data

If using an external USB drive for storage, attach and mount it on your Raspberry Pi, then enter the following commands instead:

 sudo mkdir /media/ownclouddrive
sudo chown www-data:www-data /media/ownclouddrive
sudo chmod 750 /media/ownclouddrive

Note: If you want to move the data to a different directory at a later date, see the ownCloud guide to how to move a data directory.

Next, input the following commands to give writing permissions to avoid some potential login errors later on:

 sudo chmod 777 /var/www/html/owncloud
sudo mkdir /var/lib/php/session
sudo chmod 777 /var/lib/php/session

Once that’s all done, it’s time to reboot your Raspberry Pi for the changes to take effect:

 sudo reboot 

4. Configure ownCloud

From a web browser, visit the Raspberry Pi’s IP address following by /owncloud, e.g. 192.168.1.132/owncloud.

If you see a warning that your connection isn’t private or secure, choose to ignore it (by selecting Advanced in Chrome or Firefox) and proceed to the site.

ownCloud login create admin user

The ownCloud login screen should appear. If you see a performance warning about SQLite, you can safely ignore it.

You now need to register an admin account by entering a username and password. Make sure to note them down. With this, your personal ownCloud is now available using this account.

Log in and start exploring the web dashboard for your self-hosted ownCloud server. To begin with, you can browse a couple of folders for documents and photos.

ownCloud apps market

To add extra functionality, click the menu at the top left and select Market. You can browse the available apps and install any you want, such as a Calendar and the Collabora office suite.

5. Add External Access Over the Internet

So far, you can only access your ownCloud server from your own local network, which is a bit limiting. To access your ownCloud server over the internet from any location requires you to set up SSL, enable port forwarding, and use a dynamic DNS service.

6. Choose a Case For Your ownCloud Server

DeskPi Pro Raspberry Pi case

Running your ownCloud server on a bare Raspberry Pi board isn’t recommended as it will accumulate dust over time. There’s a wide variety of cases available for standard-size Raspberry Pi 3 and 4 models.

Rather than a cheap plastic case, we’d recommend something more solid such as the DeskPi Pro. This has enough room inside the case for a SATA storage drive and is supplied with an M.2 to SATA adapter. To prevent your Raspberry Pi overheating, it also features an ICE Tower cooling system and heatsink.

Another very good option is the Argon ONE M.2 case, which enables you to use any size M.2 SATA drive. Alternatively, you could choose a robust case for Raspberry Pi on its own and plug in a standard external USB storage drive.

Build Your Own Raspberry Pi Cloud Server: Success

Congratulations, you have now set up a cloud server on your Raspberry Pi using ownCloud. You can visit its dashboard using a web browser on another device. There’s even an ownCloud app for iOS and Android that you can use to access the server from a smartphone or tablet.

AD
AD
AD
AD
AD
AD

The 9 Best Linux Cloud Storage Solutions for 2023

Updated

Need to sync to the cloud on your Linux PC? Here are the best Linux-compatible cloud services available today.

Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

Cloud storage is arguably the best way to back up you personal data. It takes the physical action of backing up out of your hands and leaves you with an accessible archive of data.

But cloud storage can be expensive with the wrong provider. If you're looking for cloud storage for your Linux PC, finding the right service can take a while. To help you out, we've collected the best Linux cloud storage providers for you to consider.

1.Dropbox

Dropbox on Linux

Free space offered: 2GB.

Dropbox is one of the preferred cloud storage options in the market currently. It’s available for Linux, Windows and Mac users. This service provider offers different storage plans, but the basic plan offers 2GB storage space only, which can be one of its most prominent downsides.

Our guide to Dropbox will highlight why this cloud solution is so popular for Linux users.

Dropbox cloud features for Linux (and other OSs):

  • Multiple OS compatibility: sync multiple files across multiple OSes, like Linux, Windows, and Mac, which appear collectively in the Dropbox server
  • Back up files: save all documents and media files in the Dropbox folder on your computer for automatic Linux cloud backup (works with other OSs)
  • File recovery: restore files deleted in the last 30 days
  • Collaboration: seamlessly collaborate by sharing files with multiple people at the same simultaneously

Download: Dropbox (Free | Premium)

2.pCloud

Free space offered: 10GB of free storage, which is extendable up to 20GB.

Swiss cloud storage service pCloud has had a great reputation for secure cloud storage since its 2013 launch.

Its initial provision is 10GB of free storage, and if this isn’t enough you can invite friends. You even have the option to utilize the pCloud referral program to extend your free cloud storage space.

Pcloud is one another Linux cloud storage provider with the option to take a paid subscription with great storage limits.

pCloud Linux cloud features:

  • Efficient collaboration: send and receive files with collaborators with shareable upload and download links
  • Encryption: pCloud’s encryption features offer users' unbreakable file security protocols, which are aimed at protecting the user’s sensitive information, private documents, etc.
  • Integration between the web and the cloud: save your images directly from the web to the pCloud’s server
  • Android/iOS friendly

Download: pCloud (Free | Premium)

3.Mega

Free space offered: 20GB of free storage.

Mega is one of the biggest names in cloud storage, boasting over 200 million users worldwide. It is one of the most secure cloud storage options available, with end-to-end encryption of all data.

Mega’s features are available for anyone looking for a free Linux cloud storage account.

  • Encryption at the source
  • Security at its best: all data is heavily guarded in the Mega cloud, and you can recover data only by using the associated unique account recovery key.
  • Balance between features and interface
  • Additional features: versioning, file sharing, and file syncing, among others.
  • Compatibility: Mega is compatible with Linux, Windows, and Mac.

Download: Mega (Free | Premium)

4.Cozy Drive

Free space offered: Cozy Drive offers 5GB of free storage space to its users.

Apart from being just a Linux-friendly cloud storage provider, French company Cozy also offers a digital locker. This lets you safely store bank statements, health records, and other confidential information in one place.

Meanwhile, French citizens can connect a Cozy account to French income tax accounts, for a better experience. And of course you can use Cozy to set sync data from a Linux PC to the cloud.

Some additional features worth a mention include:

  • Multiple platforms, one central location: Cozy can download bills, health records, and other confidential information in one go
  • Import data from Google: sync Google calendar and contacts into Cozy

Download: Cozy (Free | Premium)

5. Internxt

Free space offered: Up to 10GB is available free with Internxt.

Internxt Drive is a “zero-knowledge file storage service that’s based on absolute privacy and uncompromising security.” This makes it a great choice for anyone concerned about how their cloud data is used.

For the free storage, you start with 2GB. The further 8GB comes from installing desktop and mobile apps, sharing links, and inviting five friends.

Internxt features:

  • Designed to be secure
  • Multi-device support: Linux, Mac, Windows, Android, also a web interface
  • Files are encrypted

Paid accounts also get access to Internxt Photos and Internxt Send (a secure file-sending app).

Download: Internxt (Free | Premium)

6. Icedrive

Free space offered: 10GB with 3GB daily bandwidth.

Offering apps for mobile and desktop devices, Icedrive is another cloud storage service offering encryption as a key feature.

Icedrive can be installed on Linux (with an AppImage), Windows, or Mac. It also provides apps for Android and iPhone. It also offers a web interface.

Key Icedrive features:

  • Easy to manage cloud storage: use Icedrive as if all files were local
  • Encryption: uses the “bulletproof” twofish algorithm, stronger than AES encryption
  • Collaboration: create a showcase page for collaborators to work with
  • Apps for home, mobile, and office

Download: Icedrive (Free | Premium)

Cloud Storage With Third Party Linux Clients

In addition to cloud storage services that support Linux, some third party developers provide Linux clients for popular cloud services.

So, if you’ve noticed Google Drive, Microsoft OneDrive, and Box are missing from the list above, don’t worry. All three have good third-party clients that run on Linux.

7. OneDrive Client for Linux

If your requirements for cloud storage rely on Microsoft OneDrive (perhaps you’re a Windows refugee, or it’s a work thing), you’re in luck. Several OneDrive tools are available for Linux users.

Sync OneDrive on Linux

Probably the best is OneDrive Client for Linux, which you can learn more about on the project’s GitHub page.

Our easy set-up guide for OneDrive Client for Linux will have you up and running in minutes.

8. Google Drive

If you want to use Google Drive with Linux, various tools are available. If you’re using a GNOME desktop, however, you can keep it simple. GNOME’s Online Accounts tool has Google integration, which extends to Google Drive. This can be integrated into the file manager for easy access to your cloud.

For more information check our guide on setting up Google Drive on GNOME desktops.

9. ExpanDrive for Linux

A network file manager for Linux, Mac, and Windows, ExpanDrive has support for multiple cloud solutions. These include:

  • Dropbox
  • Google Drive and Google Team Drives
  • Amazon Drive
  • Box
  • OneDrive and OneDrive for Business

Of particular note in that list are Amazon Drive and Box. While alternative solutions exist for both of these, ExpanDrive is a good all-round tool for cloud storage on Linux. The shortcoming is that ExpanDrive will set you back around $30 for an annual subscription (with $15 renewal every year for updates and support) or a one-time $45 payment with all the updates and support.

Which Free Linux Cloud Storage Service Is Best for You?

With so many cloud storage options for backup and syncing available to Linux users, you’re spoiled for choice. My own preference is Dropbox, one of the rare occasions when a popular tool on Windows works perfectly on Linux. It’s perfect for cloud backups of Linux-based documents and media.

Of course, your mileage may vary. Whatever your eventual choice, take the time to test the free options before upgrading to larger storage and committing to a monthly subscription.

Zapisz