# ๐Ÿก How to Set Up an Always-On Holochain Node with Edge Node Welcome\! This guide will walk you through setting up an **Edge Node**, an open-source tool that creates a reliable, always-on peer for your Holochain applications (hApps). ### ๐Ÿค” What is an Edge Node and Why Do I Need One? Imagine your small group is using a private, peer-to-peer application. For the app to work, at least two people need to be online at the same time to share and sync data. If only one person is online and adds new information, then goes offline before anyone else comes back, that new data is temporarily unavailable. The group is out of sync. An **Edge Node solves this problem**. It's like a dedicated member of your group that is **always online**. You can install it on any spare computer (physical or virtual), and it will run 24/7, holding a copy of the group's data and ensuring that anyone who comes online can sync up with the latest information. It provides stability and reliability for your hApp's network. This guide will show you how to turn a dedicated machine into an "always-on" node for a private group you've created in **Moss**. ----- ### โœ… What You'll Need Before you begin, make sure you have the following: * **A dedicated machine:** This can be a HoloPort, an old laptop, or any spare computer that you can leave running and connected to the internet. * *Note: The process will erase all data on this machine.* * Keyboard * Internet Connection * HDMI cable + Monitor * **A USB drive:** At least 4GB in size. * **The latest HolOS software:** You'll need to download the `.iso` file. * **Download Link:** [holos-v0.0.7ga.5.iso](https://github.com/Holo-Host/edgenode/releases/download/v0.0.7ga.5/holos-v0.0.7ga.5.iso) * **SHA256:** `3849cc185868f74f149f468e781447247d8e5afe988f54deba89563d0b1d1804` * **A USB flashing tool:** We recommend using [BalenaEtcher](https://www.balena.io/etcher/) (Mac/Windows/Linux) or [Rufus](https://rufus.ie/) (Windows). ----- ### โš™๏ธ Part 1: Install HolOS on Your Dedicated Machine First, we need to install HolOS, the operating system that will run your Edge Node. **1. Create a Bootable USB Drive:** * Open Rufus (use DD mode) or balenaEtcher. * Select the HolOS `.iso` file you downloaded. * Select your USB drive as the target. * Click "Start" or "Flash\!" and wait for the process to complete. **2. Boot from the USB Drive:** * Plug the newly created bootable USB drive into your dedicated machine. * Restart the machine. As it boots up, press the key to enter the BIOS/Boot Menu. This is usually **F1**, **F2**, **F12**, **Escape**, or **Delete**. * *Note: If you have a HoloPort, tap and slowly keep tapping the **F11** key as your HoloPort is booting up. This loads a boot time selection where you can select your boot disk (USB).* * In the BIOS menu, find the "Boot Order" or "Boot Priority" settings. * Set the USB drive as the **first boot device**. * Save your changes and exit. The machine will now boot from the USB drive. **3. Install HolOS to the Hard Drive:** * You may see a menu option to **"Select Install HolOS"**. If so, select it and press return. * If you instead boot into a live environment command line: * There is no password for the root user; simply type `root` and press return. * **โš ๏ธ Warning:** This step will completely erase all data on the specified hard drive. * To install HolOS permanently, run the installer command specifying the drive (usually `sda`). Type the following and press Enter: <!-- end list --> ```bash install-draft sda ``` * The installer will copy the system to the hard drive and make it bootable. Once finished, it will automatically reboot. **4. First Boot from Hard Drive:** * **Remove the USB drive** as the machine reboots. * If the reboot is not automatically triggered, manually shut down and restart the machine. * The machine should now boot into your fresh installation of HolOS. Networking is configured automatically via Ethernet. ----- ### ๐Ÿณ Part 2: Install and Run the Edge Node Container Now that HolOS is running, we'll use Docker to get the Edge Node software. **1. Pull the Docker Image:** Download the latest Edge Node package: ```bash docker pull ghcr.io/holo-host/edgenode ``` **2. Launch the Edge Node Container:** Start the Edge Node and ensure data is saved persistently. *Note: The command below is a single line.* ```bash docker run --name edgenode -dit -v $(pwd)/holo-data:/data ghcr.io/holo-host/edgenode ``` **3. Access the Container:** Enter the container's command line environment to configure it. ```bash docker exec -it edgenode su - nonroot ``` *You are now "inside" the Edge Node container. Leave this terminal open.* ----- ### ๐Ÿ“ฑ Part 3: Get Your hApp's Network Information To join a hApp network, you need its "Network Seed." Perform these steps on your **regular daily-use computer**. **1. Install and Set Up Moss:** * Download Moss from [https://moss.social](https://moss.social). * **Check your version:** Ensure you are on **Moss v0.14.4** or later. Update if necessary to ensure compatibility with the correct Holochain version. * Open Moss and create a new private group (+ icon). * Add tools (hApps) to your group: 1. Click the โ€œMโ€ in the top left, then the four squares icon. 2. Return to the Moss group and install tools from the "Unjoined Tools" tab (e.g., Kando, Rhymez). **2. Find the Network Seed:** * In your Moss group, click **Settings** (gear icon). * Go to the **Group Tools** tab. * Click the three-dots menu (...) for the tool you want to make "always-on" (e.g., Kando). * Click **Show Advanced Settings**. * * **Copy the Network Seed** (a long string of characters). > **๐Ÿ’ก Community Tip:** Want to test this out? Join the **Holo Community Moss Group**: > > * **Joining Link:** [Click here to join](https://theweave.social/wal?weave-0.14://invite/e248b72a-c1bc-44a5-b87d-cddae97ad2fc&progenitor=uhCAk3Ri0fie9AfcAu2FfvkGkcpfJtHu5ardxfUk3g0pOPn6E0Wj7) > * **Kando App:** > * DNA hash: `uhC0ktCegXYHHMfguuNED43mFQG6hc3euuP8v-tvE4yrRjaRjpVnF` > * Network Seed: `e1221a33-76a3-4356-bc5a-4e65765e7f80` > * **Rhymez App:** > * DNA hash: `uhC0kBg_25nJV11Mn2zlDonwFyzafxQHezNLqdMalW8pwxIqACvn_` > * Network Seed: `8d5b1fbb-b9d2-421c-ac34-c51e40986fea` ----- ### ๐Ÿ”— Part 4: Install the Always-On hApp in Your Edge Node Return to the terminal window connected to your Edge Node machine (inside the container). **1. Create a Configuration File:** ```bash happ_config_file create ``` This generates `example_happ_config.json`. **2. Edit the Configuration File:** Open the file using `vi`: ```bash vi example_happ_config.json ``` * Press **`i`** to enter Insert mode. * Update the `name`, `happUrl`, and `modifiers > networkSeed` fields. **Example Configuration for Kando:** ```json { "app": { "name": "kando", "version": "0.14.0", "happUrl": "https://github.com/holochain-apps/kando/releases/download/v0.14.0/kando.happ", "modifiers": { "networkSeed": "PASTE_YOUR_NETWORK_SEED_HERE", "properties": "" } }, "env": { "holochain": { "version": "", "flags": [""], "bootstrapUrl": "", "signalServerUrl": "", "stunServerUrls": [""] } } } ``` * When finished, press **Esc**, then type `:wq` and press **Enter** to save and quit. **3. Install the hApp:** ```bash install_happ example_happ_config.json ``` That's it\! Your Edge Node is now syncing your hApp data. Repeat this process for every hApp in your Moss group. ----- ### โš™๏ธ Advanced: Installing hApps from .webhapp Files Some hApps are distributed as `.webhapp` files (bundling the UI and the backend). Currently, you must extract the `.happ` file to install it. Here is a workaround using **Rhymez** as an example. 1. **Download the .webhapp file:** ```bash wget https://codeberg.org/matthme/rhymez/releases/download/0.1.5/rhymez.webhapp ``` 2. **Unpack the file:** ```bash hc web-app unpack rhymez.webhapp -o rhymes ``` 3. **Find the absolute path of the .happ file:** ```bash cd rhymes realpath rhymez.happ ``` *Copy the output path (e.g., `/home/nonroot/rhymes/rhymez.happ`).* 4. **Edit your JSON config file:** Replace the `happUrl` with your local file path using the `file://` format: ```json "happUrl": "file:///home/nonroot/rhymes/rhymez.happ", ``` 5. **Install as usual:** ```bash install_happ your_config_file.json ``` ----- ### ๐Ÿงฐ Your Moss App Toolkit: What Can You Install? Once you have your Moss group, you can plug in a variety of powerful, peer-to-peer tools. #### ๐Ÿ“‹ Project & Task Management * **KanDo:** A real-time KanBan board (think Trello/Asana). Features checklists, markdown, and labels. * **Acorn:** A hierarchical project manager (think Notion/ClickUp). Breaks large projects into "State-of-Affairs Trees". * **Who's In?:** An event scheduler (think Doodle/Calendly). Propose events and track agreements based on roles. #### ๐Ÿ’ฌ Communication & Collaboration * **Vines:** Group conversations and DMs (think Slack/Discord core). * **Rhymez:** Chat with channels and threaded side-conversations (think Slack threads). * **Presence:** P2P video calls with screen sharing (think Zoom/Teams). * **Notebooks:** Real-time collaborative Markdown editor with version control (think HackMD/Obsidian). #### ๐Ÿ’ก Brainstorming & Decision Making * **TalkingStickies:** Real-time stickies board for ideation and retrospectives (think Miro/Mural). * **Converge:** Structured decision-making tool focusing on criteria rather than just outcomes (think Loomio). * **Gamez:** A digital sandbox for board games (think Tabletop Simulator). #### ๐Ÿ’พ Data & Utilities * **DataTub:** Powerful, flexible data management (think Airtable). * **Spreadsheets:** Real-time collaborative spreadsheets (think Google Sheets). * **Files:** Simple file sharing within your group (think Dropbox/WeTransfer). #### ๐Ÿงช Experimental * **Carbon Farm Network App:** specialized supply chain management built on hREA. ----- ### What's Next? Manage your installed hApps inside the Edge Node container with these commands: * `list_happs` : View running hApps. * `disable_happ [installed_happ_id]` : Pause a hApp. * `uninstall_happ [installed_happ_id]` : Remove a hApp. **Stay Connected:** * [Track EdgeNode Roadmap](https://github.com/orgs/Holo-Host/projects/16) * Join us on Telegram: [https://t.me/+8JV9ibBHBDpmOTg0](https://t.me/+8JV9ibBHBDpmOTg0)