# 🏡 How to Set Up an Always-On Holochain Node For Your Moss Group Tools 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 HolOS ISO (v0.0.7ga.5)](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/) (for Mac/Windows/Linux) or [Rufus](https://rufus.ie/) (for Windows). * **The latest Moss installed on your computer:** * To download the latest version of Moss visit [moss.social](https://moss.social) --- ## ⚙️ Part 1: Install Moss on Your Computer & Create a Group 1. Download and install Moss for your computer. 2. Run Moss and click the “+” icon on the lefthand navigation bar to add a group. 3. Click the **caret** (arrow) in the top left to expand online users, and click on the button “Invite People”. 4. This will reveal an invite link you can copy and later use to configure and set up your Edge Node for the Moss Group. --- ## ⚙️ Part 2: Install HolOS on Your Dedicated Machine First, we need to install [HolOS](https://github.com/Holo-Host/edgenode/releases/download/v0.0.7ga.5/holos-v0.0.7ga.5.iso), the operating system that will run your Edge Node. 1. **Create a Bootable USB Drive:** * Open Rufus (Note: Use Rufus in 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 into the HolOS live environment. 3. **Install HolOS to the Hard Drive:** * Select **Install HolOS** and press return. * *(Optional)* If you boot into the HolOS live environment, you'll also have access to a command line. There is no password for the root user; simply type `root` and press return. * To install HolOS permanently from the live environment, you can run the installer command, telling it which hard drive to use. In most cases, the main hard drive is `sda`. 4. **⚠️ Warning:** This step will completely erase all data on the specified hard drive. Double-check you have selected the correct machine and drive. Type the following command and press Enter: ```bash install-draft sda ``` The installer will copy the system to the hard drive and make it bootable. Once it's finished, it will automatically reboot the machine. 5. **First Boot from Hard Drive:** * Remove the USB drive as the machine reboots. * If the reboot is not automatically triggered, you may need to manually shut down and restart the machine. * The machine should now boot into your fresh installation of HolOS. Networking should be configured automatically if you're using an Ethernet cable. --- ## 🐳 Part 3: Install and Run the Edge Node Container Now that HolOS is running, we'll use Docker (a tool for running containerized applications) to get the Edge Node software. 1. **Pull the Docker Image:** This command downloads the latest Edge Node package from the official repository. ```bash docker pull ghcr.io/holo-host/edgenode ``` 2. **Launch the Edge Node Container:** This command starts the Edge Node and ensures any data it stores (like your hApp information) will be saved persistently on your machine's hard drive. *Note: the command below is a single command, NOT two commands.* ```bash docker run --name edgenode -dit -v $(pwd)/holo-data:/data ghcr.io/holo-host/edgenode ``` 3. **Access the Container:** Your Edge Node is now running! To configure it, you need to "enter" the container's command line environment. ```bash docker exec -it edgenode bash ``` You are now "inside" the Edge Node container’s root shell. You can leave this terminal window open for the next steps. --- ## ⚙️ Part 4: Install Always-On Nodes Using wdocker CLI (Recommended) wdocker is a specialized CLI tool that automates the process of joining Moss groups and keeps all tools within that group updated automatically. * *Note: Moss Tool installation can also be done manually using a hApp install config file and CLI following steps in the appendix below.* * **⚠️ wdocker is not supported on Windows.** 1. **Install Node.js** You will first need to ensure you have Node.js installed. First update the Package Manager cache using: ```bash apk update ``` Then, install Node.js: ```bash apk add nodejs npm ``` 2. **Install wdocker** Install the wdocker CLI and its dependencies globally: ```bash npm install -g @theweave/wdocker npm install -g @theweave/utils npm install -g @theweave/group-client npm install -g @theweave/moss-types ``` 3. **Create a Conductor** Initialize a new conductor. You will be prompted to set a password. ```bash wdocker run my-moss-node ``` 4. **Join a Group** Open a separate terminal window. Copy the invite link from your Moss Group (See Part 1 above) and run: ```bash # IMPORTANT: Use quotes around the invite link wdocker join-group my-moss-node "your-invite-link-here" ``` *Note: If you’d like to support the Holo Community Moss Group (v0.15 Moss), the Joining Code URL is available [here](https://theweave.social/wal?weave-0.15://invite/d2543bb4-b784-4ac0-ae16-971e1b3a90c1&progenitor=uhCAkovIker1pDmpka8PiVWFWMGmSvNHjzdi9KnTOsUJzrsGG71JI).* 5. **Automatic Management** That’s it! The running conductor will check for new unjoined tools in the group every 5 minutes and install them automatically. **Useful Commands:** * `wdocker start [name]`: Restart a stopped node. * `wdocker list-apps [name]`: See what is currently running. * `wdocker status [name]`: Check if your node is healthy. --- Your Edge Node is now providing a stable backbone for your peer-to-peer applications. ## [Track EdgeNode Roadmap](https://github.com/orgs/Holo-Host/projects/16) Get in touch with us on [Telegram](https://t.me/+8JV9ibBHBDpmOTg0). --- ## 🧶 Your Moss App Toolkit: What Can You Install? This is where it gets exciting. Once you have your Moss group, you can plug in a variety of tools. Here’s a breakdown of the powerful, peer-to-peer apps available, with comparisons to the apps you already know. ### 📋 Project & Task Management * [**KanDo**](https://github.com/lightningrodlabs/kando) * **Think:** Trello, Asana, or monday.com. * **What it does:** A real-time, feature-rich KanBan board for project tracking. It includes commenting, labels, categories, checklists, markdown support, and more. * [**Acorn**](https://github.com/lightningrodlabs/acorn) * **Think:** A hierarchical project manager like Notion (using toggles) or ClickUp. * **What it does:** Project management redefined for distributed, remote teams. It uses "State-of-Affairs Trees" to break down large projects into smaller, manageable parts. * [**Who's In?**](https://github.com/lightningrodlabs/whos-in) * **Think:** Doodle or Calendly. * **What it does:** A tool for scheduling events and tracking agreements. Propose an event or task, and others can agree based on necessary roles being filled. ### 💬 Communication & Collaboration * [**Vines**](https://github.com/lightningrodlabs/vines) * **Think:** The core chat function of Slack or Discord. * **What it does:** A core capacity for group conversations and direct messages (DMs) within The Weave. * [**Rhymez**](https://github.com/lightningrodlabs/rhymez) * **Think:** Slack (with threads) or Discord. * **What it does:** A chat app that supports channels, DMs, and threaded side-panel conversations. * [**Presence**](https://github.com/lightningrodlabs/presence) * **Think:** Zoom, Google Meet, or Microsoft Teams. * **What it does:** Need to talk face-to-face? Presence provides peer-to-peer video calls with screen sharing. * [**Notebooks**](https://github.com/lightningrodlabs/notebooks) * **Think:** A collaborative Notion, HackMD, or Obsidian doc. * **What it does:** A real-time, collaborative Markdown editor that includes version control. Perfect for documentation, meeting notes, or co-writing. ### 💡 Brainstorming & Decision Making * [**TalkingStickies**](https://github.com/lightningrodlabs/talking-stickies) * **Think:** Miro, Mural, or FigJam. * **What it does:** The classic real-time stickies board. It's perfect for ideation, retrospectives, brainstorming, or simple note-taking. * [**Converge**](https://github.com/lightningrodlabs/converge) * **Think:** A structured decision tool like Loomio or 1000minds. * **What it does:** A group decision-making tool that helps shift the focus from outcomes to criteria, providing a clear structure for making choices together. * [**Gamez**](https://github.com/lightningrodlabs/gamez) * **Think:** A virtual sandbox like Tabletop Simulator or Roll20. * **What it does:** A freeform digital space where you can create and play board games together. ### 💾 Data & Utilities * [**DataTub**](https://github.com/lightningrodlabs/datatub) * **Think:** Airtable or Smartsheet. * **What it does:** An Airtable-like app for powerful, flexible data management that goes beyond a simple spreadsheet. * [**Spreadsheets**](https://github.com/lightningrodlabs/spreadsheets) * **Think:** Google Sheets or Excel Online. * **What it does:** Sometimes you just need a spreadsheet. This app provides real-time, collaborative editing for spreadsheets. * [**Files**](https://github.com/lightningrodlabs/files) * **Think:** A simple Dropbox, WeTransfer, or Google Drive folder. * **What it does:** A utility for file sharing and sending within your group. ### 🧪 Experimental Tools * [**Carbon Farm Network App**](https://github.com/lightningrodlabs/carbon-farm-network-app) * **Think:** A custom supply chain management (SCM) tool. * **What it does:** A highly specialized app for custom supply chain management built on the hREA framework. --- ## Appendix: How to Manually Install Always-On Nodes (without wDocker) ### 1. Get Your hApp's Network Information To have the Edge Node join your hApp's network, you need to find its unique "Network Seed." We'll use the Moss desktop application as an example. You'll do these steps on your regular daily-use computer, not the Edge Node machine. 1. **Install and Set Up Moss:** * Download and install Moss from [moss.social](https://moss.social). * Check the Moss version. Ensure you are on the most current version (e.g., Moss v0.15) so your app is on the correct version of Holochain. * Open Moss and create a new private group by clicking the **+** icon. * Add some tools (hApps) to your group, such as Kando or Rhymez. (Click the "M" in the top left corner, then the four squares icon to choose tools. Then go back to the Moss group and install them from the Unjoined Tools tab). 2. **Find the Network Seed:** * In your Moss group, click the **Settings** link (gear icon). * Go to the **Group Tools** tab. * For the tool you want to make "always-on" (e.g., Kando), click the three-dots menu (...). * Click **Show Advanced Settings**. * The **Network Seed** will be a long string of letters and numbers. Copy this value—you'll need it in the next part. ### 2. Install the Always-On hApp in Your Edge Node Let's go back to the terminal window connected to your Edge Node machine. It's time to tell it about your hApp. 1. **Create a Configuration File:** Inside the container's command line, run this command to generate a template configuration file: ```bash happ_config_file create ``` This creates a file named `example_happ_config.json`. 2. **Edit the Configuration File:** We'll use a basic text editor called vi to edit the file. ```bash vi example_happ_config.json ``` * To start editing, press the `i` key on your keyboard (for "Insert" mode). * Use your arrow keys to move the cursor. * Update the `name`, `happUrl`, and `networkSeed` fields with the information for your hApp. Paste the Network Seed you copied from Moss. **Example for Kando hApp:** ```json { "app": { "name": "kando", "version": "0.14.0", "happUrl": "[https://github.com/holochain-apps/kando/releases/download/v0.14.0/kando.happ](https://github.com/holochain-apps/kando/releases/download/v0.14.0/kando.happ)", "modifiers": { "networkSeed": "WRITE_OR_PASTE_YOUR_NETWORK_SEED_HERE", "properties": "" } }, "env": { "holochain": { "version": "", "flags": [""], "bootstrapUrl": "", "signalServerUrl": "", "stunServerUrls": [""] } } } ``` * Once you are done editing, press the `Esc` key to exit Insert mode. * Type `:wq` and press Enter. This will write (save) the file and quit the editor. 3. **Install the hApp:** Now, use your newly created configuration file to install the hApp in your Edge Node. ```bash install_happ example_happ_config.json ``` That's it! Your Edge Node will now download the hApp and join its network using the seed you provided. It is now acting as an always-on peer for your group. ### ⚙️ Advanced: Installing hApps from .webhapp Files (Rhymez Example) After you've successfully installed HolOS, you may want to install a Holochain application (hApp). Sometimes, these are distributed as `.webhapp` files, which bundle the core `.happ` file with a web-based user interface. The current installation process requires a direct path to the `.happ` file. The following is a temporary workaround that shows you how to extract the `.happ` file from a `.webhapp` file and install it locally. Here’s how you can do it using the "Rhymez" hApp as an example: 1. **Download the .webhapp file:** Open the terminal on your HoloPort and use wget to download the file. ```bash wget [https://codeberg.org/matthme/rhymez/releases/download/0.1.5/rhymez.webhapp](https://codeberg.org/matthme/rhymez/releases/download/0.1.5/rhymez.webhapp) ``` 2. **Unpack the file:** Use the `hc` command-line tool to extract the contents into a new directory. Here, we'll create a directory named `rhymes`. ```bash hc web-app unpack rhymez.webhapp -o rhymes ``` 3. **Find the .happ file:** Navigate into the new directory and list its contents to find the `.happ` file. ```bash cd rhymes ls ``` You will see `rhymez.happ` listed among the files. 4. **Get the absolute file path:** While inside the `rhymes` directory, use the `realpath` command to get the full, absolute path to the `.happ` file. ```bash realpath rhymez.happ ``` This will output something like `/home/nonroot/rhymes/rhymez.happ`. Copy this entire path. 5. **Edit your installation JSON file:** You'll need to modify the JSON file you use for installing hApps. Instead of providing a URL to the .happ file, you will provide the local file path you just copied. * Find the line in your JSON that specifies the app's location (e.g., a URL). * Replace the URL with the following format: `file://<your_absolute_path>` * Example: ```json "happUrl": "file:///home/nonroot/rhymes/rhymez.happ", ``` * (Note: Using `file://` followed by the path is what's required. The triple slash `///` is the technically correct format for an absolute path from the root directory.) 6. **Install the hApp:** Now you can proceed with your standard installation command using the modified JSON file. The system will find the `.happ` file on your local storage and install it.