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└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM poullorca/hyphanet-node:latest
# Set environment variables for node configurationENV HYPHANET_DATASTORE_SIZE=${HYPHANET_DATASTORE_SIZE:-10G}ENV HYPHANET_BANDWIDTH=${HYPHANET_BANDWIDTH:-unlimited}
# Create data directoryRUN mkdir -p /data
# Expose FProxy web interfaceEXPOSE 8888
# Expose Freenet ports for peer connectionsEXPOSE 12345/udpEXPOSE 12346/udp
# Health check for the web interfaceHEALTHCHECK --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 storageVOLUME ["/data"]Alternative Dockerfile with Custom Configuration
For more control over your deployment:
FROM eclipse-temurin:17-jre
# Install dependenciesRUN apt-get update && apt-get install -y \ wget \ curl \ && rm -rf /var/lib/apt/lists/*
# Download HyphanetWORKDIR /opt/hyphanetRUN wget -O freenet.jar https://github.com/hyphanet/fred/releases/latest/download/freenet.jar
# Create necessary directoriesRUN mkdir -p /data/freenet /data/downloads
# Configure environmentENV FREENET_DATASTORE_SIZE=10GENV FREENET_OPENNET=trueENV FREENET_FPROXY_ALLOWED_HOSTS=*
# Expose portsEXPOSE 8888EXPOSE 12345/udpEXPOSE 12346/udp
# Start FreenetCMD ["java", "-Xmx512m", "-jar", "freenet.jar"]Environment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
HYPHANET_DATASTORE_SIZE | No | 10G | Size of the datastore contribution |
HYPHANET_BANDWIDTH | No | unlimited | Bandwidth limit for the node |
FREENET_OPENNET | No | true | Enable opennet mode for easier connections |
FREENET_FPROXY_ALLOWED_HOSTS | No | 127.0.0.1 | Hosts allowed to access FProxy |
darknetport | No | 12345 | Port for darknet connections |
opennetport | No | 12346 | Port for opennet connections |
allowedhosts | No | - | Additional allowed hosts for access |
Deploying Hyphanet on Klutch.sh
Once your repository is prepared, follow these steps to deploy your Hyphanet node:
- Select HTTP as the traffic type
- Set the internal port to 8888
- Detect your Dockerfile automatically
- Build the container image
- Attach the persistent volumes
- Start the Hyphanet node
- Provision an HTTPS certificate for FProxy access
Push Your Repository to GitHub
Initialize your repository and push to GitHub:
git initgit add Dockerfile .dockerignoregit commit -m "Initial Hyphanet node configuration"git remote add origin https://github.com/yourusername/hyphanet-deploy.gitgit push -u origin mainCreate 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:
Set Environment Variables
In the environment variables section, configure your node:
| Variable | Value |
|---|---|
HYPHANET_DATASTORE_SIZE | 10G (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 Path | Recommended Size | Purpose |
|---|---|---|
/data | 20+ GB | Freenet 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:
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:
- Security Level: Choose between low, normal, and high security settings
- Datastore Size: Confirm the amount of disk space to use
- Bandwidth Allocation: Set how much bandwidth to contribute
- 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:
- Navigate to your FProxy interface
- Enter a freesite key (USK@ address) in the browser
- 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_HOSTSincludes your access method - Check that the node has finished starting
- Review container logs for errors
Additional Resources
- Official Hyphanet Website
- Hyphanet Documentation
- Hyphanet (fred) GitHub Repository
- Using Freenet Wiki
- Hyphanet Docker Image
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
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.