Guide for System Admins - Hive2Hive/Android GitHub Wiki

To set up an own P2P overlay using Hive2Hive, you need to deploy some stable peers. After doing so, Android Hive2Hive clients can join the network and use it for the file synchronization.

Role of stable peers

Although Hive2Hive is a fully decentralized system, the client applications need to know where to bootstrap. Therefore, it's recommended to have at least one stable and well-reachable peer which is not restricted by the NAT or firewall. Besides bootstrapping, stable peers have the following responsibility:

  • Serving as relays for devices behind a NAT
  • Sending Google Cloud Messages to serve unreachable Android devices
  • Store data that is in their responsibility range in the DHT or for replication

Step-by-step

1. Obtain the code

Download the executables or the source code for the stable peers in the release section. Ensure that it uses the same Hive2Hive version as your installed app (you can see that in the settings).

2. Configure

The executable starts multiple peers, whereas the first peer serves as the bootstrap peer. Go into the deployment.conf file to configure it.

  • A minimum of 5 stable peers is recommended due to the replication.
  • Set the domain name or public IP address where the peers will be available (i.e. your external IP address)
  • In order to serve Android mobile phones with GCM Push mode, you need to provide a Google Cloud Messaging API key. If you don't have one, obtain it a the Google Developer Console by creating a new project and enabling the GCM service. Keep the API key private while publishing the sender ID (same as the project number) because it is required in the app.

3. NAT traversal

Set up port forwarding or another NAT traversal technique such that your stable peers become public. This is required that clients can bootstrap to them and possibly use them as relay peers.

4. Start

Start the servers using java -jar <name of the jar file>.jar.

⚠️ **GitHub.com Fallback** ⚠️