Owncloud on EC2 (Linux Micro) + OS X Address Book and iCal + iPhone iOS 7 Published May 7, 2014 This discussion demonstrates how to install the ownCloud platform on Linux residing in an AWS Free Tier (Amazon Web Services) environment. ownCloud is an open source application that allows for the synchronization of personal data (contacts, calendars, bookmarks, photos) from a variety of devices (desktop, tablet, phone). Some basic knowledge of Linux, networking, and computer security are necessary here but if these instructions are followed closely, no troubleshooting should be required. This discussion involves the use of AWS, and specifically the Amazon Linux AMI, yet any number of modern Linux installations would suffice. However, as there are many choices available in the open source world, your mileage may vary according to the various version and Linux distribution chosen. These instructions are known to work with the resources presented. To keep things predictable, this discussion assumes your EC2 Instance will be used solely for ownCloud. And lastly, the range of features demonstrated here will be limited to just the contact and calendar capability. For a complete overview of the platform, visit the ownCloud website: https://owncloud.org Note: There is a community driven ownCloud project (.org), and a commercial project (.com). Be sure to distinguish between the two. Note: For a fully secure transfer of personal data be sure to follow the steps closely once the application is functional. So let’s begin by spinning up an EC2 Instance… — Spin up an EC2 Instance — – Sign up for AWS Free Tier: https://aws.amazon.com/free/ – Launch an Amazon Linux AMI EC2 instance of Instance Type t1.micro – Make note of the public ip address assigned to the EC2 Instance – Optional, yet highly recommended: secure port 22 and ensure 80 and 443 are available to 0.0.0.0 — Install Dependencies and ownCloud — Note: Install the packages in the order shown here. Doing otherwise results in a lot of dependency conflicts. – ssh to the instance and run the following: # yum install -y wget httpd php php-pear php-gd php-xml php-intl php-mysql php-curl curl libcurl – The EPEL repository will be available by default on this AMI. Here we’ll enable it for a couple more packages: # yum --enablerepo=epel install php-pear-Net-Curl php-pear-MDB2-Driver-mysqli – Now add the entry for the owncloud repository # cd /etc/yum.repos.d/ # wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_CentOS-6/isv:ownCloud:community.repo # yum install owncloud – Assuming all has went well, start Apache / httpd # service httpd start – Visit the following page: http://
/owncloud If ownCloud is fully functional you’ll be prompted to create a username and password for the primary admin account. Be aware this is taking place over port 80 (without encryption), so either be prepared to change this password once encryption is in place, or skip to the section on how to configure SSL below. – Log out from ownCloud. Maybe test logging in again, restart Apache, restart the instance, etc. See if httpd is set to start at runlevel 3: # chkconfig --list # chkconfig httpd on — Configure SSL — Note: The next few steps assume a very basic SSL configuration. It may desirable to map a domain and apply a VirtualHost here. – Install and enable SSL # yum install mod_ssl – A very minimal SSL configuration /etc/httpd/conf.d/ssl.conf DocumentRoot "/var/www/html" – At this point it may be necessary to modify owncloud/config.php 'trusted_domains' => array('my.domain.com'), – In the owncloud admin interface, choose “Enforce HTTPS” — Configure Database (optional) — By default this installation is using SQlite as a database. Before adding data from apps, make a decision now about what database to use. The recommendation is that if more than one user will be using the application, use mySQL. I can attest I’ve been using SQlite for nearly a year, my data only, and haven’t had any trouble with it. Here are the docs on choosing a database: ownCloud:MySQL/Postgres/SQLite Support — (Prepare to) Import Data to ownCloud — At this point the application is configured and functional. Before migrating large amounts of personal data be sure to secure the system, verify https (SSL) is functional, install an SSL certificate if desired, change the admin password, and create a username that will be used in the configuration of various devices. Highly recommended: The ownCloud applications (via web interface) are tested prior to configuring an external application The first external application tested is from a Desktop Mobile apps are configured and tested last Only sample data is used until all troubleshooting is complete See the ownCloud documentation (User Documentation) for usage on the web interface calendar and contacts applications. This should be fairly self explanatory. Try creating a new calendar, a few calendar entries, etc. The same for contacts. Again, only sample data at this point. Don’t create, transfer, or migrate large amounts of personal data at this time! — Configure Applications (Desktop) — Configure an external desktop based application (such as iCal, Thunderbird, Evolution, etc.). Again refer to the ownCloud documentation (User Documentation) for details. For iCal I’ve done the following to configure: – In the horizontal iCal menu choose iCal -> Preferences -> Accounts -> Add an Account – Use the following: Account Type: CalDAV User Name: