Documentation / /
Guides

Publish a peer-to-peer website

Ready to create your first website? Already have a website that you want to publish on the p2p Web? This guide is for you.

Related links:

Publish a website with Beaker

Open Beaker’s main menu and click “Create new”:

If you’ve already built your website, click “From folder” to import the folder that contains your website:

Otherwise, click “Website” to use Beaker’s basic website template, or click “Empty project” to start from scratch.

Beaker will automatically create a new dat:// website that you can edit using Beaker’s built-in editor or your preferred text editor.

Publish a website with the Dat CLI

Install the Dat CLI:

npm i -g dat

After installing dat, navigate to your website’s directory and run the dat command:

cd ~/src/my-website
dat .

Created new dat in /Users/alice/my-website/.dat
dat://c81299cfc139791ccc6db42f0bcac8a9af590c03828e8066478fcfc60ca6e481

This will create a new dat:// website with your website’s files. Open the dat://` URL in Beaker and you should see your website!

Further reading