diff --git a/docs/img/user-guide/admin-panel/login-page.png b/docs/img/user-guide/admin-panel/login-page.png index 93e97488..18c7f901 100644 Binary files a/docs/img/user-guide/admin-panel/login-page.png and b/docs/img/user-guide/admin-panel/login-page.png differ diff --git a/docs/img/user-guide/cloud/aws/instance-security-group.png b/docs/img/user-guide/cloud/aws/instance-security-group.png index 9db8173c..aa5d2175 100644 Binary files a/docs/img/user-guide/cloud/aws/instance-security-group.png and b/docs/img/user-guide/cloud/aws/instance-security-group.png differ diff --git a/docs/user-guide/advanced-guide.rst b/docs/user-guide/advanced-guide.rst index 5d16950d..2d13af24 100644 --- a/docs/user-guide/advanced-guide.rst +++ b/docs/user-guide/advanced-guide.rst @@ -4,9 +4,11 @@ Advanced guide .. include:: /user-guide/advanced-guide/types-of-node-running.rst .. include:: /user-guide/advanced-guide/admin-panel.rst +.. include:: /user-guide/advanced-guide/upgrade-node.rst .. include:: /user-guide/advanced-guide/new-os-user.rst .. include:: /user-guide/advanced-guide/2fa-auth.rst .. include:: /user-guide/advanced-guide/domain-name.rst +.. include:: /user-guide/advanced-guide/node-ssl-cert.rst .. include:: /user-guide/advanced-guide/backup-ssh-keys.rst .. include:: /user-guide/advanced-guide/snapshots.rst -.. include:: /user-guide/advanced-guide/node-private-key.rst +.. include:: /user-guide/advanced-guide/node-keys.rst diff --git a/docs/user-guide/advanced-guide/domain-name.rst b/docs/user-guide/advanced-guide/domain-name.rst index 8b642572..09bc4a00 100644 --- a/docs/user-guide/advanced-guide/domain-name.rst +++ b/docs/user-guide/advanced-guide/domain-name.rst @@ -112,17 +112,24 @@ change ``157.230.146.230`` to your server's ``IP address``. .. code-block:: console - $ export NODE_IP_ADDRESS=157.230.146.230 - $ curl -X POST http://$NODE_IP_ADDRESS:8080 -H 'Content-Type: application/json' -d \ + $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool -Then change the value of ``NODE_IP_ADDRESS`` to your domain name with an extension (i.e. ``the-coolest-masternode.xyz``) -and send execute the previous command again. A response should be similar to the previous one: +Then create a new environment variable with your domain name with an extension as illustrated below. Also, there is +a command to make your node to be discovered for synchronization by domain name instead of IP address. Change ``the-coolest-masternode.xyz`` +to your ``domain name``. .. code-block:: console - $ export NODE_IP_ADDRESS=the-coolest-masternode.xyz - $ curl -X POST http://$NODE_IP_ADDRESS:8080 -H 'Content-Type: application/json' -d \ + $ export DOMAIN=the-coolest-masternode.xyz + $ sudo -i sed -i "s@$NODE_IP_ADDRESS@$DOMAIN@" /home/remme-core-$REMME_CORE_RELEASE/config/network-config.env && \ + echo "DOMAIN=$DOMAIN" >> ~/.bashrc + +Execute the previous command again. A response should be similar to the previous one. + +.. code-block:: console + + $ curl -X POST http://$DOMAIN/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool The flow is illustrated below. @@ -132,5 +139,5 @@ The flow is illustrated below. :align: center :alt: Proof domain name works -For now, you can reach your admin panel with the following address — ``http://the-coolest-masternode.xyz/login``, +For now, you can reach your admin panel with the following address — ``http://the-coolest-masternode.xyz``, changing ``the-coolest-masternode.xyz`` to your domain name and extension. diff --git a/docs/user-guide/advanced-guide/node-keys.rst b/docs/user-guide/advanced-guide/node-keys.rst new file mode 100644 index 00000000..83d66301 --- /dev/null +++ b/docs/user-guide/advanced-guide/node-keys.rst @@ -0,0 +1,37 @@ +Node keys +========= + +Until the admin panel does not cover all node's user requirements, there is an ability to fetch the node's private and public keys +manually to execute different operations such as an ``Atomic Swap``. Being logged in the server, use the following command to fetch +node's private key. + +.. code-block:: console + + $ sudo cat /var/lib/docker/volumes/remme_validator_keys/_data/validator.priv + +The command will show you the private key and you can copy it. The result is illustrated below. + +.. image:: /img/user-guide/advanced-guide/node-private-key.png + :width: 100% + :align: center + :alt: Get node private key + +Do not share it for the security reasons. To fetch the public key and its address, use thee following command: + +.. code-block:: console + + $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ + '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool + +The response should look similar to this: + +.. code-block:: console + + { + "jsonrpc": "2.0", + "id": "11", + "result": { + "node_public_key": "02b844a10124aae7713e18d80b1a7ae70fcbe73931dd933c821b354f872907f7f3", + "node_address": "116829caa6f35dddfd62d067607426407c95bf8dbc37fa55bcf734366df2e97cac660b" + } + } diff --git a/docs/user-guide/advanced-guide/node-private-key.rst b/docs/user-guide/advanced-guide/node-private-key.rst deleted file mode 100644 index f9acc7c8..00000000 --- a/docs/user-guide/advanced-guide/node-private-key.rst +++ /dev/null @@ -1,18 +0,0 @@ -Node private key -================ - -Until the admin panel does not cover all node's user requirements, there is an ability to fetch the node's private key -manually to execute different operations such as an ``Atomic Swap``. Being logged in the server, use the following commands. - -.. code-block:: console - - $ sudo cat /var/lib/docker/volumes/remme_validator_keys/_data/validator.priv - -Then the last command will show you the private key and you can copy it. The result is illustrated below. - -.. image:: /img/user-guide/advanced-guide/node-private-key.png - :width: 100% - :align: center - :alt: Get node private key - -Do not share it for the security reasons. diff --git a/docs/user-guide/advanced-guide/node-ssl-cert.rst b/docs/user-guide/advanced-guide/node-ssl-cert.rst index 6538b98f..de4981e0 100644 --- a/docs/user-guide/advanced-guide/node-ssl-cert.rst +++ b/docs/user-guide/advanced-guide/node-ssl-cert.rst @@ -25,13 +25,6 @@ The flow is illustrated below. :align: center :alt: SSH login to the server -Then create a new environment variable as illustrated below. Change ``the-coolest-masternode.xyz`` -with your ``domain name``. - -.. code-block:: console - - $ export DOMAIN=the-coolest-masternode.xyz - Then create a new environment variable with your ``email`` to receive notifications from ``Let's Encrypt``: .. code-block:: console @@ -42,22 +35,22 @@ Copy the command below and paste into the terminal which will create an ``SSL ce .. code-block:: console - $ echo "DOMAIN=$DOMAIN" >> ~/.bashrc && \ - sudo apt install software-properties-common -y && \ + $ sudo apt install software-properties-common -y && \ sudo add-apt-repository ppa:certbot/certbot -y && \ sudo apt update && sudo apt install certbot python-certbot-nginx -y && \ sudo -i sed -i "s@websitenamewithdomain@$DOMAIN@" /etc/nginx/nginx.conf && \ sudo certbot run --nginx -d $DOMAIN --non-interactive --agree-tos -m $EMAIL && \ - curl https://raw.githubusercontent.com/Remmeauth/remme-core/master/docs/user-guide/templates/letsencrypt-nginx.conf | sudo tee /etc/nginx/nginx.conf > /dev/null && \ + curl https://gist.githubusercontent.com/dmytrostriletskyi/24a8125e609bba7e8d8f9b3e54d634ff/raw/6e9fa256fe07c99d1e15bc652bd328cb3447b046/letsencrypt-nginx.conf | sudo tee /etc/nginx/nginx.conf > /dev/null && \ sudo -i sed -i "s@websitenamewithdomain@$DOMAIN@" /etc/nginx/nginx.conf && \ sudo systemctl restart nginx && \ - echo "* * * * * $USER /usr/bin/certbot renew" | sudo tee -a /etc/crontab > /dev/null + echo "1 5 * * * $USER /usr/bin/certbot renew" | sudo tee -a /etc/crontab > /dev/null && \ + echo "5 5 * * * /usr/bin/systemctl reload nginx" | sudo tee -a /etc/crontab > /dev/null To check if your node has completed a correct ``SSL certificate`` setup, use the following commands, being logged in your server. .. code-block:: console - $ curl -X POST https://$DOMAIN -H 'Content-Type: application/json' -d \ + $ curl -X POST https://$DOMAIN/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool The flow is illustrated below. @@ -67,7 +60,7 @@ The flow is illustrated below. :align: center :alt: Proof node works over HTTPS -For now, you can reach your monitoring page with the following address — ``https://the-coolest-masternode.xyz/grafana/``, +For now, you can reach your monitoring page with the following address — ``https://the-coolest-masternode.xyz``, changing ``the-coolest-masternode.xyz`` to your domain name and extension. Comodo @@ -278,15 +271,8 @@ Using a brand new terminal window on the local machine transfer the file to the $ scp ~/Desktop/210854864.zip root@157.230.226.218:~ -Then open a terminal window with the server. Then create a new environment variable with your domain name as illustrated below. -Remember to change ``the-coolest-masternode.xyz`` with your ``domain name``. - -.. code-block:: console - - $ export DOMAIN=the-coolest-masternode.xyz - -Copy the command below and paste into the terminal which will create an ``SSL certificate`` and order the web-server to -serve ``https`` connections. +Then open a terminal window with the server. Copy the command below and paste into the terminal which will +create an ``SSL certificate`` and order the web-server to serve ``https`` connections. .. code-block:: console @@ -295,7 +281,7 @@ serve ``https`` connections. cd "CER - CRT Files" && cat ${DOMAIN%.*}_${DOMAIN##*.}.crt My_CA_Bundle.ca-bundle > ssl-bundle.crt && \ cd .. && mv CER\ -\ CRT\ Files/ssl-bundle.crt . && \ sudo mkdir /etc/comodo/ && sudo mv server.key ssl-bundle.crt /etc/comodo/ && \ - curl https://raw.githubusercontent.com/Remmeauth/remme-core/master/docs/user-guide/templates/comodo-nginx.conf | sudo tee /etc/nginx/nginx.conf > /dev/null && \ + curl https://gist.githubusercontent.com/dmytrostriletskyi/a0b4c24e0b34788596ed3f6264282694/raw/35be13584c781037c775f2f082387515ad069815/comodo-nginx.conf | sudo tee /etc/nginx/nginx.conf > /dev/null && \ sudo -i sed -i "s@websitenamewithdomain@$DOMAIN@" /etc/nginx/nginx.conf && \ sudo systemctl restart nginx @@ -303,7 +289,7 @@ To check if your node has completed a correct ``SSL certificate`` setup, use the .. code-block:: console - $ curl -X POST https://$DOMAIN -H 'Content-Type: application/json' -d \ + $ curl -X POST https://$DOMAIN/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool The flow is illustrated below. @@ -317,5 +303,5 @@ The flow is illustrated below. tool named curl -For now, you can reach your admin panel with the following address — ``https://the-coolest-masternode.xyz/login``, +For now, you can reach your admin panel with the following address — ``https://the-coolest-masternode.xyz``, changing ``the-coolest-masternode.xyz`` to your domain name and extension. diff --git a/docs/user-guide/advanced-guide/upgrade-node.rst b/docs/user-guide/advanced-guide/upgrade-node.rst new file mode 100644 index 00000000..1d160f96 --- /dev/null +++ b/docs/user-guide/advanced-guide/upgrade-node.rst @@ -0,0 +1,49 @@ +Upgrade the node +================ + +This section describes how to upgrade the node to latest version. After upgrade you are required to redo login +to the server if you want to execute commands farther. + +From 0.10.0-alpha to 0.11.0-alpha +--------------------------------- + +To upgrade from the version ``0.10.0-alpha`` to the version ``0.11.0-alpha``, use the following command on the server: + +.. code-block:: console + + $ curl https://gist.githubusercontent.com/dmytrostriletskyi/7407898a9737d5808716ea3b0f3d6f75/raw/64ec47fac9f0add5819526aaf9094d1529264edf/upgrade-node-from-0.10.0a-to-0.11.0a.sh > ~/upgrade-node-from-0.10.0a-to-0.11.0a.sh && \ + chmod +x ~/upgrade-node-from-0.10.0a-to-0.11.0a.sh && \ + ~/./upgrade-node-from-0.10.0a-to-0.11.0a.sh 0.10.0-alpha 0.11.0-alpha $NODE_IP_ADDRESS + +From 0.9.1-alpha to 0.10.0-alpha +-------------------------------- + +To upgrade from the version ``0.9.1-alpha`` to the version ``0.10.0-alpha``, use the following command on the server: + +.. code-block:: console + + $ curl https://gist.githubusercontent.com/dmytrostriletskyi/ddb0d8fc16512523f4942a2d60b57c63/raw/63de05cc7f68801bb6887fc07463422810276a10/upgrade-node.sh > ~/upgrade-node.sh && \ + chmod +x ~/upgrade-node.sh && \ + ~/./upgrade-node.sh 0.9.1-alpha 0.10.0-alpha + +From 0.9.0-alpha to 0.9.1-alpha +------------------------------- + +To upgrade from the version ``0.9.0-alpha`` to the version ``0.9.1-alpha``, use the following command on the server: + +.. code-block:: console + + $ curl https://gist.githubusercontent.com/dmytrostriletskyi/ddb0d8fc16512523f4942a2d60b57c63/raw/63de05cc7f68801bb6887fc07463422810276a10/upgrade-node.sh > ~/upgrade-node.sh && \ + chmod +x ~/upgrade-node.sh && \ + ~/./upgrade-node.sh 0.9.0-alpha 0.9.1-alpha + +From 0.8.1-alpha to 0.9.0-alpha +------------------------------- + +To upgrade from the version ``0.8.1-alpha`` to the version ``0.9.0-alpha``, use the following command on the server: + +.. code-block:: console + + $ curl https://gist.githubusercontent.com/dmytrostriletskyi/ddb0d8fc16512523f4942a2d60b57c63/raw/63de05cc7f68801bb6887fc07463422810276a10/upgrade-node.sh > ~/upgrade-node.sh && \ + chmod +x ~/upgrade-node.sh && \ + ~/./upgrade-node.sh 0.8.1-alpha 0.9.0-alpha diff --git a/docs/user-guide/cloud/aws.rst b/docs/user-guide/cloud/aws.rst index a40b686b..29271f97 100644 --- a/docs/user-guide/cloud/aws.rst +++ b/docs/user-guide/cloud/aws.rst @@ -100,11 +100,9 @@ Set tag named ``Name`` with value ``remme-core-testnet-node``, then press ``Next Add the following rules to the security group: -1. ``Custom TCP`` for type, ``8080`` for port range, ``0.0.0.0/0, ::/0`` for source and ``Open node RPC API port`` for description. -2. ``Custom TCP`` for type, ``8800`` for port range, ``0.0.0.0/0, ::/0`` for source and ``Nodes synchronisation port`` for description. -3. ``Custom TCP`` for type, ``3000`` for port range, ``0.0.0.0/0, ::/0`` for source and ``Monitoring port`` for description. -4. ``Custom TCP`` for type, ``80`` for port range, ``0.0.0.0/0, ::/0`` for source and ``HTTP port`` for description. -5. ``Custom TCP`` for type, ``443`` for port range, ``0.0.0.0/0, ::/0`` for source and ``HTTPS port`` for description. +1. ``Custom TCP`` for type, ``8800`` for port range, ``0.0.0.0/0, ::/0`` for source and ``Nodes synchronisation port`` for description. +2. ``Custom TCP`` for type, ``80`` for port range, ``0.0.0.0/0, ::/0`` for source and ``HTTP port`` for description. +3. ``Custom TCP`` for type, ``443`` for port range, ``0.0.0.0/0, ::/0`` for source and ``HTTPS port`` for description. .. image:: /img/user-guide/cloud/aws/instance-security-group.png :width: 100% @@ -180,27 +178,29 @@ If you need any assistance connecting to your instance, please see |connection_t Step 5: start the project ========================= -Copy commands below and paste it into the terminal. You can change the value of ``REMME_CORE_RELEASE`` below, just take -a look at our `release list `_. We would recommend the latest version of -the project that already specified in the command below. + +Export environment variable with your server ``IPv4 Public IP`` with the following command. Remember to change +``157.230.146.230`` to your server's ``IPv4 Public IP``. + +.. code-block:: console + + $ export NODE_IP_ADDRESS=157.230.146.230 + +Now, specify the release of the node you want to start. We would recommend the latest version of the project that already +specified in the command below. But you can change the value of ``REMME_CORE_RELEASE``, just take a look at our +`release list `_. .. code-block:: console - $ export REMME_CORE_RELEASE=0.8.0-alpha - $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ - echo "REMME_CORE_RELEASE=$REMME_CORE_RELEASE" >> ~/.bashrc && \ - cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$REMME_CORE_RELEASE.tar.gz | sudo tar zx && \ - cd remme-core-$REMME_CORE_RELEASE && \ - sudo apt update && sudo apt upgrade -y && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ - sudo apt update && sudo apt install docker.io -y && \ - sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" && \ - sudo chmod +x /usr/local/bin/docker-compose && \ - curl https://gist.githubusercontent.com/dmytrostriletskyi/9f525241acfc46799c65d5f010c43b5f/raw/3147860240613e7e2eab5e288d48a975934a260a/up-node-after-server-restart.sh > ~/up-node-after-server-restart.sh && \ - chmod +x ~/up-node-after-server-restart.sh && \ - echo "@reboot $USER ~/./up-node-after-server-restart.sh $REMME_CORE_RELEASE" | sudo tee -a /etc/crontab > /dev/null && \ - curl https://gist.githubusercontent.com/dmytrostriletskyi/48f2877d77570facffdea395521e8bd8/raw/9334bfb5cc18b4e143311fead9bd2447a0ae6d24/seeds-list.txt | sudo tee config/seeds-list.txt > /dev/null && \ - sudo make run_bg_user + $ export REMME_CORE_RELEASE=0.11.0-alpha + +After, copy and paste the following command to the terminal which will install and start your node. + +.. code-block:: console + + $ curl https://gist.githubusercontent.com/dmytrostriletskyi/c02b5b3a5f0e0a0a22abb2d35d6a8f20/raw/fbeb7d7e949c4d2cc27255117a79c31a72bfe315/install-and-start-node.sh > ~/install-and-start-node.sh && \ + chmod +x ~/install-and-start-node.sh && \ + ~/./install-and-start-node.sh $NODE_IP_ADDRESS $REMME_CORE_RELEASE .. image:: /img/user-guide/cloud/aws/installation-command.png :width: 100% @@ -228,13 +228,11 @@ When you see the same output as illustrated below, it means the node is ready to :align: center :alt: Proof core is up -To check if your node has completed a correct setup, use the following commands, being logged in your instance. Remember to -change ``157.230.146.230`` to your server's ``IP address``. +To check if your node has completed a correct setup, use the following command: .. code-block:: console - $ export NODE_IP_ADDRESS=157.230.146.230 - $ curl -X POST http://$NODE_IP_ADDRESS:8080 -H 'Content-Type: application/json' -d \ + $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool The response should look similar to this: @@ -261,8 +259,8 @@ Step 6: admin panel =================== While starting the node, the admin panel has also been installed and started. Log into the admin panel. Copy your server's -``IPv4 Public IP`` address, paste it into the browser address bar. Then add ``/login`` to the end of the address and press ``Enter``. -Then you will see the initial admin panel page with authentication. Enter ``remme`` to the password fields. +``IPv4 Public IP``, paste it into the browser address bar press ``Enter``. Then you will see the initial admin panel page with +authentication. Enter ``remme`` to the password fields. .. image:: /img/user-guide/admin-panel/login-page.png :width: 100% diff --git a/docs/user-guide/cloud/digital-ocean.rst b/docs/user-guide/cloud/digital-ocean.rst index 4c4f1a71..9a1ef0ff 100644 --- a/docs/user-guide/cloud/digital-ocean.rst +++ b/docs/user-guide/cloud/digital-ocean.rst @@ -178,27 +178,28 @@ The flow is illustrated below. Step 5: start the project ========================= -Copy commands below and paste it into the terminal. You can change the value of ``REMME_CORE_RELEASE`` below, just take -a look at our `release list `_. We would recommend the latest version of -the project that already specified in the command below. +Export environment variable with your server ``IP address`` with the following command. Remember to change +``157.230.146.230`` to your server's ``IP address``. .. code-block:: console - $ export REMME_CORE_RELEASE=0.8.0-alpha - $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ - echo "REMME_CORE_RELEASE=$REMME_CORE_RELEASE" >> ~/.bashrc && \ - cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$REMME_CORE_RELEASE.tar.gz | sudo tar zx && \ - cd remme-core-$REMME_CORE_RELEASE && \ - sudo apt update && sudo apt upgrade -y && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ - sudo apt update && sudo apt install docker.io -y && \ - sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" && \ - sudo chmod +x /usr/local/bin/docker-compose && \ - curl https://gist.githubusercontent.com/dmytrostriletskyi/9f525241acfc46799c65d5f010c43b5f/raw/3147860240613e7e2eab5e288d48a975934a260a/up-node-after-server-restart.sh > ~/up-node-after-server-restart.sh && \ - chmod +x ~/up-node-after-server-restart.sh && \ - echo "@reboot $USER ~/./up-node-after-server-restart.sh $REMME_CORE_RELEASE" >> /etc/crontab && \ - curl https://gist.githubusercontent.com/dmytrostriletskyi/48f2877d77570facffdea395521e8bd8/raw/9334bfb5cc18b4e143311fead9bd2447a0ae6d24/seeds-list.txt > config/seeds-list.txt && \ - sudo make run_bg_user + $ export NODE_IP_ADDRESS=157.230.146.230 + +Now, specify the release of the node you want to start. We would recommend the latest version of the project that already +specified in the command below. But you can change the value of ``REMME_CORE_RELEASE``, just take a look at our +`release list `_. + +.. code-block:: console + + $ export REMME_CORE_RELEASE=0.11.0-alpha + +After, copy and paste the following command to the terminal which will install and start your node. + +.. code-block:: console + + $ curl https://gist.githubusercontent.com/dmytrostriletskyi/c02b5b3a5f0e0a0a22abb2d35d6a8f20/raw/fbeb7d7e949c4d2cc27255117a79c31a72bfe315/install-and-start-node.sh > ~/install-and-start-node.sh && \ + chmod +x ~/install-and-start-node.sh && \ + ~/./install-and-start-node.sh $NODE_IP_ADDRESS $REMME_CORE_RELEASE .. image:: /img/user-guide/cloud/digital-ocean/installation-command.png :width: 100% @@ -226,13 +227,11 @@ When you see the same output as illustrated below, it means the node is ready to :align: center :alt: Proof core works -To check if your node has completed a correct setup, use the following commands, being logged in your droplet. Remember to -change ``157.230.146.230`` to your server's ``IP address``. +To check if your node has completed a correct setup, use the following command: .. code-block:: console - $ export NODE_IP_ADDRESS=157.230.146.230 - $ curl -X POST http://$NODE_IP_ADDRESS:8080 -H 'Content-Type: application/json' -d \ + $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool The response should look similar to this: @@ -259,8 +258,8 @@ Step 6: admin panel =================== While starting the node, the admin panel has also been installed and started. Log into the admin panel. Copy your server's -``IP address``, paste it into the browser address bar. Then add ``/login`` to the end of the address and press ``Enter``. -Then you will see the initial admin panel page with authentication. Enter ``remme`` to the password fields. +``IP address``, paste it into the browser address bar press ``Enter``. Then you will see the initial admin panel page with +authentication. Enter ``remme`` to the password fields. .. image:: /img/user-guide/admin-panel/login-page.png :width: 100% diff --git a/docs/user-guide/cloud/vultr.rst b/docs/user-guide/cloud/vultr.rst index d6047f76..16e10e9c 100644 --- a/docs/user-guide/cloud/vultr.rst +++ b/docs/user-guide/cloud/vultr.rst @@ -135,27 +135,28 @@ The flow is illustrated below. Step 4: start the project ========================= -Copy commands below and paste it into the terminal. You can change the value of ``REMME_CORE_RELEASE`` below, just take -a look at our `release list `_. We would recommend the latest version of -the project that already specified in the command below. +Export environment variable with your server ``IP address`` with the following command. Remember to change +``157.230.146.230`` to your server's ``IP address``. .. code-block:: console - $ export REMME_CORE_RELEASE=0.8.0-alpha - $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ - echo "REMME_CORE_RELEASE=$REMME_CORE_RELEASE" >> ~/.bashrc && \ - cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$REMME_CORE_RELEASE.tar.gz | sudo tar zx && \ - cd remme-core-$REMME_CORE_RELEASE && \ - sudo apt update && sudo apt upgrade -y && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ - sudo apt update && sudo apt install docker.io -y && \ - sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" && \ - sudo chmod +x /usr/local/bin/docker-compose && \ - curl https://gist.githubusercontent.com/dmytrostriletskyi/9f525241acfc46799c65d5f010c43b5f/raw/3147860240613e7e2eab5e288d48a975934a260a/up-node-after-server-restart.sh > ~/up-node-after-server-restart.sh && \ - chmod +x ~/up-node-after-server-restart.sh && \ - echo "@reboot $USER ~/./up-node-after-server-restart.sh $REMME_CORE_RELEASE" >> /etc/crontab && \ - curl https://gist.githubusercontent.com/dmytrostriletskyi/48f2877d77570facffdea395521e8bd8/raw/9334bfb5cc18b4e143311fead9bd2447a0ae6d24/seeds-list.txt > config/seeds-list.txt && \ - sudo make run_bg_user + $ export NODE_IP_ADDRESS=157.230.146.230 + +Now, specify the release of the node you want to start. We would recommend the latest version of the project that already +specified in the command below. But you can change the value of ``REMME_CORE_RELEASE``, just take a look at our +`release list `_. + +.. code-block:: console + + $ export REMME_CORE_RELEASE=0.11.0-alpha + +After, copy and paste the following command to the terminal which will install and start your node. + +.. code-block:: console + + $ curl https://gist.githubusercontent.com/dmytrostriletskyi/c02b5b3a5f0e0a0a22abb2d35d6a8f20/raw/fbeb7d7e949c4d2cc27255117a79c31a72bfe315/install-and-start-node.sh > ~/install-and-start-node.sh && \ + chmod +x ~/install-and-start-node.sh && \ + ~/./install-and-start-node.sh $NODE_IP_ADDRESS $REMME_CORE_RELEASE .. image:: /img/user-guide/cloud/digital-ocean/installation-command.png :width: 100% @@ -183,13 +184,11 @@ When you see the same output as illustrated below, it means the node is ready to :align: center :alt: Proof core is up -To check if your node has completed a correct setup, use the following commands, being logged in your server. Remember to -change ``157.230.146.230`` to your server's ``IP address``. +To check if your node has completed a correct setup, use the following command: .. code-block:: console - $ export NODE_IP_ADDRESS=157.230.146.230 - $ curl -X POST http://$NODE_IP_ADDRESS:8080 -H 'Content-Type: application/json' -d \ + $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool The response should look similar to this: @@ -216,8 +215,8 @@ Step 5: admin panel =================== While starting the node, the admin panel has also been installed and started. Log into the admin panel. Copy your server's -``IP address``, paste it into the browser address bar. Then add ``/login`` to the end of the address and press ``Enter``. -Then you will see the initial admin panel page with authentication. Enter ``remme`` to the password fields. +``IP address``, paste it into the browser address bar press ``Enter``. Then you will see the initial admin panel page with +authentication. Enter ``remme`` to the password fields. .. image:: /img/user-guide/admin-panel/login-page.png :width: 100% diff --git a/docs/user-guide/templates/comodo-nginx.conf b/docs/user-guide/templates/comodo-nginx.conf index bb8053b2..0975e578 100644 --- a/docs/user-guide/templates/comodo-nginx.conf +++ b/docs/user-guide/templates/comodo-nginx.conf @@ -7,6 +7,17 @@ events { } http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80 default_server; + server_name_in_redirect on; + return 301 https://websitenamewithdomain$request_uri; + } + server { listen 443 ssl; server_name websitenamewithdomain; @@ -22,18 +33,49 @@ http { } location / { + proxy_http_version 1.1; proxy_read_timeout 90; - proxy_set_header X-Forwarded-Host $host:$server_port; - proxy_set_header X-Forwarded-Server $host; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + proxy_pass http://localhost:3333; + } + + location /rpc/ { + proxy_http_version 1.1; + proxy_read_timeout 90; + + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_pass http://127.0.0.1:8080; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + rewrite ^/rpc/$ / break; + + proxy_pass http://localhost:8080; } - location /grafana/ { - proxy_pass http://127.0.0.1:3000/; + location /monitoring/ { + proxy_http_version 1.1; + proxy_read_timeout 90; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + rewrite ^/monitoring/(.*)$ /$1 break; + + proxy_pass http://localhost:3000; } } } diff --git a/docs/user-guide/templates/letsencrypt-nginx.conf b/docs/user-guide/templates/letsencrypt-nginx.conf index b36d3722..e27cbed1 100644 --- a/docs/user-guide/templates/letsencrypt-nginx.conf +++ b/docs/user-guide/templates/letsencrypt-nginx.conf @@ -7,6 +7,24 @@ events { } http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80 default_server; + server_name_in_redirect on; + return 301 https://websitenamewithdomain$request_uri; + + location ^~ /.well-known { + allow all; + alias /var/lib/letsencrypt/.well-known/; + default_type "text/plain"; + try_files $uri =404; + } + } + server { listen 443 ssl; server_name websitenamewithdomain; @@ -24,18 +42,49 @@ http { } location / { - proxy_read_timeout 90; - proxy_set_header X-Forwarded-Host $host:$server_port; - proxy_set_header X-Forwarded-Server $host; + proxy_http_version 1.1; + proxy_read_timeout 90; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + proxy_pass http://localhost:3333; + } + + location /rpc/ { + proxy_http_version 1.1; + proxy_read_timeout 90; + + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_pass http://127.0.0.1:8080; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + rewrite ^/rpc/$ / break; + + proxy_pass http://localhost:8080; } - location /grafana/ { - proxy_pass http://127.0.0.1:3000/; + location /monitoring/ { + proxy_http_version 1.1; + proxy_read_timeout 90; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + rewrite ^/monitoring/(.*)$ /$1 break; + + proxy_pass http://localhost:3000; } } } diff --git a/docs/user-guide/templates/node-nginx.conf b/docs/user-guide/templates/node-nginx.conf index 8e05cf2c..47d6e22e 100644 --- a/docs/user-guide/templates/node-nginx.conf +++ b/docs/user-guide/templates/node-nginx.conf @@ -7,6 +7,11 @@ events { } http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + server { server_name websitenamewithdomain; error_page 500 502 503 504 /custom_50x_rb.html; @@ -17,18 +22,49 @@ http { } location / { + proxy_http_version 1.1; proxy_read_timeout 90; - proxy_set_header X-Forwarded-Host $host:$server_port; - proxy_set_header X-Forwarded-Server $host; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + proxy_pass http://localhost:3333; + } + + location /rpc/ { + proxy_http_version 1.1; + proxy_read_timeout 90; + + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_pass http://127.0.0.1:8080; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + rewrite ^/rpc/$ / break; + + proxy_pass http://localhost:8080; } - location /grafana/ { - proxy_pass http://127.0.0.1:3000/; + location /monitoring/ { + proxy_http_version 1.1; + proxy_read_timeout 90; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + rewrite ^/monitoring/(.*)$ /$1 break; + + proxy_pass http://localhost:3000; } } } diff --git a/docs/user-guide/templates/seed-list.txt b/docs/user-guide/templates/seed-list.txt new file mode 100644 index 00000000..7f5200f0 --- /dev/null +++ b/docs/user-guide/templates/seed-list.txt @@ -0,0 +1,30 @@ +tcp://node-genesis-testnet.remme.io:8800 +tcp://node-1-testnet.remme.io:8800 +tcp://node-2-testnet.remme.io:8800 +tcp://node-3-testnet.remme.io:8800 +tcp://node-4-testnet.remme.io:8800 +tcp://node-5-testnet.remme.io:8800 +tcp://node-6-testnet.remme.io:8800 +tcp://node-7-testnet.remme.io:8800 +tcp://node-8-testnet.remme.io:8800 +tcp://node-9-testnet.remme.io:8800 +tcp://node-10-testnet.remme.io:8800 +tcp://node-11-testnet.remme.io:8800 +tcp://node-12-testnet.remme.io:8800 +tcp://node-13-testnet.remme.io:8800 +tcp://node-14-testnet.remme.io:8800 +tcp://node-15-testnet.remme.io:8800 +tcp://node-16-testnet.remme.io:8800 +tcp://node-17-testnet.remme.io:8800 +tcp://node-18-testnet.remme.io:8800 +tcp://node-19-testnet.remme.io:8800 +tcp://node-20-testnet.remme.io:8800 +tcp://node-21-testnet.remme.io:8800 +tcp://node-22-testnet.remme.io:8800 +tcp://node-23-testnet.remme.io:8800 +tcp://node-24-testnet.remme.io:8800 +tcp://node-25-testnet.remme.io:8800 +tcp://node-26-testnet.remme.io:8800 +tcp://node-27-testnet.remme.io:8800 +tcp://node-28-testnet.remme.io:8800 +tcp://node-29-testnet.remme.io:8800 diff --git a/docs/user-guide/templates/up-node-after-server-restart.sh b/docs/user-guide/templates/up-node-after-server-restart.sh index d95cb0ff..a7535981 100644 --- a/docs/user-guide/templates/up-node-after-server-restart.sh +++ b/docs/user-guide/templates/up-node-after-server-restart.sh @@ -3,7 +3,5 @@ cd /home/remme-core-"$1" sudo docker rm $(sudo docker ps -a -q) -f sudo docker rmi $(sudo docker images -q) -f -sudo make run_bg -sudo docker-compose -f remme-mon-stack-1.0.1/docker-compose.yml up -d -sudo systemctl restart nginx +sudo make run_bg_user cd ~ diff --git a/docs/user-guide/templates/upgrade-node.sh b/docs/user-guide/templates/upgrade-node.sh new file mode 100644 index 00000000..abafa52e --- /dev/null +++ b/docs/user-guide/templates/upgrade-node.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +sudo rm -rf /home/remme-core-$1 && \ + sudo docker rm $(sudo docker ps -a -q) -f && \ + sudo docker rmi $(sudo docker images -q) -f && \ + sudo sed -i '/REMME_CORE_RELEASE/d' ~/.bashrc && \ + echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \ + cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \ + cd remme-core-$2 && \ + sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \ + sudo -i sed -i "s@127.0.0.1@$NODE_IP_ADDRESS@" /home/remme-core-$2/config/network-config.env && \ + sudo -i sed -i '/ - GF_USERS_ALLOW_SIGN_UP=false/a \ - GF_SERVER_ROOT_URL=%(protocol)s:\/\/%(domain)s:\/monitoring\/' /home/remme-core-$2/docker/compose/mon.yml && \ + curl https://gist.githubusercontent.com/dmytrostriletskyi/8c07b752f8efd52d6f69feddd62e3af9/raw/438a72324fe8bfcaf9f56a4023eeaa1fa18ddb9a/seeds-list.txt | sudo tee config/seeds-list.txt > /dev/null && \ + sudo systemctl restart nginx && \ + sudo make run_bg_user diff --git a/docs/user-guide/troubleshooting.rst b/docs/user-guide/troubleshooting.rst index 961d9d25..925a8527 100644 --- a/docs/user-guide/troubleshooting.rst +++ b/docs/user-guide/troubleshooting.rst @@ -7,7 +7,6 @@ Troubleshooting is needed to identify the symptoms. Determining the most likely causes of a problem. .. include:: /user-guide/throubleshooting/command-line-notation.rst -.. include:: /user-guide/throubleshooting/nodes-network.rst .. include:: /user-guide/throubleshooting/open-terminal.rst .. include:: /user-guide/throubleshooting/ssh-keys.rst .. include:: /user-guide/throubleshooting/no-ssh-client.rst