How to use ownCloud with Vultr Block Storage and Object Storage
Introduction
ownCloud is an open-source file hosting server on the cloud that enables secure storage, collaboration, and sharing. This guide explains how to use ownCloud with Vultr's Block Storage and Object Storage.
Prerequisites
Deploy a one-click ownCloud Application cloud server instance from Vultr Marketplace Apps
Add Block Storage to your account
Note: Your cloud server instance must be in the same server location with your Vultr Block Storage, or you will not be able to attach your block storage to your server instance otherwise.
Use ownCloud with Vultr Block Storage
Vultr's Cloud Block Storage technology is ideal for ownCloud because of its scalability and high-performance SSDs. You can deploy volumes as large as 10,000GB, which is perfect for file hosting.
Mounting the Block Storage
SSH to your ownCloud server instance as root.
List all block storage devices to verify the new device name. The first block storage device is connected to your server as
/dev/vdb
.# lsblk
Create a new disk label using parted.
# parted -s /dev/vdb mklabel gpt
Make a primary partition to fill the entire disk.
# parted -s /dev/vdb unit mib mkpart primary 0% 100%
Create an EXT4 filesystem on the primary partition and format it.
# mkfs.ext4 /dev/vdb1
Make a mount point. This is also where your ownCloud files will be stored.
# mkdir -p //owncloud/data
Add a blank line and a mount entry to /etc/fstab. This will automatically mount the block storage at
/owncloud/data
at reboot.# echo >> /etc/fstab # echo /dev/vdb1 /owncloud/data ext4 defaults,noatime,nofail 0 0 >> /etc/fstab
You can also manually mount the block storage without rebooting.
# mount /owncloud/data
Setting up ownCloud
On your browser, navigate to your server's IP Address.
Log in to your ownCloud file server using the credentials that can be found on your cloud instance's control panel.
After you are logged in, go to Settings by clicking your username on the upper-right corner.
On the Admin section, click Storage.
Enable the external storage by clicking the checkbox.
Enter a Folder name. This folder is where you save your files, which will then be stored in your block storage.
Click the Add Storage dropdown menu under the External Storage column, then select SFTP.
For the authentication, select Username and password.
Enter your server's IP address on the Host text box.
Enter
/owncloud/data
on the Root text box. Notice that the/owncloud/data
directory is where you mount your Block Storage.Enter your cloud server instance's username and password on the Username and Password text boxes.
A green dot will appear beside the Folder name to confirm that ownCloud is now connected to your mounted block storage via SFTP through the mount point
/owncloud/data
.Test if everything works fine. Create a test file using touch on your SSH terminal.
# touch /owncloud/data/testfile.txt
Check if
testfile.txt
appears in the folder that you have created on your ownCloud file server.
Use ownCloud with Vultr Object Storage
- Create a Bucket from the Buckets tab on your Object Storage's Control Panel.
- On your browser, navigate to your server's IP Address.
- Log in to your ownCloud file server using the credentials that can be found on your cloud server instance's Control Panel.
- Go to ownCloud Market. Click the triple horizontal bar icon on the upper-left corner, then select Market.
- From the Categories section on the sidebar menu, select Storage.
- Look for External Storage: S3 and Install it.
- After you install External Storage: S3, go to Settings by clicking your username on the upper-right corner.
- On the Admin section, click Storage.
- Enable the external storage by clicking the checkbox.
- Enter a Folder name. This folder is where you need to save your files, which will then be stored in your Object Storage Bucket.
- Click the Add Storage dropdown menu under the External Storage column, and select Amazon S3 Compatible (SDK v3).
- On the Bucket text box, enter the name of the Bucket you created on step 1.
- On the Hostname text box, enter your Object Storage's Hostname which can be found on your Object Storage's Control Panel
- Look for your Access Key and Secret Key on your Object Storage's Control Panel and copy it, then paste it on the Access Key and Secret Key text boxes.
- A green dot will appear beside the Folder name to confirm that your ownCloud file server is now connected to your Object Storage (Bucket).
- Test if everything works fine. Go to your ownCloud Files and select the Folder you have created.
- Upload any file (test file), then check if it appears on your Bucket from your Object storage's control panel.
More Information
For more information about ownCloud, Vultr Block Storage, and Vultr Object Storage, please see these resources: