• Home
  • Servers
  • Hosting Tutorials
    • cPanel&WHM
  • WordPress Tutorial
    • WordPress General
    • WooCommerce
    • Useful Plugin

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

WordPress Two-Factor Authentication (2FA): what is it & using it on your site

January 26, 2023

The biggest source of WordPress vulnerabilities

January 26, 2023

15 ways to secure your WordPress site

January 19, 2023
Facebook Twitter Instagram
  • Home
  • Servers
    Featured
    Servers

    What Is Imunify360? How Does It Enhance Website Security?

    By The GeekJanuary 2, 20230
    Recent

    What Is Imunify360? How Does It Enhance Website Security?

    January 2, 2023

    How to set up a Raspberry Pi ownCloud server in 7 steps

    December 20, 2022

    How To Install Linux, Nginx, MySQL, PHP (LEMP) stack On CentOS 7

    December 20, 2022
  • Hosting Tutorials
    1. cPanel&WHM
    Featured
    Hosting Tutorials

    What is Let’s Encrypt SSL certificate

    By The GeekDecember 26, 20220
    Recent

    What is Let’s Encrypt SSL certificate

    December 26, 2022

    What Is Web Hosting? What Is Shared Hosting?

    December 26, 2022

    How to install cPanel on CentOS 7

    December 22, 2022
  • WordPress Tutorial
    1. WordPress General
    2. WooCommerce
    3. Useful Plugin
    Featured
    Usefull Plugin

    WordPress Two-Factor Authentication (2FA): what is it & using it on your site

    By The GeekJanuary 26, 20230
    Recent

    WordPress Two-Factor Authentication (2FA): what is it & using it on your site

    January 26, 2023

    The biggest source of WordPress vulnerabilities

    January 26, 2023

    15 ways to secure your WordPress site

    January 19, 2023
Facebook Instagram
Horizen.ro – Tech Blog & Server environmentHorizen.ro – Tech Blog & Server environment
Subscribe
  • Home
  • Servers
    Featured
    Servers

    What Is Imunify360? How Does It Enhance Website Security?

    By The GeekJanuary 2, 20230
    Recent

    What Is Imunify360? How Does It Enhance Website Security?

    January 2, 2023

    How to set up a Raspberry Pi ownCloud server in 7 steps

    December 20, 2022

    How To Install Linux, Nginx, MySQL, PHP (LEMP) stack On CentOS 7

    December 20, 2022
  • Hosting Tutorials
    1. cPanel&WHM
    Featured
    Hosting Tutorials

    What is Let’s Encrypt SSL certificate

    By The GeekDecember 26, 20220
    Recent

    What is Let’s Encrypt SSL certificate

    December 26, 2022

    What Is Web Hosting? What Is Shared Hosting?

    December 26, 2022

    How to install cPanel on CentOS 7

    December 22, 2022
  • WordPress Tutorial
    1. WordPress General
    2. WooCommerce
    3. Useful Plugin
    Featured
    Usefull Plugin

    WordPress Two-Factor Authentication (2FA): what is it & using it on your site

    By The GeekJanuary 26, 20230
    Recent

    WordPress Two-Factor Authentication (2FA): what is it & using it on your site

    January 26, 2023

    The biggest source of WordPress vulnerabilities

    January 26, 2023

    15 ways to secure your WordPress site

    January 19, 2023
Horizen.ro – Tech Blog & Server environmentHorizen.ro – Tech Blog & Server environment
Home»Servers»How to set up a Raspberry Pi ownCloud server in 7 steps
Servers

How to set up a Raspberry Pi ownCloud server in 7 steps

The GeekBy The GeekDecember 20, 2022Updated:January 6, 20232 Comments7 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
ownCloud Trademark
Share
Facebook Twitter LinkedIn Pinterest Email

 

You don’t need us to tell you that cloud storage is a very useful thing. And, thanks to ownCloud, even those of us who don’t trust big companies with our data can enjoy the convenience of cloud storage. ownCloud is one of the best programs for running a cloud storage system on your Raspberry Pi, and with the help of it and DietPi, it’s easy for any Pi user to have their files at their fingertips anywhere they go. Sounds great, right? So how do you do it? We have you covered. Here’s how to set up a Raspberry Pi ownCloud server.

How to set up a Raspberry Pi ownCloud server

There are plenty of ways to get cloud storage. You can turn to services like DropBox or cloud services from major companies like Apple and Google. But you don’t necessarily have to pay money to get reliable cloud storage – and you don’t necessarily have to trust giant companies like Apple with all of your private files. You’re more than capable of replicating these services on your own. You’ll just need some storage (like an external hard drive) and a device. You’re reading The Pi, so you know where this is going: we’re going to use a Raspberry Pi. So grab your tools!

You’ll need all the usual stuff plus an Ethernet cable andan external storage device (optional, but recommended – if you’re going to set up ownCloud, you might as well give yourself plenty of storage space).

We’re going to install DietPi, a super-lightweight operating system for the Raspberry Pi. Then we’re going to use ownCloud that works on DietPi.

Step 1: Install DietPi on your Raspberry Pi

Your DietPi installation process is the same as with most other Raspberry Pi operating systems. Grab the disk image here, unzip it with the program of your choice (7-Zip will work), and then write the disk image to your microSD card with the program of your choice (Win32 Disk Imager on PC and Disk Utility on Mac will both work).

Step 2: Write down your IP address and log into DietPi

With DietPi on the microSD card and your Pi connected to the internet via Ethernet cable, go ahead and boot up. DietPi should print out your IP address even before you log in. We’re going to need that, so go ahead and write it down.

Log in with the username root and the password dietpi (you can do this on the Raspberry Pi itself or just SSH in from another computer). It’s your first time logging in, so DietPi will update automatically. Wait that out and then hit enter to reboot. Then log back in!

Raspberry

Step 3: Install ownCloud

Once DietPi has rebooted and you’ve logged back in, you’ll be able to install new software – and that’s exactly what we’re going to do.

DietPi - Setup

The program we want is called ownCloud.

In the DietPi menus, navigate to Software Optimized – Select DietPI optimized sogtware for installation and then to 47 OwnCloud: your very own cloud (eg: dropbox). You’ll use the space bar to select and Enter to confirm.

DietPi - Setup (2)

After selecting ownCloud, you’ll be sent back to the menu you started from. Navigate to Install – Go >> Start installation for selected software and press Enter. On the following screen, select OK and hit Enter again to indicate that you’d like to begin.

DietPi - Setup (3)

DietPi will install ownCloud and then reboot (yes, DietPi really likes to reboot).

Step 4: Access the ownCloud web interface

Let the Pi reboot and then put it aside for a moment. Hop on another device and open a browser. Remember that IP address for your Raspberry Pi? The one you wrote down? Go ahead and type that in the address bar of your browser between http:// and /owncloud. For instance, mine looked like this: http://192.168.0.103/owncloud/.

What you’ve types here is the URL for your ownCloud web interface. And the first thing the web interface will do is run the setup wizard.

The setup wizard will prompt you to create an admin account. Choose your username and password, then take a look at the apps that ownCloud recommends you download. Take the program’s advice.

After all this, you’ll find yourself logged in to the ownCloud web interface.

ownCloud - Web interface

Step 5: Use your storage!

Your Raspberry Pi ownCloud server is now set up and you can start uploading files in the storage by clicking the plus symbol above the list of files and choosing Upload. You can hop into this interface with your browser on just about any device on your network, as well as through the ownCloud smart phone apps. You’ll need your username and password, of course, and you’ll have to make sure your Raspberry Pi is on when you need to access your cloud.

ownCloud - Web interface (2)

But wait – on your network? Your cloud storage is pretty limited if you can only use it in your own home. Let’s do just a couple more steps and make our cloud storage available anywhere.

Step 6: Set up port forwarding

If you want to access your ownCloud server from outside your home network (and you almost certainly do), you’ll need to set up port forwarding in your router’s admin interface and configure trusted domains in ownCloud’s settings.

Let’s take care of port forwarding first. Go ahead and access your router’s settings by typing your router’s IP address into a browser address bar. We’ll all have the same goals here, but our settings may look a little different. For instance, my router’s settings look like this:

Service Port: 80
Internal Port: 80
IP Address: [your Pi’s IP address]
Protocol: TCP
Common Service Port: HTTP

Change your settings so they match ours above (again, they won’t necessarily be in the same order or layout). Where we have [your Pi’s IP address], you should, of course, put your Pi’s actual IP address. This is the IP address you wrote down way back in Step 2.

That takes care of the router. Now for ownCloud.

Step 7: Configure trusted domains

With port forwarding set, ownCloud’s trusted domains setting is the last obstacle to enjoying cloud storage from outside your home network.

Hop on your Raspberry Pi and log into DietPi. Enter this command:

sudo nano /var/www/owncloud/config/config.php

We’re going to edit this config file and add your public IP address to the list of trusted domains. My config file looks like this:

<?php
$CONFIG = array (
'updatechecker' => false,
'instanceid' => 'oczs3u2vnel0',
'passwordsalt' => 'nRmHalWK8DQBNJ2bUicukJsg8Ys4Y2',
'secret' => 'fMP9Uix9Ub965r2ukRzKVgmn0ZK8GRSWWo5l1x9zseRZFkxS',
'trusted_domains' =>
 array (
 0 => '192.168.0.103',
 ),
'datadirectory' => '/var/www/owncloud/data',
'overwrite.cli.url' => 'http://192.168.0.103/owncloud',
'dbtype' => 'sqlite3',
'version' => '9.1.6.2',
'logtimezone' => 'UTC',
'installed' => true,
);

See that part I put in bold? You should have a similar section in yours, and that’s were you’re going to make our changes. Right above where the parentheses close, add a new line that reads 1=>'[your public IP address]’ – (where the part in brackets is, of course, your actual public IP address and not just those words). If you don’t know your public IP, you can just check by asking Google “what is my IP address?” Once you’ve got it right, the section will look like this:

'trusted_domains' =>
array (
0 => '192.168.0.103',
1 => '[your public IP address]'
),

Our new line is in bold in this example.

Now we’re all set. Exit the editor and save the config file by pressing Ctrl+X, then Y, then Enter.

Now you can log in to your ownCloud server from outside your home network by browsing to http://[your public IP address]/owncloud/. Note that we’re using the public IP address now instead of your Raspberry Pi’s IP address. That’s it – you now have cloud storage that works wherever you are!

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
The Geek
  • Website

Related Posts

What Is Imunify360? How Does It Enhance Website Security?

January 2, 2023

How To Install Linux, Nginx, MySQL, PHP (LEMP) stack On CentOS 7

December 20, 2022

How to Install and Configure Nginx on CentOS 7

December 20, 2022
View 2 Comments

2 Comments

  1. Sergiu Rus on December 26, 2022 5:24 pm

    Tutorial ok, dar puteai sa explici si cum setezi cu DietPi user_files pe un external storage in cazul in care cineva foloseste si un hard extern pentru stocare. Mai poti face un tutorial pentru NextCloud pe raspberry pi… momentan e mai popular ca si OwnCloud 😀

    Reply
    • The Geek on December 26, 2022 5:37 pm

      Multumesc de completare, o sa revin cu un update la acest tutorial plus urmeaza si NextCloud 😀

      Reply

Leave A Reply Cancel Reply

Editors Picks

WordPress Two-Factor Authentication (2FA): what is it & using it on your site

January 26, 2023

The biggest source of WordPress vulnerabilities

January 26, 2023

15 ways to secure your WordPress site

January 19, 2023

What Is Imunify360? How Does It Enhance Website Security?

January 2, 2023
Top Reviews
Advertisement
Demo
Horizen.ro – Tech Blog & Server environment
Facebook Twitter Instagram Pinterest Vimeo YouTube
  • Home
  • Hosting Tutorials
  • Cpanel & WHM
  • Cookie Policy (EU)
© 2023

Type above and press Enter to search. Press Esc to cancel.

Manage Cookie Consent
We use technologies like cookies to store and/or access device information. We do this to improve browsing experience and to show personalized ads. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}