Skip to content

Deploying Hyphanet

Introduction

Hyphanet (formerly known as Freenet) is a peer-to-peer platform for censorship-resistant communication and publishing. Originally created by Ian Clarke in 1999, Hyphanet has evolved into a mature, decentralized network that allows users to share files, browse websites, and communicate anonymously without central servers that can be blocked or censored.

The network operates by distributing encrypted data across participating nodes, making it extremely difficult for any entity to remove content or identify users. Each node contributes storage and bandwidth to the network, creating a resilient infrastructure that becomes stronger as more users join.

Key highlights of Hyphanet:

  • Censorship Resistance: Content is distributed across the network, making takedowns virtually impossible
  • Anonymity: Strong privacy protections for both publishers and consumers of content
  • Decentralized: No central servers or points of failure
  • Freesites: Host websites that cannot be taken down or censored
  • Secure Messaging: End-to-end encrypted communication between users
  • Darknet Mode: Connect only with trusted friends for maximum privacy
  • Opennet Mode: Connect with strangers for easier network access
  • Content Persistence: Popular content is automatically replicated across the network
  • Free and Open Source: Licensed under GPL with an active development community

This guide walks through deploying a Hyphanet node on Klutch.sh using Docker, contributing to the network while enabling access to censorship-resistant content.

Why Deploy Hyphanet on Klutch.sh

Deploying Hyphanet on Klutch.sh provides several advantages for running a network node:

Always-On Node: A cloud-deployed node contributes to the network 24/7, improving overall network health and content availability.

Persistent Storage: Attach persistent volumes for the Hyphanet datastore. Your node’s contribution to the network persists across restarts and updates.

Simplified Deployment: Klutch.sh handles container orchestration automatically. Push to GitHub and your node deploys without manual server configuration.

GitHub Integration: Connect your configuration repository directly from GitHub. Updates to your Dockerfile trigger automatic redeployments.

Scalable Resources: Allocate storage and bandwidth based on how much you want to contribute to the network.

Stable IP Address: A consistent network presence helps your node build connections and contribute effectively to the network.

Prerequisites

Before deploying Hyphanet on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your Hyphanet configuration
  • Basic familiarity with Docker and containerization concepts
  • Understanding of Hyphanet’s privacy model and network participation

Understanding Hyphanet Architecture

Hyphanet operates as a distributed datastore with several key components:

Freenet REference Daemon (fred): The core software that runs on each node, handling connections, routing, and data storage.

FProxy: The web interface (typically on port 8888) for browsing freesites and managing your node.

Datastore: Encrypted storage where your node keeps its portion of the network’s data.

Connection Modes: Opennet allows connections with any node; Darknet requires exchanging node references with trusted peers.

Routing: Requests are routed through the network using a distributed hash table (DHT) approach.

Preparing Your Repository

To deploy Hyphanet on Klutch.sh, create a GitHub repository containing your Dockerfile and configuration.

Repository Structure

hyphanet-deploy/
├── Dockerfile
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM poullorca/hyphanet-node:latest
# Set environment variables for node configuration
ENV HYPHANET_DATASTORE_SIZE=${HYPHANET_DATASTORE_SIZE:-10G}
ENV HYPHANET_BANDWIDTH=${HYPHANET_BANDWIDTH:-unlimited}
# Create data directory
RUN mkdir -p /data
# Expose FProxy web interface
EXPOSE 8888
# Expose Freenet ports for peer connections
EXPOSE 12345/udp
EXPOSE 12346/udp
# Health check for the web interface
HEALTHCHECK --interval=60s --timeout=30s --start-period=120s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8888/ || exit 1
# Data volume for persistent storage
VOLUME ["/data"]

Alternative Dockerfile with Custom Configuration

For more control over your deployment:

FROM eclipse-temurin:17-jre
# Install dependencies
RUN apt-get update && apt-get install -y \
wget \
curl \
&& rm -rf /var/lib/apt/lists/*
# Download Hyphanet
WORKDIR /opt/hyphanet
RUN wget -O freenet.jar https://github.com/hyphanet/fred/releases/latest/download/freenet.jar
# Create necessary directories
RUN mkdir -p /data/freenet /data/downloads
# Configure environment
ENV FREENET_DATASTORE_SIZE=10G
ENV FREENET_OPENNET=true
ENV FREENET_FPROXY_ALLOWED_HOSTS=*
# Expose ports
EXPOSE 8888
EXPOSE 12345/udp
EXPOSE 12346/udp
# Start Freenet
CMD ["java", "-Xmx512m", "-jar", "freenet.jar"]

Environment Variables Reference

VariableRequiredDefaultDescription
HYPHANET_DATASTORE_SIZENo10GSize of the datastore contribution
HYPHANET_BANDWIDTHNounlimitedBandwidth limit for the node
FREENET_OPENNETNotrueEnable opennet mode for easier connections
FREENET_FPROXY_ALLOWED_HOSTSNo127.0.0.1Hosts allowed to access FProxy
darknetportNo12345Port for darknet connections
opennetportNo12346Port for opennet connections
allowedhostsNo-Additional allowed hosts for access

Deploying Hyphanet on Klutch.sh

Once your repository is prepared, follow these steps to deploy your Hyphanet node:

    Push Your Repository to GitHub

    Initialize your repository and push to GitHub:

    Terminal window
    git init
    git add Dockerfile .dockerignore
    git commit -m "Initial Hyphanet node configuration"
    git remote add origin https://github.com/yourusername/hyphanet-deploy.git
    git push -u origin main

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “hyphanet” or “freenet-node”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your Hyphanet Dockerfile.

    Configure HTTP Traffic

    The FProxy web interface is accessed via HTTP. In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 8888

    Set Environment Variables

    In the environment variables section, configure your node:

    VariableValue
    HYPHANET_DATASTORE_SIZE10G (or your preferred contribution)
    FREENET_FPROXY_ALLOWED_HOSTS* (to allow web access)

    Attach Persistent Volumes

    Persistent storage is essential for Hyphanet. Add the following volumes:

    Mount PathRecommended SizePurpose
    /data20+ GBFreenet datastore and node data

    The datastore size determines how much content your node can cache and serve to the network. Larger stores contribute more to network health.

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will:

    • Detect your Dockerfile automatically
    • Build the container image
    • Attach the persistent volumes
    • Start the Hyphanet node
    • Provision an HTTPS certificate for FProxy access

    Access Your Node

    Once deployment completes, access your Hyphanet node’s FProxy interface at https://your-app-name.klutch.sh. Initial startup may take several minutes as the node connects to the network.

Initial Configuration

First-Time Setup

When you first access FProxy, you’ll be guided through initial configuration:

  1. Security Level: Choose between low, normal, and high security settings
  2. Datastore Size: Confirm the amount of disk space to use
  3. Bandwidth Allocation: Set how much bandwidth to contribute
  4. Connection Mode: Choose opennet, darknet, or hybrid mode

Connecting to the Network

In opennet mode, your node will automatically discover and connect to other nodes. This process can take 30 minutes to several hours depending on network conditions.

Browsing Freesites

Once connected, you can browse freesites (websites hosted on the network) through FProxy:

  1. Navigate to your FProxy interface
  2. Enter a freesite key (USK@ address) in the browser
  3. Content will be fetched from the distributed network

Security Considerations

Access Control

By default, FProxy only allows local connections. When deploying to Klutch.sh with web access enabled:

  • Consider adding authentication at the reverse proxy level
  • Be aware that your browsing activity may be visible to the hosting provider
  • For maximum privacy, use a local installation instead

Network Privacy

Hyphanet provides strong anonymity within the network, but:

  • Your IP address is visible to connected peers
  • Traffic analysis may reveal participation in the network
  • Darknet mode provides stronger privacy but requires manual peer exchange

Troubleshooting Common Issues

Node Not Connecting

Symptoms: FProxy shows no connections or very slow downloads.

Solutions:

  • Wait longer for initial connection (can take hours)
  • Verify UDP ports are accessible
  • Check that datastore has sufficient space
  • Review logs for connection errors

Slow Content Retrieval

Symptoms: Freesites take a very long time to load.

Solutions:

  • This is normal for Hyphanet - prioritize privacy over speed
  • Increase datastore size to cache more content locally
  • Build more connections over time

FProxy Not Accessible

Symptoms: Cannot reach the web interface.

Solutions:

  • Verify FREENET_FPROXY_ALLOWED_HOSTS includes your access method
  • Check that the node has finished starting
  • Review container logs for errors

Additional Resources

Conclusion

Deploying a Hyphanet node on Klutch.sh allows you to contribute to a global network of censorship-resistant communication while gaining access to content that cannot be taken down by any single authority. Your node helps improve network performance and resilience for users worldwide.

Running a Hyphanet node is an act of supporting free speech and privacy on the internet. By contributing storage and bandwidth, you help ensure that important information remains accessible regardless of political or commercial pressures.