Tutorials

Practical guides for real-world use cases

Step-by-step instructions for hosting websites, sharing content, and building on YAKMESH.

Tutorial 1: Host a Website

This tutorial shows you how to serve a static website using YAKMESH. Your site will be accessible on your local network and optionally to the internet.

1 Install YAKMESH

First, install YAKMESH globally (or in your project):

# Global install (recommended for beginners)
npm install -g yakmesh

# Or project-local
npm install yakmesh

2 Create Your Website Folder

Create a folder with your website files:

mkdir my-website
cd my-website

# Create a simple index.html
echo '<!DOCTYPE html>
<html>
<head><title>My YAKMESH Site</title></head>
<body>
  <h1>Hello from YAKMESH!</h1>
  <p>This site is served by a quantum-resistant mesh network.</p>
</body>
</html>' > index.html

3 Create Configuration

Create a yakmesh.config.js file:

// yakmesh.config.js
module.exports = {
  // Server settings
  port: 3000,
  host: '0.0.0.0',  // Listen on all interfaces (LAN accessible)
  
  // Website folder
  webserver: {
    enabled: true,
    root: './',      // Serve files from current folder
    index: 'index.html'
  },
  
  // Dashboard (optional)
  dashboard: true,
  
  // Mesh settings (optional)
  mesh: {
    enabled: true,
    discovery: true  // Find other YAKMESH nodes
  }
};

4 Start the Server

Launch your YAKMESH node:

# If installed globally
yakmesh start

# If installed locally
npx yakmesh start

You should see output like:

🏔️ YAKMESH v2.8.2 starting...
✓ Codebase locked: 65 files protected
✓ Oracle System initialized
✓ Webserver ready
🌐 Server running at http://localhost:3000
📊 Dashboard at http://localhost:3000/dashboard

5 Access Your Site

Your website is now accessible:

  • Local: http://localhost:3000
  • LAN: http://192.168.x.x:3000 (your computer's IP)
  • Dashboard: http://localhost:3000/dashboard

Exposing to the Internet

To make your site accessible from anywhere:

Option A: Port Forwarding (Home Network)

  1. Log into your router admin panel (usually 192.168.1.1)
  2. Find "Port Forwarding" settings
  3. Forward external port 80 or 443 to your computer's IP, port 3000
  4. Get your public IP from whatismyip.com

Option B: Cloudflare Tunnel (Recommended)

# Install cloudflared
npm install -g cloudflared

# Create a tunnel
cloudflared tunnel --url http://localhost:3000

This gives you a free HTTPS URL without port forwarding.

Option C: VPS Hosting

Deploy to a VPS (DigitalOcean, Linode, etc.) and run YAKMESH there.

Tutorial 2: Using the YAK:// Protocol

The yak:// protocol is YAKMESH's native content addressing system. It lets you share content with cryptographic links that work across the mesh.

What is yak://

YAK links look like this:

yak://abc123def456.../my-file.txt
yak://node-id/path/to/resource

Unlike HTTP, YAK links are content-addressed. The link includes a cryptographic hash of the content, so you can verify what you receive is authentic.

1 Register the Protocol

On Windows, register yak:// as a URL handler:

# Run as Administrator
yakmesh register-protocol

This allows your browser to open yak:// links directly.

2 Share Content

Add content to your node and get a yak:// link:

// In your application
const yakmesh = require('yakmesh');

// Add content to DOKO (content store)
const result = await yakmesh.doko.put('Hello, YAKMESH!', {
  type: 'text/plain',
  name: 'greeting.txt'
});

console.log('Share this link:', result.yakUrl);
// Output: yak://abc123.../greeting.txt

3 Retrieve Content

Fetch content using a yak:// link:

// Fetch from yak:// link
const content = await yakmesh.doko.get('yak://abc123.../greeting.txt');
console.log(content); // "Hello, YAKMESH!"

CLI Commands

# Share a file
yakmesh share ./my-document.pdf

# Open a yak:// link
yakmesh open yak://abc123.../document.pdf

# List your shared content
yakmesh doko list

Tutorial 3: Joining the Mesh Network

YAKMESH nodes automatically discover and connect to each other. Here's how to participate in the mesh.

1 Enable Mesh Networking

In your yakmesh.config.js:

module.exports = {
  mesh: {
    enabled: true,
    discovery: true,     // Auto-discover peers
    announce: true,      // Announce to discovery servers
    maxPeers: 50        // Maximum connections
  },
  
  // Optional: Connect to specific peers
  bootstrap: [
    'https://yakmesh.dev/.well-known/yakmesh',
    'https://seed1.yakmesh.devwork'
  ]
};

2 Check Connected Peers

View your mesh connections:

# CLI command
yakmesh peers

# Or via API
curl http://localhost:3000/api/mesh/peers

Output shows connected nodes, their trust levels, and latency.

What the Mesh Provides

  • Content Availability: Your shared content remains accessible even when you're offline (cached by peers)
  • Time Synchronization: Atomic-precision timing via MANI protocol
  • Peer Discovery: Automatic finding of nearby nodes via SHERPA
  • Geographic Proofs: Prove your location without revealing exact coordinates
  • Redundancy: Data replicated across trusted peers

Additional Features

Dashboard

Monitor your node's health, peers, and activity.

yakmesh open dashboard

Self-Hosted Docs

Full documentation available offline.

yakmesh open docs

Quantum-Resistant Crypto

All communications use ML-KEM + ML-DSA.

yakmesh status --crypto

Time Sources

Atomic-precision timing from multiple sources.

yakmesh time-sources

What's Next?

YAKMESH is actively being developed. Upcoming features include:

  • QRL Integration: Native support for Quantum Resistant Ledger (QRL 2.0/Zond)
  • IPFS Bridge: Interoperability with IPFS content addressing
  • Mobile Apps: iOS and Android nodes
  • Browser Extension: Native yak:// support in browsers
v2.8.2 Last updated: February 2026