Let's say you want to build a website, but you want to host it yourself. You could build your own web server, host your website on a Virtual Private Server, on a RaspberryPI, or on your laptop.
But what if you could host your website without any dedicated server at all? What if you could publish your website from your computer, and have your website visitors help you host it? What if your friends could help you host your website from their computers? It sounds crazy, but it's completely possible using a new (ish) protocol called Dat.
To understand Dat, we first need to know about how a regular web server works. Most websites live on a web server. A web server holds all the files for your website, and when someone goes to your website from their computer's browser, the web pages are served using a protocol called HTTP. You don't need to know much about HTTP right now, but the important thing to know is that HTTP requires two things, a server and a client. The server is the web server you install on a VPS, a RaspberryPI, or your laptop. The client is your website visitor, using a computer and a web browser.
Dat is an alternative to HTTP. When you go to a Dat site, your browser looks for anybody on the internet who also has the files for the Dat site. If someone has the files, your browser asks them to share the files so you can load the website.
This means that anyone can host a Dat site. You can publish one right now on your laptop, and anybody else who visits your Dat site will download the files directly from your laptop.
Because this is a new way of browsing websites, not all browsers support Dat sites. Firefox, Chrome, and Safari won't know how to look around the internet and find where the files are, so they won't be able to load a Dat site. This is where Beaker Browser comes in – the new experimental browser for reading Dat sites.
When you install Beaker, you get the ability to read Dat websites. For example, here's the Dat site for the Dat project itself:
You'll notice that this doesn't look like a web address! This is just a long string of numbers and letters – super hard to remember, and kind of ugly. This is called the public key, and it's used to find out who has the files for this site and also to make sure no one has changed the files since they were created. A bunch of awesome cryptographic math is used to create this public key.
It's not the only way to access a Dat site though. Using some DNS magic, you can make a human-readable link that uses the same public key under the hood. Here's the human-readable (and easier to remember) address for the Dat project:
If you click on that link in a normal browser, you'll get an error, or maybe your browser will ask you if you want to open the link with another program. But if you open the link in Beaker, you'll ask the internet who has the files for the Dat Project website, and other computers all over the world will send you files until you can load up the webpage:
That's the magic of Dat.