Get more from the best storage option
YOU’LL NEED THIS
COMPATIBLE NAS WITH
OWNCLOUD SERVER For example, Western Digital Live,
Synology, or QNAP.
LINUX-BASED SERVER Plus, OwnCloud desktop and
mobile clients. CLOUD BACKUP AND SYNC is a brilliant way to ensure your data is both protected and available on all your devices. But you may have good reason not to want a third-party provider to look after your data—perhaps the cost is too great, you don’t trust their encryption methods, or you’d rather restrict synchronization to your own network.
The solution to having your cloud-based cake and eating it is OwnCloud. OwnCloud works in exactly the same way as most cloud sync providers, but your data is stored locally, so the only limit is the size of your server’s hard drive. It’s also restricted to your local network by default—you can open it up, as we’ll reveal, but if you’re leery about making it available over the Internet, you can keep it closed off.
The most difficult thing about OwnCloud is setting it up, which is where we come in. If you have a NAS drive with the OwnCloud app, you can skip the tricky installation part (covered in detail back in issue 130), and get on with configuring and using OwnCloud to ensure your data is backed up, in sync, and secure. Read on to find out everything you need to know.
1 INSTALL OWNCLOUD Step one is—obviously—to install OwnCloud. If you’re running a Linux-based server, download it from www.owncloud.org; if you’re installing it on your NAS, visit its app center, or Google the NAS model and “owncloud” to see whether a community-built app has been produced, then follow the instructions to install it—typically, it’s a simple case of clicking the OwnCloud icon or downloading a package, then uploading it to the NAS, which then does all the tricky installation stuff for you.
>> If you’re a QNAP owner, you’re stuck with OwnCloud 8.0.4, unless you’re willing to jump through some pretty tricky hoops, or make do with just the basic database (which is impractical, as you’ll see in the next step).
2 CONFIGURE MYSQL Before launching OwnCloud for the first time, you need to set up a MySQL database for it to use. OwnCloud does ship with built-in support for SQLite, but by its own admission, this isn’t very practical, and doesn’t work with any desktop clients, so you need to upgrade. Any NAS supporting OwnCloud that’s worth its salt should give you access to the phpMyAdmin app (or similar) to configure your new database.
>> If necessary, install phpMyAdmin through your app center, then select the app, and click “Configure” or “Open” to open it in a separate browser window. You then need to log into phpMyAdmin as the root user—if this is your first time, try “root” as the username and a blank password. Once logged in, start by clicking “Change password” under “General settings” to secure the account with a strong password—use the “Generate password” button, then save the generated password to your password manager (such as LastPass).
3 CREATE AND CONNECT TO DATABASE Select the “User accounts” tab at the top of the screen. Click “Add User Account” to create a new user—say, “owncloud.” Change “Host name” to “Local.” Next, set a strong password by clicking “Generate” [ (make a note of this, or save it to your password
manager). Check “Create database with the same name and grant all privileges,” then scroll down, and click “Go.”
>> Once done, switch to the “Databases” tab to verify the OwnCloud database has been created. Click “Check privileges” next to it to verify there’s an entry for your username—it should read “localhost” for “Host name,” “database-specific” for “Type,” and be given all privileges (but not able to grant additional privileges). Once verified, close the phpMyAdmin window.
4 FINISH CONFIGURING OWNCLOUD Return to your NAS’s app center, locate OwnCloud, and click “Open.” First, create an administrator account for configuring OwnCloud—make sure its username and password matches the MySQL username password you created previously. Once entered, click the “Storage & database” drop-down menu, and select the “MySQL/MariaDB” tab. Enter your MySQL username and password again, then put the MySQL username in the “Database name” field, too, and change “localhost” to “127.0.0.1:12345,” replacing “12345” with the port number displayed in the Address Bar next to your NAS’s IP address. Click “Finish setup” [ Image B].
5 SET UP USER ACCOUNT After a short pause, the main OwnCloud screen appears, with handy links for obtaining the desktop and mobile clients, plus instructions for synching calendar and contacts from your smartphone. Click the close button. You’ll see a small list of folders and files have been created for the current user—your administrator, so to speak. Let’s start by creating a dedicated user account for yourself: Click the down arrow next to your username in the top right-hand corner, and click “Users.”
>> Now type a more memorable username and password into the boxes—you can make yourself a member of the admin group by clicking “Groups,” and checking the “Admin” box if you wish [ Image C]— however, for maximum security, it’s best to leave administrating OwnCloud to the master user. Either way, be sure to protect your account with a strong password. Click “Create.”
6 ADD MORE USERS—IF REQUIRED If you plan to share your personal cloud with other household members, set up their user accounrs now—but don’t make anyone an admin. If you plan to set different sharing privileges for different users, click “Add Group” to create groups that you can place people into. Make a note of the “Quota” drop-down menu—this enables you to set limits on how much data people can store using OwnCloud, which may be crucial if your NAS drive isn’t particularly big. Options include unlimited, 1GB, 5GB, and 10GB, plus a custom option for setting your own limit in gigabytes. Think about how much space you have, and how you would like to divide it up among the users—50GB each should be more than ample for most people.
7 SOME INITIAL TWEAKS Before we switch attention to setting up your account, let’s configure some settings. Click the account username in the top right-hand corner, and choose “Admin.” Work your way through the options offered—you can restrict sharing to this OwnCloud server only, plus allow other users to only share within their user groups, for example.
>> We strongly recommend you check the “Enforce HTTPS” boxes to ensure all connections are secure [ Image D]. Note your NAS or server needs to have an SSL certificate applied to it—see the boxout on the right for some tips. It’s worth noting that OwnCloud’s built-in security isn’t perfect, particularly on older versions, but it’s a start.
8 SWITCH TO NEW USER Click the username drop-down menu in the top-right corner, and choose “Log out.” Log in using your newly created account credentials to access your own personal cloud folder—files and folders can be created, uploaded, or deleted direct from here when you need to, although in most cases you’ll use the desktop client to stay in sync. You’ll see options on the left for favoriting files and folders, plus sharing them with others. Highlight a file in the list, and you’ll see options for sharing and downloading it [ Image E], plus “Versions”—OwnCloud can store multiple versions of a file, enabling you to roll back should you need to.
9 CONFIGURE DESKTOP CLIENT If you’ve not already done so, download and install the OwnCloud client on your desktop or laptop—it’s broadly the same process on Windows, Mac, and Linux, but we’ll focus on the Windows client. When you launch it for the first time, you are prompted to connect to your server [ Image F]— use the following syntax to do so:
>> Substitute your NAS’s IP address and the port number assigned to OwnCloud, and ensure it’s an https:// connection. Click “Next.” You get a message about an untrusted certificate, so ensure it’s correct, check “Trust this certificate anyway,” and click “OK.” Enter your OwnCloud username and password, and click “Next.”
10 LET’S GET SYNCHED Choose your sync settings—click the user data folder to choose a different location. If it already contains data, be sure to select “Keep local data,” so it’s synched to your server. You can choose to sync everything from the server, or selectively sync certain folders only [ Image G]; you can also opt to receive confirmation before synching anything over a certain file size ( 500MB by default). Once done, click “Connect,” and OwnCloud starts to sync. Two buttons let you access OwnCloud through your browser or the local folder you’re synching to, but you can ignore these; click “Finish.”
11 TRACK PROGRESS Click the “^” button next to the Taskbar Notification area, and you’ll see the OwnCloud cloud icon is now present. Click this to open the OwnCloud status window, where you can use the buttons to track the progress of your file sync. Click your username for an overview and to browse folders that have been uploaded (you can also selectively choose folders to sync from here, too, should you wish). A handy link to the OwnCloud browser configuration page is also accessible.
>> The “Activity” button enables you to get an overview of activity—use “Sync Protocol” to review the latest changes, while “Not Synched” provides you with a list of files waiting
to be uploaded or downloaded. The “General” button provides you with access to client settings, such as enabling desktop notifications, and whether OwnCloud should automatically start with Windows. Use the “Network” tab to apply bandwidth limits to upload and download speeds—we recommend ensuring there are no limits during the initial sync, particularly if you have a large amount of data to upload to the OwnCloud server.
>> Remember, you can install the OwnCloud client on all your desktops and laptops—repeat steps 9–11, and you’ll soon have data synching between all your computers, with a backup copy residing on the server or NAS.
12 WIDEN YOUR ACCESS As things stand, a locally installed OwnCloud server is only accessible through your home network. That’s good from a security point of view, but you may have reasons for wanting to be able to access your data or sync while outside your home network. To do this, you should first sign up for a Dynamic DNS (DDNS) service. Your NAS manufacturer may offer such a service (QNAP users should check out myQNAPcloud, for example [ Image H]), or you can sign up with a third-party service, such as www.no-ip.com, that’s supported by your router. If you choose the latter option, you need to configure your router for remote access— if possible, force secure connections, and change the router password to something stronger. Also consider strengthening your NAS’s protection—switch on two-factor authentication, for example, to prevent drive-by hackings.
13 CONFIGURE DDNS AS TRUSTED DOMAIN Once set up in your router, open your web browser and type the following: “https://yourname.ddns.net:8081/ owncloud/” substituting “yourname.ddns.net” with your dynamic DNS address, and “8081” with the port you use to connect to your OwnCloud server locally. You’re shown a message telling you that you’re attempting to access OwnCloud through an untrusted domain—try clicking “Add ‘yourname.ddns.net’ as a trusted domain.” If this works, you can now connect to your OwnCloud server through the web, or by setting up a separate connection in your OwnCloud client to the DDNS address.
>> If this doesn’t work, you need to manually edit the OwnCloud config.php file [ Image I]. If you can access it through your NAS’s file manager (on QNAP drives, for example, you’ll find it under Web\owncloud\config), download the config.php file to your hard drive, then create a copy of the original file called config-old.php. Edit the config.php file in your text editor by locating the “trusted domains” section, and adding the following line inside array () below the line trusting your NAS’s IP address:
1 => ‘yourname.ddns.net’,
>> Save the file, then upload it back to the config directory. Either reboot your NAS or stop and restart OwnCloud, then you should find you now have remote access.