<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Freenet Manual on Freenet</title><link>https://freenet.org/build/manual/</link><description>Recent content in Freenet Manual on Freenet</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 11 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://freenet.org/build/manual/feed.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>https://freenet.org/build/manual/introduction/</link><pubDate>Tue, 15 Apr 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/introduction/</guid><description>&lt;p>Freenet is a peer‑to‑peer network that replaces the client‑server structure of today’s web with a mesh of equal nodes. Every computer that runs the &lt;strong>Freenet Core&lt;/strong> stores and serves data, so no single party can block, censor, or monetise access.&lt;/p>
&lt;p>The Core is a compact binary, under 5 MB, and installs in seconds on desktop, mobile, or embedded hardware. Once launched it finds nearby peers and self‑organises into a small‑world overlay that routes requests efficiently without any central directory.&lt;/p></description></item><item><title>Building Decentralized Apps on Freenet</title><link>https://freenet.org/build/manual/tutorial/</link><pubDate>Thu, 16 Jan 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/tutorial/</guid><description>&lt;p>Freenet is a decentralized platform for building censorship-resistant services. Applications compile
to WebAssembly and run across a peer-to-peer network with no central servers. This tutorial walks
through creating a web UI, container, and backend contract, building locally, and serving the app
from a Freenet node.&lt;/p>
&lt;p>&lt;strong>Reference Implementation&lt;/strong>: &lt;a href="https://github.com/freenet/river">River&lt;/a> - a decentralized chat
application that demonstrates all the patterns in this tutorial.&lt;/p>
&lt;div class="screenshot-container">
&lt;picture class="app-screenshot">
 &lt;source srcset="https://freenet.org/images/river-screenshot-dark.png" media="(prefers-color-scheme: dark)">
 &lt;img src="https://freenet.org/images/river-screenshot-light.png" alt="River - a decentralized chat app built on Freenet">
&lt;/picture>
&lt;/div>

&lt;hr>
&lt;h2 id="1-architecture-overview">1. Architecture Overview&lt;/h2>
&lt;p>Freenet apps have three components: &lt;strong>Contract&lt;/strong> (shared state on the network), &lt;strong>Delegate&lt;/strong> (private
data on your device), and &lt;strong>UI&lt;/strong> (web interface). See the
&lt;a href="https://freenet.org/build/manual/components/overview/">full architecture diagram&lt;/a>.&lt;/p></description></item><item><title>Publish a Website</title><link>https://freenet.org/build/manual/publish-a-website/</link><pubDate>Sat, 11 Apr 2026 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/publish-a-website/</guid><description>&lt;p>Freenet can host static websites &amp;ndash; HTML, CSS, JavaScript, images &amp;ndash; with no server required. Your
site is distributed across the peer-to-peer network, served through any Freenet gateway, and can
only be updated by you.&lt;/p>
&lt;p>No programming is required. If you have a folder of static files with an &lt;code>index.html&lt;/code>, you can
publish it to Freenet in three commands.&lt;/p>
&lt;hr>
&lt;h2 id="how-it-works">How It Works&lt;/h2>
&lt;p>Your website files are compressed into an archive, signed with your private key, and stored as a
Freenet contract. The contract enforces two rules:&lt;/p></description></item><item><title>Building with Docker Images</title><link>https://freenet.org/build/manual/docker/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/docker/</guid><description>&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;p>Make sure docker is installed and working, and has the &lt;code>docker compose&lt;/code> command.&lt;/p>
&lt;h2 id="contract-db-storage">Contract DB Storage&lt;/h2>
&lt;p>The docker image stores its data at &lt;code>/root/.local/share/freenet&lt;/code> inside the container. This is
mapped to &lt;code>/tmp/freenet-docker&lt;/code> outside the container.&lt;/p>
&lt;h2 id="build-the-base-docker-image-of-freenet">Build the base Docker image of Freenet&lt;/h2>
&lt;p>All the docker related files are in the &lt;code>docker&lt;/code> subdirectory.&lt;/p>
&lt;p>Requires that Docker be installed and working. Then, in the root directory of the repo:&lt;/p>
&lt;p>To build the Docker Freenet container:&lt;/p></description></item><item><title>Community</title><link>https://freenet.org/build/manual/community/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/community/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://github.com/freenet/freenet-core">Github&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://matrix.to/#/#locutus:matrix.org">Matrix&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Contract Interfaces</title><link>https://freenet.org/build/manual/contract-interface/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/contract-interface/</guid><description>&lt;h2 id="terms">Terms&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://freenet.org/build/manual/glossary#contract-state">Contract State&lt;/a> - data associated with a contract that can be
retrieved by Applications and Delegates.&lt;/li>
&lt;li>&lt;a href="https://freenet.org/build/manual/glossary#delta">Delta&lt;/a> - Represents a modification to some state - similar to a
&lt;a href="https://en.wikipedia.org/wiki/Diff">diff&lt;/a> in source code&lt;/li>
&lt;li>&lt;a href="https://freenet.org/build/manual/glossary#parameters">Parameters&lt;/a> - Data that forms part of a contract along with the
WebAssembly code&lt;/li>
&lt;li>&lt;a href="https://freenet.org/build/manual/glossary#state-summary">State Summary&lt;/a> - A compact summary of a contract&amp;rsquo;s state that can
be used to create a delta&lt;/li>
&lt;/ul>
&lt;h2 id="interface">Interface&lt;/h2>
&lt;p>Freenet contracts must implement the
&lt;a href="https://docs.rs/freenet-stdlib/latest/freenet_stdlib/prelude/trait.ContractInterface.html">&lt;code>ContractInterface&lt;/code>&lt;/a>
trait:&lt;/p></description></item><item><title>Example App</title><link>https://freenet.org/build/manual/example-app/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/example-app/</guid><description>&lt;h1 id="build-freenet-from-source-on-linux">Build freenet from source on Linux:&lt;/h1>
&lt;p>There is a single line command to build all freenet on Linux.&lt;/p>
&lt;pre tabindex="0">&lt;code>git clone https://github.com/freenet/freenet-core &amp;amp;&amp;amp; .\build-all.sh
&lt;/code>&lt;/pre>&lt;p>then you could test it by building and deploying any web application:&lt;/p>
&lt;pre tabindex="0">&lt;code>.\build-examples.sh
&lt;/code>&lt;/pre>&lt;p>.&lt;/p>
&lt;h1 id="build-freenet-from-source-on-linux-from-command-line">Build freenet from source on Linux from command line:&lt;/h1>
&lt;p>You could also run this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>wget https://sh.rustup.rs ; sh index.html -y &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> source &lt;span style="color:#e6db74">&amp;#34;&lt;/span>$HOME&lt;span style="color:#e6db74">/.cargo/env&amp;#34;&lt;/span> &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> rustup default stable &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> rustup target add wasm32-unknown-unknown &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> &lt;span style="color:#f92672">(&lt;/span>sh curl -L https://git.io/n-install | bash&lt;span style="color:#f92672">)&lt;/span> ; ~/n/bin/n latest ; ~/n/bin/npm install -g typescript webpack &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> git clone https://github.com/freenet/freenet-core/ &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cd freenet-core &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> git submodule update --init --recursive &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> export CARGO_TARGET_DIR&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#66d9ef">$(&lt;/span>pwd&lt;span style="color:#66d9ef">)&lt;/span>&lt;span style="color:#e6db74">/target&amp;#34;&lt;/span> &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cd stdlib/typescript/ &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> npm run dev.package &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cd ../.. &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cargo install --path crates/core --force &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cargo install --path crates/fdev --force &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cd ./modules/identity-management/ &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> make build &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cd ../antiflood-tokens/ &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> rm Cargo.lock ; make build &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> cd ../../apps/freenet-email-app &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span>&lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> make build
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Let&amp;rsquo;s decompose this:&lt;/p></description></item><item><title>Glossary</title><link>https://freenet.org/build/manual/glossary/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/glossary/</guid><description>&lt;h2 id="application">Application&lt;/h2>
&lt;p>Software that uses Freenet as a back-end. This includes native software distributed independenly of
Freenet but which uses Freenet as a back-end (perhaps bundling Freenet), and
&lt;a href="https://freenet.org/manual/glossary#web-application">web applications&lt;/a> that are distributed over Freenet and run in a
web browser.&lt;/p>
&lt;h2 id="contract">Contract&lt;/h2>
&lt;p>A contract is WebAssembly code with associated data like the contract state. The role of the
contract is to determine:&lt;/p>
&lt;ul>
&lt;li>Is the state valid for this contract?&lt;/li>
&lt;li>Under what circumstances can the state be modified or updated? (see Delta)&lt;/li>
&lt;li>How can two valid states be merged to produce a third valid state?&lt;/li>
&lt;/ul>
&lt;h2 id="container-contract">Container Contract&lt;/h2>
&lt;p>A contract that contains an application or component as state, accessed through the web proxy.&lt;/p></description></item><item><title>Manifest Format</title><link>https://freenet.org/build/manual/manifest/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate><guid>https://freenet.org/build/manual/manifest/</guid><description>&lt;p>The &lt;code>freenet.toml&lt;/code> file for each UI component/contract is called its &lt;em>manifest&lt;/em>. It is written in
the &lt;a href="https://toml.io/">TOML&lt;/a> format. Manifest files consist of the following sections:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="#the-contract-section">[contract]&lt;/a> — Defines a contract.
&lt;ul>
&lt;li>&lt;a href="#the-type-field">type&lt;/a> — Contract type.&lt;/li>
&lt;li>&lt;a href="#the-lang-field">lang&lt;/a> — Contract source language.&lt;/li>
&lt;li>&lt;a href="#the-output_dir-field">output_dir&lt;/a> — Output path for build artifacts.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#the-contract-section">[webapp]&lt;/a> — Configuration for UI component containers.&lt;/li>
&lt;li>&lt;a href="#the-state-section">[state]&lt;/a> — Optionally seed a state.&lt;/li>
&lt;/ul>
&lt;h2 id="the-contract-section">The &lt;code>[contract]&lt;/code> section&lt;/h2>
&lt;h3 id="the-type-field">The &lt;code>type&lt;/code> field&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-toml" data-lang="toml">&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#a6e22e">contract&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">type&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;webapp&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The type of the contract being packaged. Currently the following types are supported:&lt;/p></description></item></channel></rss>