Qortal Project

The future of blockchain platforms

User Tools

Site Tools


how_to_setup_a_gateway_node

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
how_to_setup_a_gateway_node [11/04/2022 17:41] – created gfactorhow_to_setup_a_gateway_node [01/17/2024 16:23] (current) – updated settings.json recommendation for gateway nodes. crowetic
Line 1: Line 1:
 ===== How to Setup A Gateway Node=== ===== How to Setup A Gateway Node===
 +{{:qortal_official_logo_transparent_.png?400|}}
 (guide by crowetic) (guide by crowetic)
  
Line 58: Line 59:
 We will copy paste the following into the settings.json, and use ''cntrl+x'' then ''ENTER'' to save changes. We will copy paste the following into the settings.json, and use ''cntrl+x'' then ''ENTER'' to save changes.
  
-<code>{+<code>{{
   "gatewayEnabled": true,   "gatewayEnabled": true,
   "gatewayPort": 8080,   "gatewayPort": 8080,
-  "maxPeers": 150+  "maxPeers": 424
-  "maxNetworkThreadPoolSize": 300+  "maxNetworkThreadPoolSize": 1200
-  "repositoryConnectionPoolSize": 300+  "repositoryConnectionPoolSize": 4620, 
-  "minOutbountPeers": 8+  "allowConnectionsWithOlderPeerVersions": false, 
-  "minBlockchainPeers": 8,+  "maxThreadsPerMessageType":
 +        { "messageType": "ARBITRARY_DATA_FILE", "limit": 125 }, 
 +        { "messageType": "GET_ARBITRARY_DATA_FILE", "limit": 125 }, 
 +        { "messageType": "ARBITRARY_DATA", "limit": 125 }, 
 +        { "messageType": "GET_ARBITRARY_DATA", "limit": 125 }, 
 +        { "messageType": "ARBITRARY_DATA_FILE_LIST", "limit": 125 }, 
 +        { "messageType": "GET_ARBITRARY_DATA_FILE_LIST", "limit": 125 }, 
 +        { "messageType": "ARBITRARY_SIGNATURES", "limit": 125 }, 
 +        { "messageType": "ARBITRARY_METADATA", "limit": 125 }, 
 +        { "messageType": "GET_ARBITRARY_METADATA", "limit": 125 }, 
 +        { "messageType": "GET_TRANSACTION", "limit": 125 }, 
 +        { "messageType": "TRANSACTION_SIGNATURES", "limit": 125 }, 
 +        { "messageType": "TRADE_PRESENCES", "limit": 125 } 
 +], 
 +  "minPeerVersion": "4.4.0"
 +  "minOutbountPeers": 32
 +  "blockCacheSize": 220,
   "apiRestricted": true,   "apiRestricted": true,
   "listenAddress":"0.0.0.0",   "listenAddress":"0.0.0.0",
-  "apiKeyDisabled": false+  "apiWhitelistEnabled": false
-  "apiWhitelist":+
-          "127.0.0.1", +
-          "0.0.0.0/0", +
-          "::/0" +
-  ] +
 } }
 +
 </code> </code>
  
Line 96: Line 108:
 <code>exit</code> <code>exit</code>
  
-====nginx configuration====+====NGINX Configuration====
  
 The exit command will take us back to our sudoer. Once we're there, we will modify the nginx config. The default location for the nginx configuration files is ''/etc/nginx/sites-enabled'' where individual site configuration files can be placed.  The exit command will take us back to our sudoer. Once we're there, we will modify the nginx config. The default location for the nginx configuration files is ''/etc/nginx/sites-enabled'' where individual site configuration files can be placed. 
Line 203: Line 215:
 Same here, after copy/pasting, use ''cntrl+x'' and ''ENTER'' to save, and you will have the new file ''/home/qortal/certs/cloudflarecert.key'' file that nginx will use for your certificate KEY file. Same here, after copy/pasting, use ''cntrl+x'' and ''ENTER'' to save, and you will have the new file ''/home/qortal/certs/cloudflarecert.key'' file that nginx will use for your certificate KEY file.
  
-====DNS configuration===+====DNS Configuration===
  
 In your Newly setup CloudFlare DNS, you will create a new ''A Record'' with the **public IP of your server** (you can get the public IP of the server like this...) ''curl canhazip.com'' In your Newly setup CloudFlare DNS, you will create a new ''A Record'' with the **public IP of your server** (you can get the public IP of the server like this...) ''curl canhazip.com''
Line 230: Line 242:
 Now you should be golden. Only thing left is to make sure you have the correct ports forwarded in to your node. Now you should be golden. Only thing left is to make sure you have the correct ports forwarded in to your node.
  
-====Forwarding the Correct Ports in to Your Gateway Node==== +====Forwarding the Correct Ports====
- +
-Your Gateway Node needs to use the following ports on **TCP protocol**, the specifics of the forwarding will depend on how your firewall is setup, which type of firewall you have, etc... this guide does not cover port forwarding, but there is another guide on this wiki that does, and there are plenty of other guides specific to whichever router and firewall you're using.+
  
-**The Necessary ports are**+Your Gateway Node needs to use the following ports on **TCP protocol**, the specifics of the forwarding will depend on how your firewall is setup, which type of firewall you have, etc... this guide does not cover port forwarding, but there is another guide on this wiki that does, and there are plenty of other guides specific to whichever router and firewall you're using. The necessary ports are:
  
 -Port ''80'' - port 80 is used for redirection from http to https through your nginx config. When a user inputs ''yourdomain.whatever'', by default, the browser will send them to **port 80**, when they get there, your **nginx config** will bounce them to ''port 443'' and **secure them with SSL**. -Port ''80'' - port 80 is used for redirection from http to https through your nginx config. When a user inputs ''yourdomain.whatever'', by default, the browser will send them to **port 80**, when they get there, your **nginx config** will bounce them to ''port 443'' and **secure them with SSL**.
Line 242: Line 252:
 -Port ''12392'' - port 12392 is the **Qortal P2P port** - in order to get as many connections as possible for your ''maxPeers'' setting, and to allow as easy access to data on your node as possible, having this port forwarded will be VERY helpful. -Port ''12392'' - port 12392 is the **Qortal P2P port** - in order to get as many connections as possible for your ''maxPeers'' setting, and to allow as easy access to data on your node as possible, having this port forwarded will be VERY helpful.
  
--((Optional)) -Port ''12391'' - port 12391 is the **Qortal API port** - this port is used for DIRECT connection by the OWNER (you) of the node, with the direct public IP address (not the DNS through cloudflare, that will NOT work as described below...) for configuration of the blocked websites and so forth. If you think you'll need to block sites with data that doesn't work for your location, etc... having this port open, and your UI configured to connect to the public IP of your gateway node, is a good idea, so you can use your UI to make those types of changes directly. +-Port ''12391'' (optional) - port 12391 is the **Qortal API port** - this port is used for DIRECT connection by the OWNER (you) of the node, with the direct public IP address (not the DNS through cloudflare, that will NOT work as described below...) for configuration of the blocked websites and so forth. If you think you'll need to block sites with data that doesn't work for your location, etc... having this port open, and your UI configured to connect to the public IP of your gateway node, is a good idea, so you can use your UI to make those types of changes directly. 
  
 ====Final Words==== ====Final Words====
how_to_setup_a_gateway_node.1667598087.txt.gz · Last modified: 11/04/2022 17:41 by gfactor