Setting up my HomeServer – Part 3

I have so far written about:

and this post is about how I use Nomad to deploy software.

But before that…

I have some updates in the networking department. I had mentioned in Part 2 that, I use Nginx as a reverse proxy to route traffic from the internet into my public apps like Misskey.

By picking up the cues from Nemo’s setup, I experimented with Traefik and replace Nginx with Traefik. It was made easier by the fact that Traefik fully supports Nomad service discovery. That means, I don’t have to run something like Consul just to handle the service to Traefik Proxy mapping.

Running Traefik

I was running Nginx as a Systemd service in the OCI virtual machine and Nomad was limited to running services in my Intel NUC. While moving to Traefik, I configured the OCI VM as a Nomad client and attached it to the Nomad “Cluster”. Since Nomad is running on the Tailscale network, I didn’t have to fiddle with any of the networking/firewall stuff in the OCI VM, making the setup simple.

Traefik is run as a Docker container in the VM with the “host” network mode so that it listens to the VM ports 80/443, which are open to the outside internet. I have specifically mapped the Traefik dashboard to the “tailscale” network, allowing me to access the dashboard via SSH tunneling without have to have the 8080 port open to the rest of the world.

// Nomad configuration

    network {
      port  "http" {
        static = 80
      }
      port "https" {
        static = 443
      }

      port "admin" {
        static = 8080
        host_network = "tailscale"
      }
    }

    task "server" {
      driver = "docker"
      config {
        image = "traefik:2.9"
        ports = ["admin", "http", "https"]
        network_mode = "host"
        volumes = [
          "local/traefik.toml:/etc/traefik/traefik.toml",
          "local/ssl/cert.pem:/etc/ssl/cert.pem",
          "local/ssl/private.key:/etc/ssl/private.key",
        ]
      }
    }

Deploying Applications

All the services are written as Nomad Job specifications, with a specific network config, and service definition. Then I deploy the software from my laptop to my homeserver by running Terraform.

Ideally, I should be creating the Oracle VM using Terraform as well. But the entire journey has been a series of trail and error experiments, that I haven’t done that. I think I will migrate to a Terrform defined/created VM once I figure out how to get Nomad installed and setup without manually SSHing into the VM.

Typical Setup Workflow

Since, most of what we are dealing with are web services, I haven’t run into a situation where I had to deal with a non-docker deployment yet. But I rest easy knowing that when the day comes, I can rely on the “exec” and “raw_exec” drivers of Nomad to run them using pretty much the same workflow.

Dealing with Secrets

One of the biggest concerns about all of this is dealing with secrets like, DB credentials, API Keys, ..etc., For example, how do I supply the DB Username and Password to the Nomad Job running my application without storing them in the Job configuration files which I have on version control?

There are many ways to do it, from defining them as Terraform variables and storing it as git-ignored file withing the repo to deploying Hashicorp Vault and using the Vault – Nomad integration (which I tried and found to be an overkill).

I have chosen the simpler solution of storing them as Nomad Variables. I create them by hand using the Nomad UI, and they are defined with specific task access.

An example set of secrets

These are then injected into the service’s container as environment variables using the template block with nomadVars.

// Nomad config for getting secrets from Nomad Variables

      template {
        data = <<EOH
{{ with nomadVar "nomad/jobs/owncloud/owncloud/owncloud" }}
OWNCLOUD_DB_NAME={{.db_name}}
OWNCLOUD_DB_USERNAME={{.db_username}}
OWNCLOUD_DB_PASSWORD={{.db_password}}
OWNCLOUD_ADMIN_USERNAME={{.admin_username}}
OWNCLOUD_ADMIN_PASSWORD={{.admin_password}}
{{ end }}

{{ range nomadService "db" }}
OWNCLOUD_DB_HOST={{.Address}}
{{ end }}

{{ range nomadService "redis" }}
OWNCLOUD_REDIS_HOST={{.Address}}
{{ end }}
EOH
        env = true
        destination = "local/env"
      }

Accessing Private Services

While this entire project began with trying to self host a Misskey instance as my personal Mastodon alternate, I have started using the setup to run some private services as well – like Node RED, that runs automation like my RSS-to-ActivityPub bots.

I don’t expose these to the internet, or even the Tailscale network at the moment. They are run on my home local network on a dynamic port assigned to by Nomad. I just access it through the IP:PORT generated by Nomad.

Node-RED running at local IP and Dynamic (random) port

I will probably migrate these to the Tailscale Network, if I start traveling and would still want to have access to them. But for now, they are just restricted to my home network.

Conclusion

It has been a wonderful journey figuring all of this out over the last couple of weeks and running the home-server has been a great source of satisfaction . With Docker and Nomad, it has been really easy to try out new services, and set them up quickly.

I woke up on a Sunday and wanted to setup Pihole for blocking ads. I had the house running via Pi-hole in 30 mins. I have found a new kind freedom with this setup. I see this as a small digital balcony garden on the internet.

References

  1. Understanding Networking in Nomad by Karan Sharma
  2. Translating Docker Compose & Kubernetes to Nomad by Luiz Aoqui
  3. Nomad Past Present and Future by Luiz Aoqui

Setting up my HomeServer – Part 2

In part 1, I wrote about the hardware, operating system and the software deployment method and tools used in my home server. In this one, I am going to cover one topic that I am least experienced in – Networking

Problem: Exposing the server to the internet

At the heart of it, this the only thing in Networking I really wanted to achieve. Ideally the following is all I should have needed:

  1. Login to my router
  2. Make the IP of my Intel NUC static, so that DHCP doesn’t assign a different value every time it reboots
  3. Setup port forwarding for 80 (HTTP) and 443 (HTTPS) in the router to the NUC.
  4. Use something like DuckDNS to update my domain records to point to my public address.

I did the first 3 steps, and tried to hit my IP. Nothing. After some searching on the internet, I came to realize that my ISP doesn’t provide Public IPs for home connections anymore and my router is under some NAT (don’t know what it is).

Before I outline how everything is setup, I want to highlight 2 people and their self-hosting related blogs:

  1. Abhay Rana aka Nemo’s Setup
  2. Karan Sharma’s setup

Their blogs provided a huge amount of inspiration and a number of ideas.

Solution: Tailscale + OCI Free VM

After asking around, I settled on using Tailscale and a free VM on Oracle Cloud Infrastructure to route the traffic from the internet to the VM.

Here is how Tailscale helps:

  1. All the devices that I install Tailscale in and login becomes a part of my private network.
  2. I added my Intel NUC and the Oracle VM to the Tailscale network and added the public IP of the Oracle VM to the DNS records of my domain.
  3. Now requests to my domain go to the OCI VM, which then get forwarded to my NUC via the Tailscale network.

Some Tips

  1. Tailscale has something called MagicDNS which once turned on allows accessing the devices using their name instead of their IPs. This allows configuring things quite easy.
  2. Oracle VM’s by default have all of their Ports Blocked except for 22 (SSH). So after installing the webserver like Nginx or Apache, 2 things need to be done:
    • Add Ingress Rules allowing traffic to ports 80 and 443 for the Virtual Cloud network that the VM is configured with
    • Configure the firewall to open the ports 80 and 443 (ufw allow <port>)

I think there are many ways to forward the requests from one machine to another (OCI Instance to Homeserver in this case). I have currently settled for the most familiar one – using Nginx as Reverse Proxy.

There are 2 types of applications I plan to host:

  1. Public applications like Misskey which are going to be accessed by anyone who wants to.
  2. Private applications like Node-RED which I am going to access 99.99% from my laptop connected to my home-network.

I deploy my public applications to the Tailscale Network IP in my homer server and make them listed to a specific port. Then, in the Nginx reverse-proxy configuration on the OCI VM, I set the proxy_pass to something like http://intel-nuc:<app-port>. Since I am using Tailscale’s magic DNS, I don’t have to hard-code IP values here.

For Private applications, I simply run them on the Intel NUC’s default local network, which is my router and other things connected to it (including my laptop) and access it locally.

Up next…

Now that the connectivity is sorted out, the next part is deploying the actual application and related services. I use Nomad to do that. In the next post I will share my “architecture” and how I use Nomad and Terraform to do deployments and some tricks I learnt using them.

Personal Bookmarking using YACY & yacy-it

A recent post on HackerNews titled Ask HN: Does anybody still use bookmarking services? caught my attention. Specifically, the top response which mentioned a distributed Search Engine YACY.

The author of the post mentions how, he has configured it to be a standalone personal search engine. The workflow is something like this:

  1. Browse the web
  2. Come across an interesting link that you need to bookmark
  3. Add the URL to the YACY Crawler and crawl to the depth=0, which crawls just that page and indexes it.
  4. Next time you need it, just search for any word that might be present on the page.

This is brilliant, because, I don’t have to spend time putting it the right folder (like in browser bookmark) or tagging it with right keywords (as I do in Notion collections). The full text indexing takes care of this automatically.

But, I do have to spend time adding the URL to the YACY Crawler. The user actions are:

  • I have to open http://localhost:8090/CrawlStartSite.html
  • Copy the URL of the page I need to bookmark
  • Paste it in the Crawling page and start the crawler
  • Close the Tab.

Now, this is high friction. The mental load saved by not tagging a bookmark is easily eaten away by doing all of the above.

yacy-it

Since I like the YACY functionality so much, I decided I will reduce the friction by writing a Firefox Browser Extension – https://github.com/tecoholic/yacy-it

This extension uses the YACY API to start crawling of the current tab’s URL which I click the extension’s icon next to the address bar.

Note: If you notice error messages when using the addon, you might have to configure YaCy for CORS headers as described here https://github.com/tecoholic/yacy-it#configuring-yacy

Add pages to YaCy index directly from the address bar
Right-click on a Link and add it to YaCy Index
If you running YaCy on the cloud or in a different computer on the network, set it in the Extension Preferences

Tip – Search your bookmarks directly from the address bar

You can search through YaCy indexed links from your addressbar by added the YaCy as a search engine in Firefox as describe here => https://community.searchlab.eu/t/adding-yacy-to-firefox-search-menue/95

  1. Go to Setting/Preferences => Search and select “Add search bar in toolbar
  2. Now Go to the YaCy homepage at http://localhost:8090
  3. Click the “Lens” icon to open the list of search engines
  4. This should now show the YaCy icon with a tiny + icon. Click that to add it as a search engine.
  5. Go back to search settings and select “Use the address bar for search and navigation” to hide the search box
  6. Scroll down to Search shortcuts -> double click the Keyword column next to the Yacy and enter a keyword eg., @yacy or @bm
  7. Now you can search Yacy from the address bar like @yacy <keyword> or @bm <keyword> to look through your bookmarks.

Goodbye! Brave

Final Update (moved old updates to bottom)

Brave supports Chrome extensions. The problem was with the author’s version of Brave; it was roughly a year old. Very old versions of Brave didn’t include service keys (necessary for interacting with Brave’s privacy-preserving proxy-service), whereas modern versions do (which is why you and I are able to install extensions without any issue)

Sampson from Brave

To explain – the place I have installed Brave hasn’t made available any newer versions of the browser since December 2020. So the keys it shipped with have become outdated. Since no-update was available, I didn’t see the usual orange “Update” button on the taskbar.

⚠️ NOTICE: Closing comments as they have moved from discussing the issue to attacking me for not being crypto friendly.

Original Post

I have been using the Brave Browser for almost 2 years I think. @logic introduced it to me at some point and it has been my primary browser both in Desktop and Mobile, home and office computers since then.

I got my first heads up when I came across a post on HackerNews about Brave misbehaving due to the “Brave backend servers” being unreachable. It struck me as strange when a comment on the Github ticket mentioned that Brave servers need to be up for Brave to function.

This is a big design NO-NO for something as essential as a web browser. But then, the inertia of it being a daily driver, its amazing ad-blocking and tracker protection, Chrome extension compatibility, and the fact I haven’t faced any such issues prevented me from doing any changes.

Today I was looking to install an extension to manage the browser tabs and I ran into this

Can’t install any extension

I thought maybe the extension was buggy and tried a couple more and the same result for everything. And searching for the error led me to this Github Ticket, which again describes that it is a “server-side” issue and it was fixed.

Well, it is not fixed for me. But that’s beside the point. This amount of dependency for a browser to have on “backend servers” is ridiculous. For software, as important as a browser, through which I have come to access almost everything digital for me is unacceptable. So with this post being the last thing I will do on Brave, I will bid goodbye.

Exploring options…

  1. An interesting alternate is Vivaldi – It is trying to do what Opera was doing pre-Chrome. It rolls email, calendar, RSS reader, browser all into one and also provides built-in ad-blocking.
  2. Open source Chrome aka Chromium – This used to be my primary dirver before. So I am thinking of going back to it with the usual extensions like Ghostery, AdBlock+..etc., Not sure how much things have changed there.

Update:

Not sure who posted this in HackerNews. Thanks for all the feedback.

  1. I will be trying Firefox. So many people have recommended it. It’s something I have forgotten over the last couple of years and before that it frequently caused issues and was only my secondary browser for testing.
  2. There is nothing sinister about the decision or PR at work. I tried installing extensions, it didn’t work, I uninstalled and made a note of why I am doing it. Interpretations are all yours.

Update 2:

This is for people suggesting I jumped the gun and probably didn’t take the time to understand the real problem. I am an Chrome extension author myself, I had just published a new version of it only 8 hours before and tested installation on Brave and Chrome. So, I understand the issue. And I have linked to GitHub issues where this has been discussed.

Net-neutrality. This is why.

This post is a reply to the previous post by me titled Why Net-Neutrality? or Why not tiered pricing?.

After a hour long discussion and debate with a couple of people, these are the things that tell me why net-neutrality is essentially a social issue and not a capitalist one. I am going to outlay the arguments that I made in the previous article and try to point out the flaws and get a better understanding.

1. Greed of companies like Netflix and YouTube

The flaw with the argument “since these services use the ISP’s pipe for their service, they owe a part of income to the ISP” is akin to arguing a runner ran through this road to win his marathon and thus owes a part of the prize to the local government.

The point that it is streaming that clogs the pipe is countered by the argument that it is precisely because of those services, the size of the pipe is getting bigger and definition of broadband internet getting revised to higher speeds.

2. The cost of usage

I have argued the one difference between electric company and ISP is the cost of usage. While an electric equipment doesn’t mean recurring income to the manufacturer, a web service gets an income. Thus there is cost involved in usage of internet services which the ISPs want a slice of.In short, the ISPs are greedy.

Because the initial cost for both the internet and electric connection are very similar. Replace the electric line with a coaxial or CAT line, replace the local transformers with switches and repeaters, replace the high tension substation transformers with the servers of ISP, we have almost exactly the same setup except only electricity is an utility and internet is not

3. More speed more money

I argued why would any ISP want to create a slow lane if they make more money for more speed / more volume. Simply put, why would there be a fast lane and a slow lane?

It seems that it is exactly for the same reason “more speed/volume more money”. In a situation when the ISP can more money why would he be willing to give out a connection involving the same initial costs for a low volume low income connection? The flaw here is assuming that volume/speed is limited and the ISPs are really worried about their precious resource from getting sucked up by the streamers. I should have known better.

Finally

I previously concluded,

I as a layman consumer is completely ok with the current state of affairs and don’t mind if the billing becomes usage based, or someone creates a fast-lane for those who pay more as long as the slow lane is at the mandated minimum speed, which is the present case anyways.

Though I still say the same, I would say it in fewer words – I want a neutral net, which is the present case anyways 🙂

Why Net-Neutrality? Or Why not tiered pricing?

Update: Kindly read the follow up article Net-neutrality. This is why.

I have genuine question. Why net neutrality? I know there are reams of pages of content answering the question, but I am asking from a completely lay man non-techie version of the question. Why? The only answer that I seem to get is – It protects the interests of the consumer.

Interest or Greed?

The current pricing model used by the internet service providers is something akin to an electric connection. They give you a line to use and bill based on the connection speed and the quantity of data or amount of time you spend online. The electric company doesn’t worry whether you use a geyser or lamp as long as you pay the bill. Similarly the present ISP models doesn’t care whether you stream YouTube or read Wikipedia. The analogy seems extremely apt, except for one difference – the cost of usage.

In case of an electric connection, you buy any equipment that you want to use and pay the cost of the hardware. The more you use the more the electric company gains, the equipment manufacturer gets nothing most of the time. Exceptions like cable TV exist, but again cable is another utility altogether and we will get into that shortly. But in case of the ISP, you buy services over its line which earns money for those services. In this case it is completely opposite; the ISP gains almost no money no matter how much you use any kind of service over their lines.
For example, using geyser on a daily basis could consume a lot of energy and prove to be great revenue for the electric company, whereas streaming movies 24×7 is going to benefit only Netflix of YouTube and does nothing to the ISP except choking their lines.

The ISPs this want to take a part of the money paid to the service as it also utilizes on their resource. The invention of thing like Fair Usage Policy (FUP) is a way to limit this choking of the lines.
So when companies like Google talk about net neutrality (against tired pricing), the real question is whether the company is really trying to protect the consumer or just trying to enjoy the free ride that it currently enjoys.

The Cable TV Pricing

From a consumer standpoint this is certainly against the interest because we don’t really want to pay more for certain services. It is time we visit the cable TV evolution and see what the consumer really has said and done about it.

Initially there were there was only one way of getting satellite TV – Using a Dish Antenna. The intial investment was huge. Then came cable operators, who charged a certain amount of fees for certain number of channels, no choices, all just paid an amount. After that came the Direct to Home (DTH) services replacing the cable TV operator with a corporate body. Until to this day we pay per channel, called packages. And the customer has hopped on merrily with some noises here and there. Nothing in the transition has affected the channels’ (services) revenue.

Applying the same route, we are currently in the cable operator state, where the ISP is giving us a cable, we pay an amount. If the model evolves into one which prices textual data, VOIP, and media streaming at different rates, like that of a channel based DTH pricing, and bills the consumer on what is consumed, a lot of people would might end up paying a lot more as well as a lot less. Just as I avoid all sports channels, I might avoid all VOIP usage. If I am programmer, most of my requirement is software package and code, there is no need for me to pay more. But people preferring YouTube to TV would pay a lot, and thus reduce revenue to business like Apple TV, Google TV, Netflix, etc., but taking away a share of the pie. So for me a consumer, paying on how much traffic I use seems as much legit as big truck paying more than car on a toll road, simply because I use more resource.

This argument so seems biased towards ISPs. What if things like the ones below, said in Wikipedia, happens?

From Wikipedia
Neutrality proponents claim that telecom companies seek to impose a tiered service model in order to control the pipeline and thereby remove competition, create artificial scarcity, and oblige subscribers to buy their otherwise uncompetitive services.

From HuffingtonPost
A fast lane would let some websites operate at higher speeds and essentially relegate many sites — likely smaller, less-moneyed ones — to a slower pace.

Where are the regulatory authorities who enforce mobile communication and telecommunication pricing? Why such an authority can’t be created and clear rules saying what could and couldn’t be charged drafted? Why can’t things like slow lanes be completely outlawed? Say we create a law which says Non-profit sites like Wikipedia, Khan Academy should never be charged (extra) even for streaming content and pricing can only be done on For-profit entities like YouTube and Netflix. Calls for making internet a utility are a step in this direction of regulation. Why would anyone really want to create a slow-lane if more speed and more data transfer results in more money for the utility provider?

So.,

The entire thing about raising hue and cry over differentiated pricing seems to be for only one reason – Greed.
The greed of the companies to make money. They pull us, consumers, into the issue by terrifying us that our bills would shoot sky high and ISPs will fleece consumer. If that is the real issue, I think it is better dealt by talking to (or even creating new) regulatory authorities, consumer protection agencies and other similar governmental organizations and certainly not by tactfully converting a purely capitalistic issue a social issue involving rights and freedom.

I as a layman consumer is completely ok with the current state of affairs and don’t mind if the billing becomes usage based, or someone creates a fast-lane for those who pay more as long as the slow lane is at the mandated minimum speed, which is the present case anyways.

Facebook Account Deletion

I just now deleted my Facebook account.

Why?

  1. Freedom – Day by day using it makes me feel as if someone is dictating me how and what I should be talking to people about. The rampant, out of the blue censors by law enforcement and judiciary are the reasons. Even though I have never been a part of any such action, the atmosphere is getting too toxic over there in that domain.
  2. Irrelevancy – Most of the content that I encounter on my timeline are completely irrelevant to me and the only content that I engage with are blogs like Lifehacker and posts of a set of very few friends, both of which I think I can do without having to endure a non-free environment.
  3. Privacy – It has been a great concern for me ever since I became aware of its importance and ethics. Somehow kept telling myself, nothing would affect me. I think underestimating risks is something I am unwilling to do these days after reading “Fooled by Randomness“.
  4. Paranoia – Closely connected to “Privacy” – I was always thinking what if someday I discover that all the stuff that I have shared is sold/shared to someone and that someone uses it for purposes I never suppose it to be? Am I planning murder? No. But what if someone frames me for it? I am NOT paranoid by nature, I walk 1 among the billion+ in the country. But again, not all billion+ walk around recording data about what they read, where they go and what they think.
  5. Narcissism – One of the biggest effect of Facebook on character is, I think, breeding narcissism. It breeds a kind of self importance and provides an easy sense of achievement and forces a person to project a personality, real or otherwise. This becomes especially stressful when considering the fact when one is connected to all sorts of people from high school friends to working colleagues. A few recent encounters with people has left a bad taste in  mouth about the whole “sharing” thing.
  6. Spam – Spam, spam, spam – there is just no end to it. I am generally very efficient in ignoring Ads and spam because all that I look for is content from people and never click any link other than blog-posts. But most of the time genuine and original content is very hard to come by and all sorts of false claims on history, technology, identity creep in along with celebrity, movie and all sorts of eye-ball catching stuff.

After considering all this, the most logical decision to make seems to be to leave the system and reduce a lot of responses that brain generates due to unnecessary stimuli.

Will I ever get on a social network again?

I currently do not have an answer to that. There are a lot of things to be considered as listed above and see how they play out to make a decision. With the current turmoil of internet censorship across the world, misuse of it as tools of destruction, authoritative control, capitalist bait holder, and as an enterprise looking to make money indirectly by using my data, I don’t think I am getting onto it (FB) any time soon. I specifically mean FB here because, there exists an alternate platform called Diaspora* which deals with all of my above concerns (okay, maybe not narcissism), but  jumping into such a platform is pointless if I don’t really have the people I want to interact.

Session Signup – A Coding Project

Update: This project never took off from the drawing board.

I work for Teach For India as a Fellow now and we have Teacher Development workshops, City Conferences once in a month where there are multiple sessions which provide technical training on multiple things at the same time. So we have a system where the Fellow chooses the sessions he wishes to attend. Presently here is how the session signup process works.
Signup_Automation

I am thinking of automating the red circle region by writing a web application that can run on Google App Engine. Since our organization uses Google Apps account for its IT needs. I think the integration could be more easily done with almost no cost.

Update 1:

Initiated the project using the Google App Engine. Signed up for a 60 Day & $300 credit Free trail from Google Cloud Services. – December 2,2014

E-Books & DRM for the Simple Man

What are these E-Books?

E-Books, in short for Electronic Books, are digital forms of Books. These were created, so that we all could read books in our personal computers, cellphones, tablet computers, or even dedicated devices like Kindle.

What is this DRM?

DRM, in short for Digital Rights Management, is a technology used by companies producing digital content in the form of music, ebooks, games, software ..etc., to restrict the misuse of the content. For example, you buy a software for your personal computer, but you want to install the same software in your friend’s computer, DRM helps in preventing you from doing it. Because, it is you who has paid and your friend cannot have it for free.

So what is it with pricing and DRM?

In a game situation, it is a all gain or all lose stance for the publisher because, if the game is good, more people want to play it, if it is bad, no one wants to play. The pricing and the DRM has to be perfect for the content creator-cum-publisher to make money. If the game is great and has no DRM, then it can be distributed over the internet and still end up as loss for the publisher.

In a book situation, it is a complex thing. Making it simple, the writer gets a amount of money to cover his bread if he gets a publisher to publish his book. The publisher gets to pay his bills if the retailer could sell more number of books than a threshold level, and finally the retailer gets to feed his family by taking a profit selling all kinds of books. So where does DRM and Pricing come into picture? Pricing comes into picture with the publisher, he has to set the correct price, so that all the three could benefit.

And DRM …

As you can see that it is publisher’s head ache to tune the pricing to sell more number of copies, so one would assume it is his work to set right the DRM as well. But that doesn’t apply to ebooks. The people who actually do it in case of e-books are the retailers like Amazon, Apple, and Flipkart.

Why is that?

It is because a publisher is NOT needed anymore. A publisher was need in the 20th century to get the manual work done, like proofreading, typesetting, sourcing paper, printing and selling. Perhaps a century or two back, there wasn’t any publisher. There were writers and printers, that’s all. It was the writer’s headache to sell his books. Coming back to the 21st century, in the digital era, there is no typesetting, no papers, no printing. The author proofreads and the retailer sells. Now all we have left in digital book scenario is the content creator and the retailer. And retailer decides the pricing, hence the DRM.

To give a real life example, the cost of Hunger Games Part 2 was $6.78 the moment after I bought Part 1 in Amazon, but dropped to $3.75 when I bought a month later. Now Amazon is trying to sell me Part 3 for some $9.45. (sigh) This is how retailers manipulate prices for gains.

Who benefits from this DRM?

Obviously the Writer and the Retailer.

Who is affected by DRM?

You and me. The people who read books.

How?

In order to understand how, first we need to see what a idle digital book could offer us.

To put simply, it offers seamless usage in all things digital. An idle ebook, could be read in any device you choose, can be annotated anywhere you want, can have any number of bookmarks, highlights, notes attached to any place in the book. You could buy a book and your whole family could read it at the same time, instead of waiting for turns. Instead of photocopying pages of your interest, you could take clean printouts with custom typeset and paste in your bedroom walls. You can read one page at home computer, next in phone as you commute and the next perhaps in your school/office tablet. And the possibilities are endless. Content sharing would be intertwined with our lives so much that we wouldn’t really be talking about books as objects as we see it today. Think about it, the entire collection of books in the state library accessible from anywhere by anyone and still be able to use it as his personal book. It is a book lover’s paradise. But mind it, all for a price and not free.

But DRM, in its present state, takes away your liberty to use the book the way you want completely and makes you use it how the retailer tells you to do it. All the fantastic things in the above paragraph will remain a fantasy with DRM. Moving a step down, the DRM that now exists removes whatever liberty that even printed books provided.

Here are the pain points:

  • Sharing: Physical books could easily be shared between family members, friends, co-workers, teachers and students. No longer. Either you will have swap the device itself that contains the book or buy buy separate copies. What we see as a convenience, the writers and publishers seem to see it as a nuisance. They have found a way to stop this sharing and increasing their sales through DRM. What we see as savings, they see it as potential losses. Which means, what the freedom that digital era brought, was usurped by the same digital tech called DRM. Now people cannot share the books they buy even with their kids.
  • Walled gardens: Multiple device sharing being a very important advantage of digital content, retailers are rolling out applications for all major platforms, so that the same book could be shared between multiple devices seamlessly. But the catch is, they will dictate how wee do it. For example, you cannot buy a book to be read from Amazon and read on a device other than one supported by Amazon. Which means, Amazon dictates how I use my book where. If you are going to buy books from multiple retailers, you are going to end up in multiple islands with a character and climate of their own; unlike a physical book which remains the same irrespective of the retailer.
  • Content: Using the content the way we want is one best thing digital technology gives us. You could use the same text in umpteen different ways in umpteen different contexts with very little physical effort. You could quote complete paragraphs effortlessly, print your favourite versus or even make posters of famous quotations typesetting as per your like. But it is all a no go with DRM. No copying content anywhere. One could of course make posters and small passage print outs with a bit of workarounds. But they again are based on the whims and fancies of the retailers. For example Flipkart doesn’t allow you to share more than 140 characters.
  • File Formats: Almost all the weapons of DRM are wielded by the hand called file format. The same book is sold in different formats by each retailer that can only be read by his software or device, which means, you cannot open a Flipkart book in Amazon device. Even in your phone you need to install two different software for books from different retailers and save any notes you make in two different software. All of which makes one wonder, whether technology is making our lives simpler or more complex. The worst of this multiple format nightmare is they cannot be converted from one to another easily bring more pain than ease.

With the above restrictions imposed by the retailers, the e-books actually look like a step back in the technology that a step forward in the life of books. It is not technology that is at fault here, open formats like EPUB exist solely for e-books, which could be used by any retailer. But retailers choose DRM over open standards, and that creates the mess for common people like us.

What does the future hold?

I am unsure how the future will unfold. There has to be a perspective change in the publishing industry for openness to occur and all the benefits of digital books to be harnessed. The view of seeing ebooks just like conventional books and fixing costs per unit sales and restricting their usage has to change. Just like software, books with better features could be sold for different prices, say a open format book would cost a dollar more than a retailer specific format. Provide additional formats, content copying abilities, multiple device support, etc., could be added at an additional cost. And that could create a new dynamics in book pricing. Or may be someone creates a open store where an author could publish his book and is free from all the retailer and DRM mess.

And I am hoping for such a day.