Concerned about Brexit? Why not become an e-resident of Estonia

The most advanced digital society in the world is a former Soviet Republic on the edge of the Baltic Sea

The most advanced digital society in the world is a former Soviet Republic on the edge of the Baltic Sea.

And by handing over €50 [since this story was published, this price has increased to €100] and a ­photograph, allowing my fingerprints to be taken and waiting a few weeks while my ­credentials were verified, I have been issued with an identity card, a cryptographic key and a PIN code to access its national systems. I am now an official e-resident of the Republic of Estonia, as is the Japanese prime minister, and you will want to be one, too. And what's more, by doing so, you'll be part of a system that could not only reinvent public services for the internet age, but ­fundamentally redefine what it means to be a country.

But first, let's back up. When Estonia gained independence from Russia in 1991, it quickly realised that it needed to find something to set itself apart from its neighbours. Norway had oil, Finland mobile phones, Sweden design. But as Taavi Kotka, the Estonian government's chief information officer, asks, what do you think of when you think of places like Lithuania or Slovenia? Nothing, he says, and so to become distinct, Estonia has embarked on massive technological innovation.

It's hard to see this when you're there. The capital, Tallinn, feels a little battered. Though the oldest parts look like the set of a low-budget Game of Thrones, the Soviet breeze-block architecture in the rest of the city reminds visitors just how cold it is in winter. International brands mix with local burger chains with slightly off typography. It doesn't scream San Francisco, put it that way.

But what Estonia has achieved makes the Northern Californians look like laggards: despite only half of the country having a phone line in 1991, by 1997, 97 per cent of Estonian schools were online. In 2000, cabinet meetings went paperless. By 2002, the government had built a free Wi-Fi network that covered most of the populated areas. By 2007, it had introduced e-voting, and by 2012 huge amounts of fibre-optic cabling were being laid – promising ultra-high-speed data connections – and 94 per cent of the country's tax returns were being made online, taking users an average of five minutes to fill in the parts that hadn't been automatically completed by the link between the tax office and local banks. Now, every task that can be done with a digital service, is.

The frost-eaten potholes in front of the shopping mall are deceptive – this is a society that is putting itself above such atoms-based matters. Today, almost all government services are managed online. Citizens, armed with a chip-and-pin identity card, can run their affairs from a laptop or phone, anywhere there is connectivity. And the Estonian government wants to offer you the chance to do the same thing.

From summer 2015, you can go to the nearest Estonian embassy and apply for e-residency. When I made my application, in March 2015, I had to go to a police station in Tallinn and fill in a form in front of a police officer. This will soon be done electronically but, for now, the interface is a real person behind a long row of desks. Applicants take a numbered ticket and wait for an electronic display to change, before sitting at a desk with an official. So many government services are delivered digitally nowadays that the police stations have become more general purpose, with the feeling of an office that'll only be around until the printer ink runs out. You're joined in the queue-gloom by members of the Russian-speaking minority and their children applying for passports or reporting lost ID cards. Giving my personal details, fingerprints and photographs to a uniformed officer of another state – one that was once part of a system that I grew up thinking of as the enemy – I try and do the mental arithmetic about the officer's age. Is this the only uniform she's ever worn? Was she a baddie once?

Twenty-four years after the end of the Soviet Union, this still feels weird. I feed the Estonian system with enough data to prove that I'm who I say I am; there's allegedly a background check and then a few weeks later I get an email telling me to fly back to Tallinn and collect my card. The snow has melted but no one has washed their car yet, and the old man in the police station – who definitely seems like he might have been a baddie once – hands over a cardboard box. Within is my card, a USB reader, a sealed envelope with my PIN code and an invitation to visit a particular URL. I have become, while only planning a few more hours in the country, an e-resident of Estonia. I feel like saluting.

But back to the idea. You want to open a business, say; once you have your card, you can go online from wherever you are on the planet, log on to the government portal with your card and PIN, and use it to form your Estonian company, then register with an Estonian bank and start trading. Because the Estonian tax office is digitally linked to Estonian banks, filing your taxes is radically simple – remember the five-minute average from a few paragraphs back? So too is any bureaucracy involved in keeping the company going. After all, these are Estonian digital services we're talking about: it's across the web, secured with your ID card.

And that's the opportunity, because Estonia is working on linking its tax office with its counterparts in other regions of the world. The Estonians want to offer the option for, say, UK citizens to run their UK companies through the Estonian system, which would in turn, in the background, with no extra work for the user, make sure that the UK tax office receives all the money it is legally due. A UK-based entrepreneur, they hope, will decide to open her business in Estonia, use an Estonian bank and pay for some Estonian services, even if the company was only going to be trading in the UK, because she would find Estonia's national infrastructure far easier to deal with than the UK's. In other words, a nation is now competing with its neighbours on the basis of the quality of its user interface. Just as you might switch your bank to one with a better mobile app, the Estonians hope you'll switch your business to a country with an infrastructure that is easier to use.

To be clear, this doesn't involve actually becoming Estonian, or even physically being in Estonia. There may be only 1.3 million Estonians, but they're perfectly happy with the arrival of non-nationals. Instead, they're hoping to spread the ideas of their powerful internet-based services and promote their national brand, in order to coax others to use them from afar. And perhaps also to spread the idea to other countries that such a thing is possible. "We don't really like to speak to each other in person, so we went and created Skype and all these things," says Siret Schutting of the government project e-Estonia. "Stuff like this has to be a social right."

In the pine-lined IKEA-esque government showroom of Estonian innovation there is no-one over 30 – it feels more like the offices of a volunteer-led arts organisation than an international showpiece – but foreign delegations visit every week in order to learn from the Estonian experience. Introducing the ID card, Schutting tells those visiting leaders, is a gradual process: "When you introduce an ID card, you get a lot of people asking, 'Why do I need that?' But then you add all of these services, and you can purchase a car from your living room, or vote from your living room or, when it's like minus 40 outside and you have a newborn baby, you probably don't want to go to the family office to name her: you do that online. Very small, pragmatic things."

Today, the fact that every interaction with, and within, the Estonian government happens digitally has had subtle social effects. For example, apart from only carrying two cards (driving licences, donor cards and the like have been subsumed into identity cards), Estonians have complete control over their personal data. The portal you can access with your identity card gives you a log of everyone who has accessed it. If you see something you do not like – a doctor other than your own looking at your medical records, for instance – you can click to report it to the data ombudsman. A civil servant then has to justify the intrusion.

Meanwhile, parliament is designed to be paperless: laws are even signed into effect with a digital signature on the president's tablet. And every draft law is available to the public to read online, at every stage of the ­legislative process; a complete breakdown of the substance and authorship of every change offers significant transparency over lobbying and potential corruption.

The culmination of these systems makes for awkward conversation with members of certain foreign governments. Strikingly young, dressed like a man who has borrowed a suit before visiting his in-laws for the first time, and sitting behind a chipped table that wouldn't make it into the caretaker's office in a western European capital, one Estonian official, who didn't want to be named, reveals that e-Estonia has a list of foreign delegations they don't bother to have meetings with any more. These countries, he says, are so far behind in their thinking that time spent with them is too dull to bear. They just stare at us, he says.

Starting on April 27, 2009, Estonian web servers found themselves under constant attack for three weeks. Huge amounts of traffic, generated by virus-infected machines around the globe, overwhelmed the country's systems. More than 120 of these distributed denial of service attacks brought down sites across the country, including those belonging to the president, government ministries, newspapers, banks and local businesses. Although the systems behind the websites weren't damaged per se, they were unreachable for that time. It was a truly modern show of force, now considered one of the first major examples of a cyberattack on a nation.

Although it's never been proved, it has always been assumed in Estonia that the attack came from the Russian Federation – if not directly, then certainly with its support. The Russians, indeed, are commonly held by the Estonian-speaking majority to be up to no good. For most of the last 800 years, Estonians have been part of someone else's empire, and it's an ingrained belief that they're destined to become so again at some point: many are, post-Ukraine, deeply nervous of Vladimir Putin. Many people in Tallinn say the same thing: we're next.

They're planning for it and the chief question is what will happen after an attack. The last time an annexed Estonia won independence, after years of rule from Moscow, the government was able to restore much of the country's land to a semblance of pre-Soviet ownership by consulting church records and other written documentation. Today, though, that documentation is entirely digital – and that makes all the difference. "The point is that it's not only the data you need to back up," says Kotka, the Estonian tech entrepreneur turned government CIO. "If you look at what happens in Ukraine, for example, it's not a war, it's a hybrid war. So if you want to affect Estonia somehow, virally, make our ID card not work. Then we're in trouble. Banking: 40 per cent of people using e-banking are using their ID card for e-banking. Take those services down, and they can't access their money and they have to go physically to the bank... and since the banks have optimised according to the need, with 99 per cent of banking transactions happening electronically, they've closed their offices. So in a hybrid-war case, we need to back up services as well as data... so if the little green men" – he means the Russians – "decide to have their holiday here rather than in the Ukraine, just to be sure that the ID card works, we'll move it to the UK."

How to become an e-Estonian

****: Since April 1 2015, you can apply online and complete your application at an Estonian embassy. All you need is your passport or photo ID.

****: When filling in the form online, you'll need your name and identifying information, a scanned passport photo, a scanned copy of government-issued identity documentation, a minimum of one paragraph describing your interest and motivations behind applying for e-residency, and payment of the state fee in the amount of €100 via Visa or Mastercard.

****: Then comes the background check, when your documents are sent to Estonia. This helps the police and border guard board with risk management and the background check. You may also be asked if you have any previous links with the country.

****: After about four weeks or so, you'll receive an email to let you know whether your application was successful. If it's a yes, you can go and pick up your identity card from one of 38 embassies.

Or, indeed, any of his six planned "data embassies" around the world. At times of national emergency the plan is to be able to hit a switch and move the execution of the code that runs the systems behind the Estonian state to another server farm, one outside Estonia. An attack, even an invasion, can't shut down the local government because it doesn't need to be local to still be a government. And even if the links are severed, eventually independence would be re-won and the state can be restored from a backup.

This can be applied not just to digital data and services; because everything from the Estonian parliament to its civil courts is paperless, they can be run from anywhere. In the old days, a government in exile would quickly lose legitimacy. Sheltering in another country, it would lack the infrastructure to do its work. But today an Estonian government in exile could just carry on. Fittingly, for a country that founded Skype, the judiciary could fly to the Caribbean, and it would mean nothing more than a series of particularly relaxed case hearings. They could be there today, if they wanted.

It helps to clarify the differences between a nation, a state and a geographical country. These things are already a bit fuzzy, but in general, a nation is a group of people within an area who perceive themselves as being the same type of person; a country is that geographical area itself; and a state is the set of political organisations that those people agree to adhere to. By disconnecting the silicon-based functions of the state from the actual soil-based country, Estonians are protecting their nation from fates that might befall their country.

But it's more than that. This is all software, and software can be easily, and perfectly, copied. So if the Estonians are successful in their efforts and they can build a digital state infrastructure that can be hosted anywhere, then there's nothing to say they can't release the code and let another nation upload a new flag gif, change some of the names in the config file and boot themselves up their own version. It doesn't have to be an officially recognised state, either: fully realised, this brings down the barrier to entry to effective statehood for the more agile, more entrepreneurial separatist movements, budding caliphates or secessionist offshoots.

As the music industry discovered in the early part of the century, when something is digitised, it costs nothing to copy it. Perhaps the world of international relations is about to learn similar lessons. After all, if we can deterritorialise a state, could we perhaps state-ify a nation?

Gathering people of specific identities together is what the internet does. We're forever building nations online. There's British TV, a communal experience, but there's no British internet: we build our own experiences individually, through the people we hang out with online, regardless of geography. It's not proximity of distance but proximity of ideas that matters. Or perhaps proximity of time zone, as Cory Doctorow's Eastern Standard Tribe had it: shift workers allied to the people whose waking hours shared the same offset from GMT, no matter if that matched a London sunset to a Los Angeles sunrise. If we choose our ­communities by interest or culture – things we can choose – rather than by closeness, which is thrust upon us by birth, why not start choosing the state-level infrastructure we actually interact with on the basis of how well it works?

In 1996, one of the founders of the Electronic Frontier Foundation, John Perry Barlow, wrote a "A Declaration of the Independence of Cyberspace". A seminal text for its time, it says: "Cyberspace consists of transactions, relationships, and thought itself, arrayed like a standing wave in the web of our communications. Ours is a world that is both everywhere and nowhere, but it is not where bodies live." When that declaration was made, it seemed outlandish because independence only went to actual nations which had all of the tools of a state. You had to have a parliament building before you could have a parliament. A state needed stuff to be of substance.

But today the Estonians are about to prove the opposite: that a state can go into hibernation. It could be backed up and turned off, reduced to a suitcase full of hard drives, only to boot back up again when the time is right.

Countries in waiting – Palestine, for example – could start to configure their own systems, building a whole state on a server, and run it all from the mobile browser. Insurgent states-within-states, like Hezbollah in Lebanon, could compete with the mainstream governments with better infrastructure, faster updates and more responsive bug fixing. Cities could institute entirely digital infrastructure and market themselves as providing a more convenient front end to their slower mother nation.

Until today, Estonia's infrastructure has only been available to Estonians. And although I may never go there again, I now have the right to use it too. According to the International Telecommunications Union, by 2020 80 per cent of the world's population will own a smartphone. Perhaps, soon after, where they choose to live and work and place their businesses will depend as much on the fertility of their country's digital infrastructure as its land. "Welcome to e-Estonia," says its website, "and enjoy a hassle-free life!"

Ben Hammersley is a contributing editor at WIRED and author of 64 Things You Need to Know Now for Then (Hodder & Stoughton)

This article was originally published in February 2015

This article was originally published by WIRED UK