In this article, we outline how to build your own cloud with open source software OwnCloud (https://owncloud.org). Two components are needed to run a OwnCloud server with your home computer:
(1) A static IP or a domain name which dynamically maps to the IP your ISP assigns to you.
(2) A computer running the OwnCloud server.
The static IP or the dynamically mapped domain name is the “postal address” to find your server on the internet. Holding a static IP is not cheap, so it is more interesting to use a dynamic IP with a domain name. You need these:
(a) Buy a domain name, for example YourDomain.com, from domain registrars, such as GoDaddy, NameCheap or Google. This usually cost about $12 a year. With a domain name, you can add subdomains as you like, for example cloud.YourDomain.com, or mail.YourDomain.com
Here YourDomain.com is a primary domain, and cloud.YourDomain.com is a secondary domain. Some registrars directly sell secondary domains attached to their specified primary domains at a lower price, such as YourSecondaryDomain.TheirPrimaryDomain.com. I do not quite like this, because TheirPrimaryDomain might be uneasy to remmember. I prefer to have my own primary domain, with which I can extend many subdomains for many different services.
Let us assume that you decide to use cloud.YourDomain.com, and you are going to run OwnCloud server on a computer YourServer.
(b) Use a free or buy a Dynamic DNS host to dynamically map could.YourDomain.com to the IP your ISP assigns to you. A domain name is like the name of a company and an IP address is its “postal address”. Because IPs are relatively scarce, most ISPs circulate IPs around its customers. Each time an active user may receive a different IP. When you type a domain name in your brower, your computer first asks some domain name servers to translate it to its IP. As your IP dynamically changes, you need a domain name sever to track its change.
A Dynamic DNS tracks the change of your IP by receiving reports from your home computer or router. If you directly connect YourServer to the internet, then you can install the client software provided by your Dynamic DNS provider on YourServer. It will automatically report changes of your IP. If you run YourServer behind a rourter, then you shall check whether its dynamic IP reporting function is compatible with the Dynamic DNS server. For example, I could not figure out how to make my dlink router report to namecheap.
By the way, if you use a dlink router, you can use http://www.dlinkddns.com to map one secondary domain in the format of YourSecondaryDomain.dlinkddns.com for free. I will discuss how to utilize this.
(c) If YourServer is behind a router, then forward ports 80 and/or 443 from the router to YourServer. OwnCloud use port 80 to run its http interface and 443 its https interface. As cloud.YourDomain.com is mapped to your router, connection to cloud.YourDomain.com will be directed to your router. Thus, you need to tell your router to relay requests to ports 80/443 to YourServer. If you use a dlink router, you can do it with the “Virtual Server” function.
(1) I bought MyDomain.com from 1and1. By the way, they suck, I will definitely transfer to another registrar after finishing my one year term.
(2) I added subdomain cloud.MyDomain.com for my cloud service.
(3) I tried to use namecheap’s freeDNS, so I changed the name server associated with MyDomain.com to namecheaper.
(4) Unfortunately, my dlink router is not compatible with namecheap’s freeDNS, so I utilized http://www.dlinkddns.com’s free dynamic DNS service for dlink customers.
(4a) I got a free secondary domain name MyCloud.dlinkddns.com, and setup my dlink to report its IP to http://www.dlinkddns.com. dlinkddns only supports secondary domains in the format xxxx.dlinkddns.com.
(4b) So fare I had two domain names: cloud.MyDomain.com which I preferred and MyCloud.dlinkddns.com which I used for its free dynamic DNS. How to combine them? I set the cname of cloud.MyDomain.com to MyCloud.dlinkddns.com.
(5) I forwarded ports 80/433 from my router to MyServer inside my LAN.
The mapping chain of cloud.MyDomain.com is:
cloud.MyDomain.com (via namecheap’s cname map) ->
MyCloud.dlinkddns.com (via http://www.dlinkddns.com’s dynamic DNS) ->
MyRouter (via its Virtual Server function) ->
Please note that it is unnecessary to use namecheap’s freeDNS here. I can just use 1and’s cname service, but I dislike 1and1 so much that I avoid their services as much as possible.
Choosing a good registrar will save you a lot of trouble. Google looks to be a good provider. They charge $12 for a year, with private registration and more importantly it includes dynamic DNS!
namecheap is good, but unfortunately they are incompatible with my dlink router.
http://dyn.com has stopped its free service, so you have to go to alternatives.
GoDaddy is popular, but they do not include dynamic DNS.