From 760898f7edcd8cdb403eb1b989cf22977c4c9c4b Mon Sep 17 00:00:00 2001 From: bobinstein Date: Mon, 4 Sep 2023 19:21:31 -0400 Subject: [PATCH 1/3] docs: Updates to Linux getting-started guide. --- docs/linux-setup.md | 148 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 117 insertions(+), 31 deletions(-) diff --git a/docs/linux-setup.md b/docs/linux-setup.md index a26ea0bd..3111b2e8 100644 --- a/docs/linux-setup.md +++ b/docs/linux-setup.md @@ -1,9 +1,47 @@ # Linux Installation Instructions ## Overview -The following instructions will guide you through the process of installing the ar.io node on a Linux machine, specifically Ubuntu 20.04.5 desktop on a home computer. Actual steps may differ slightly on different versions or distributions. This guide will cover how to set up your node, point a domain name to your home network, and create an nginx server for routing traffic to your node. No prior coding experience is required. +The following instructions will guide you through the process of installing the AR.IO node on a Linux machine, specifically Ubuntu 22.04.3 desktop on a home computer. Actual steps may differ slightly on different versions or distributions. This guide will cover how to set up your node, point a domain name to your home network, and create an nginx server for routing traffic to your node. No prior coding experience is required. + +## System Requirements + +Please note, The AR.IO Node software is still in development and testing, all system requirements are subject to change. + +External storage devices should be formatted as ext4. + +### Minimum requirements + +The hardware specifications listed below represent the minimum system requirements at which the AR.IO Node has been tested. While your Node may still operate on systems with lesser specifications, please note that AR.IO cannot guarantee performance or functionality under those conditions. Use below-minimum hardware at your own risk. + +- 4 core CPU +- 4 GB Ram +- 500 GB storage (SSD recommended) +- Stable 50 Mbps internet connection + + +### Recommended + +- 12 core CPU +- 32 GB Ram +- 2 TB SSD storage +- Stable 1 Gbps internet connection + + +## Install Packages + +If you would like to quickly install all required and suggested packages, you can run the following 2 commands in your terminal, and skip to [installing the Node](#install-the-node). + + +``` +sudo apt update -y && sudo apt upgrade -y && sudo apt install -y curl openssh-server docker-compose git certbot nginx sqlite3 && sudo systemctl enable ssh && curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-get update -y && sudo apt-get install -y gcc g++ make yarn && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash && source ~/.bashrc && sudo ufw allow 22 80 443 && sudo ufw enable +``` + +``` +nvm install 16.15.1 && nvm use 16.15.1 +``` + +### Required packages -## Install Required Packages 1. Update your software: ``` @@ -11,14 +49,11 @@ The following instructions will guide you through the process of installing the sudo apt upgrade ``` -2. Install ssh (optional, for remote access to your Linux machine): - ``` - sudo apt install openssh-server - sudo systemctl enable ssh - ``` -3. Open necessary ports in your firewall: +2. Enable your firewall and open necessary ports: ``` + sudo ufw enable + # Optional: If using SSH, allow port 22 sudo ufw allow 22 @@ -27,77 +62,128 @@ The following instructions will guide you through the process of installing the sudo ufw allow 443 ``` -4. Install Yarn: + +3. Install Yarn: ``` - sudo snap install yarn --classic + curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - + + echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + + sudo apt-get update -y + + sudo apt-get install yarn -y ``` -5. Install NVM (Node Version Manager): + +4. Install nginx: + ``` + sudo apt install nginx -y + ``` + + +5. Install git: + ``` + sudo apt install git -y + ``` + + +6. Install Docker: + ``` + sudo apt install docker-compose -y + ``` + - Test Docker installation: + ``` + sudo docker run hello-world + ``` + + +7. Install Certbot: + ``` + sudo apt install certbot -y + ``` + + +### Suggested packages + +These packages are not required to run a node in its basic form. However, they will become necessary for more advanced usage or customization. + + +8. Install ssh (optional, for remote access to your Linux machine): + ``` + sudo apt install openssh-server -y + sudo systemctl enable ssh + ``` + + +9. Install NVM (Node Version Manager): ``` curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash source ~/.bashrc ``` -6. Install Node.js: + +10. Install Node.js: ``` nvm install 16.15.1 ``` -7. Install nginx: - ``` - sudo apt install nginx - ``` -8. Install git: +11. Install GCC: ``` - sudo apt install git + sudo apt-get install gcc -y ``` -9. Install GitHub CLI: + +12. Install G++: ``` - sudo snap install gh + sudo apt-get install g++ -y ``` -10. Install Docker: + +13. Install make: ``` - sudo apt install docker-compose + sudo apt-get install make -y ``` - - Test Docker installation: - ``` - sudo docker run hello-world - ``` -11. Install Certbot: + +14. Install SQLite: ``` - sudo apt install certbot + sudo apt install sqlite3 -y ``` + ## Install the Node - Navigate to the desired installation location: - - **NOTE**: Your database of Arweave Transaction Headers will be created in the project directory, not Docker. So, if you are using an external hard drive to turn an old machine into a node, install the node directly to that external drive. + - **NOTE**: Your indexing databases will be created in the project directory unless otherwise specified in your .env file, not your Docker environment. So, if you are using an external hard drive, you should install the node directly to that external drive. - Clone the ar-io-node repository and navigate into it: ``` - gh repo clone ar-io/ar-io-node + git clone https://github.com/ar-io/ar-io-node cd ar-io-node ``` - Create an environment file: + ``` nano .env ``` + Paste the following content into the new file, replacing \ with the domain address you are using to access the node, save, and exit: + ``` GRAPHQL_HOST=arweave.net GRAPHQL_PORT=443 START_HEIGHT=1000000 ARNS_ROOT_HOST= ``` + - The GRAPHQL values set the proxy for GQL queries to arweave.net, You may use any available gateway that supports GQL queries. If omitted, your node can support GQL queries on locally indexed transactions, but only L1 transactions are indexed by default. - `START_HEIGHT` is an optional line. It sets the block number where your node will start downloading and indexing transactions headers. Omitting this line will begin indexing at block 0. - `ARNS_ROOT_HOST` sets the starting point for resolving ARNS names, which are accessed as a subdomain of a gateway. It should be set to the url you are pointing to your node, excluding any protocol prefix. For example, use `node-ar.io` and not `https://node-ar.io`. If you are using a subdomain to access your node and do not set this value, the node will not understand incoming requests. + - More advanced configuration options can be found at [ar.io/docs](https://ar.io/docs/gateways/ar-io-node/advanced-config.html) + - Build the Docker container: ``` sudo docker-compose up -d --build @@ -205,4 +291,4 @@ The following guide assumes you are running your node on a local home computer. Your node should now be running and connected to the internet. Test it by entering https://\/3lyxgbgEvqNSvJrTX2J7CfRychUD5KClFhhVLyTPNCQ in your browser. -**Note**: If you encounter any issues during the installation process, please seek assistance from the [ar.io community](https://discord.gg/7zUPfN4D6g). \ No newline at end of file +**Note**: If you encounter any issues during the installation process, please seek assistance from the [AR.IO community](https://discord.gg/7zUPfN4D6g). \ No newline at end of file From 7b73df1f55b1286f2466d81866163bfacda4791a Mon Sep 17 00:00:00 2001 From: bobinstein Date: Mon, 4 Sep 2023 19:41:14 -0400 Subject: [PATCH 2/3] docs: Added system requirements to Windows setup guide --- docs/linux-setup.md | 36 +++++++++++++++--------------- docs/windows-setup.md | 51 ++++++++++++++++++++++++++++++++----------- 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/docs/linux-setup.md b/docs/linux-setup.md index 3111b2e8..9577277b 100644 --- a/docs/linux-setup.md +++ b/docs/linux-setup.md @@ -63,31 +63,19 @@ nvm install 16.15.1 && nvm use 16.15.1 ``` -3. Install Yarn: - ``` - curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - - sudo apt-get update -y - - sudo apt-get install yarn -y - ``` - - -4. Install nginx: +3. Install nginx: ``` sudo apt install nginx -y ``` -5. Install git: +4. Install git: ``` sudo apt install git -y ``` -6. Install Docker: +5. Install Docker: ``` sudo apt install docker-compose -y ``` @@ -97,7 +85,7 @@ nvm install 16.15.1 && nvm use 16.15.1 ``` -7. Install Certbot: +6. Install Certbot: ``` sudo apt install certbot -y ``` @@ -108,13 +96,25 @@ nvm install 16.15.1 && nvm use 16.15.1 These packages are not required to run a node in its basic form. However, they will become necessary for more advanced usage or customization. -8. Install ssh (optional, for remote access to your Linux machine): +7. Install ssh (optional, for remote access to your Linux machine): ``` sudo apt install openssh-server -y sudo systemctl enable ssh ``` +8. Install Yarn: + ``` + curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - + + echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + + sudo apt-get update -y + + sudo apt-get install yarn -y + ``` + + 9. Install NVM (Node Version Manager): ``` curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash @@ -177,7 +177,7 @@ These packages are not required to run a node in its basic form. However, they w START_HEIGHT=1000000 ARNS_ROOT_HOST= ``` - + - The GRAPHQL values set the proxy for GQL queries to arweave.net, You may use any available gateway that supports GQL queries. If omitted, your node can support GQL queries on locally indexed transactions, but only L1 transactions are indexed by default. - `START_HEIGHT` is an optional line. It sets the block number where your node will start downloading and indexing transactions headers. Omitting this line will begin indexing at block 0. - `ARNS_ROOT_HOST` sets the starting point for resolving ARNS names, which are accessed as a subdomain of a gateway. It should be set to the url you are pointing to your node, excluding any protocol prefix. For example, use `node-ar.io` and not `https://node-ar.io`. If you are using a subdomain to access your node and do not set this value, the node will not understand incoming requests. diff --git a/docs/windows-setup.md b/docs/windows-setup.md index ecd818af..956553c6 100644 --- a/docs/windows-setup.md +++ b/docs/windows-setup.md @@ -1,21 +1,41 @@ # Windows Installation Instructions ## Overview -This guide provides step-by-step instructions for setting up the ar.io node on a Windows computer. It covers installing necessary software, cloning the repository, creating an environment file, starting the Docker container, setting up networking, and installing and configuring NGINX Docker. No prior coding experience is required. +This guide provides step-by-step instructions for setting up the AR.IO node on a Windows computer. It covers installing necessary software, cloning the repository, creating an environment file, starting the Docker container, setting up networking, and installing and configuring NGINX Docker. No prior coding experience is required. ## Prerequisites Before starting the installation process, ensure you have the following: -- A Windows computer -- Administrative privileges on the computer +- A Windows computer that meets the below system requirements. +- Administrative privileges on the computer. + + +## System Requirements + +Please note, The AR.IO Node software is still in development and testing, all system requirements are subject to change. + + +### Minimum requirements + +The hardware specifications listed below represent the minimum system requirements at which the AR.IO Node has been tested. While your Node may still operate on systems with lesser specifications, please note that AR.IO cannot guarantee performance or functionality under those conditions. Use below-minimum hardware at your own risk. + +- 4 core CPU +- 4 GB Ram +- 500 GB storage (SSD recommended) +- Stable 50 Mbps internet connection + + +### Recommended + +- 12 core CPU +- 32 GB Ram +- 2 TB SSD storage +- Stable 1 Gbps internet connection ## Install Required Packages -1. Install GitHub CLI (gh): - - Download the latest release of gh CLI from [here](https://github.com/cli/cli/releases/tag/v2.31.0). - - Run the `gh-cli-latest.windows-amd64.msi` installer and follow the prompts. -2. Install Docker: +1. Install Docker: - Download Docker Desktop for Windows from [here](https://www.docker.com/products/docker-desktop/). - Run the installer and follow the prompts. - During installation, make sure to select the option to use WSL (Windows Subsystem for Linux) rather than Hyper-V. @@ -33,7 +53,7 @@ Before starting the installation process, ensure you have the following: ``` - Restart Docker Desktop. -3. Install Git: +2. Install Git: - Download Git for Windows from [here](https://git-scm.com/download/win). - Run the installer and use the default settings. @@ -49,10 +69,11 @@ Before starting the installation process, ensure you have the following: cd Documents ``` - More detailed instructions on navigating with the `cd` command can be found [here](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cd) - - **NOTE**: Your database of Arweave Transaction Headers will be created in the project directory, not Docker. So, if you are using an external hard drive to turn an old machine into a node, install the node directly to that external drive. + - **NOTE**: Your indexing databases will be created in the project directory unless otherwise specified in your .env file, not your Docker environment. So, if you are using an external hard drive, you should install the node directly to that external drive. + - Run the following command: ``` - gh repo clone ar-io/ar-io-node + git clone https://github.com/ar-io/ar-io-node ``` ## Create the Environment File @@ -73,6 +94,8 @@ Before starting the installation process, ensure you have the following: - `ARNS_ROOT_HOST` sets the starting point for resolving ARNS names, which are accessed as a subdomain of a gateway. It should be set to the url you are pointing to your node, excluding any protocol prefix. For example, use `node-ar.io` and not `https://node-ar.io`. If you are using a subdomain to access your node and do not set this value, the node will not understand incoming requests. - Save the file with the name ".env" and make sure to select "All Files" as the file type. This helps to ensure the file saves as ".env" and not ".env.txt" + Advanced configuration options can be found at [ar.io/docs](https://ar.io/docs/gateways/ar-io-node/advanced-config.html) + **Note**: The `.env` file should be saved inside the same directory where you cloned the repository (e.g., `ar-io-node`). ## Start the Docker Containers @@ -91,10 +114,12 @@ Before starting the installation process, ensure you have the following: cd "C:\My Documents\ar-io-node" ``` - Use the `dir` command to list the contents of the current directory and verify that you're in the correct location: + ``` dir ``` - Once you are in the correct directory, run the following command to start the Docker container: + ``` docker compose up -d --build ``` @@ -161,13 +186,13 @@ To expose your node to the internet and use a custom domain, follow these steps: ``` - Run the following command: ``` - gh repo clone bobinstein/dockerized-nginx + git clone https://github.com/bobinstein/dockerized-nginx ``` **Note**: This NGINX container was designed to easily automate many of the more technical aspects of setting up NGNIX and obtaining an ssl certificate so your node can be accessed with https. However, wildcard domain certifications cannot be universally automated due to significant security concerns. Be sure to follow the instructions in this project for obtaining wildcard domain certificates in order for your node to function properly. 2. Follow the instructions provided in the repository for setting up NGINX Docker. -Congratulations! Your ar.io node is now running and connected to the internet. Test it by entering https://\/3lyxgbgEvqNSvJrTX2J7CfRychUD5KClFhhVLyTPNCQ in your browser. +Congratulations! Your AR.IO node is now running and connected to the internet. Test it by entering https://\/3lyxgbgEvqNSvJrTX2J7CfRychUD5KClFhhVLyTPNCQ in your browser. -**Note**: If you encounter any issues during the installation process, please seek assistance from the [ar.io community](https://discord.gg/7zUPfN4D6g). +**Note**: If you encounter any issues during the installation process, please seek assistance from the [AR.IO community](https://discord.gg/7zUPfN4D6g). From 33e54e8bf1b28987448813d6d3d26db1bec65266 Mon Sep 17 00:00:00 2001 From: bobinstein Date: Sun, 8 Oct 2023 18:18:26 -0400 Subject: [PATCH 3/3] docs: update starting guides to clone main --- docs/linux-setup.md | 2 +- docs/windows-setup.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/linux-setup.md b/docs/linux-setup.md index cb2b3301..055ee9ff 100644 --- a/docs/linux-setup.md +++ b/docs/linux-setup.md @@ -146,7 +146,7 @@ These packages are not required to run a node in its basic form. However, they w - Clone the ar-io-node repository and navigate into it: ``` - git clone https://github.com/ar-io/ar-io-node + git clone -b main https://github.com/ar-io/ar-io-node cd ar-io-node ``` diff --git a/docs/windows-setup.md b/docs/windows-setup.md index 956553c6..a1181b38 100644 --- a/docs/windows-setup.md +++ b/docs/windows-setup.md @@ -73,7 +73,7 @@ The hardware specifications listed below represent the minimum system requiremen - Run the following command: ``` - git clone https://github.com/ar-io/ar-io-node + git clone -b main https://github.com/ar-io/ar-io-node ``` ## Create the Environment File @@ -186,7 +186,7 @@ To expose your node to the internet and use a custom domain, follow these steps: ``` - Run the following command: ``` - git clone https://github.com/bobinstein/dockerized-nginx + git clone -b main https://github.com/bobinstein/dockerized-nginx ``` **Note**: This NGINX container was designed to easily automate many of the more technical aspects of setting up NGNIX and obtaining an ssl certificate so your node can be accessed with https. However, wildcard domain certifications cannot be universally automated due to significant security concerns. Be sure to follow the instructions in this project for obtaining wildcard domain certificates in order for your node to function properly.