Yakmesh includes an optional embedded web server powered by Caddy, enabling true self-hosting with automatic HTTPS.
import { YakmeshWebServer } from 'yakmesh/webserver';
const server = new YakmeshWebServer({
port: 8080,
root: './htdocs'
});
await server.start();
// Web server running at http://localhost:8080
# Install Caddy (automatic on first start)
npx yakmesh web install
# Start web server
npx yakmesh web start --port 8080 --root ./htdocs
# With automatic HTTPS (requires domain pointed to your server)
npx yakmesh web start --domain mysite.com --https
| Option | Default | Description |
|---|---|---|
port | 8080 | HTTP port |
root | ./htdocs | Document root directory |
domain | null | Domain for auto-HTTPS |
autoHttps | false | Enable Let's Encrypt SSL |
phpEnabled | false | Enable PHP via FastCGI |
phpPort | 9000 | PHP-FPM/CGI port |
Run the mesh network AND web server together:
import { YakmeshNode } from 'yakmesh';
import { YakmeshWebServer } from 'yakmesh/webserver';
// Start mesh node
const mesh = new YakmeshNode({ port: 9001 });
await mesh.start();
// Start web server
const web = new YakmeshWebServer({ port: 8080 });
await web.start();
// Now you have:
// - Mesh network on ws://localhost:9001
// - Website on http://localhost:8080
To run PHP applications (like phpBB), you need php-cgi running:
# Start PHP FastCGI (in another terminal)
php-cgi -b 127.0.0.1:9000
# Then start Yakmesh with PHP enabled
npx yakmesh web start --php --root ./htdocs
Yakmesh is built for digital sovereignty. The embedded web server means you don't need to rely on third-party hosting. Your node, your website, your data - all running from a single command.