|
| 1 | +--- |
| 2 | +title: Connect GUI to Remote Node |
| 3 | +weight: 8 |
| 4 | +--- |
| 5 | + |
| 6 | +Since Pactus version 1.12.0, users can connect to a remote node using the Pactus GUI. |
| 7 | +This enables them to easily monitor their node on any VPS from their personal computer. |
| 8 | +Managing your nodes, sending transactions, and monitoring validators can all be done through the GUI application. |
| 9 | + |
| 10 | +In this document, we explain the ways you can connect to your node through the Pactus GUI. |
| 11 | + |
| 12 | +## Bare Connection |
| 13 | + |
| 14 | +To connect to your node, the [gRPC](https://grpc.io/docs/what-is-grpc/) service of your remote node must be enabled. |
| 15 | +The gRPC connection is unencrypted by default, so the connection between the GUI and your node is bare and unencrypted. |
| 16 | + |
| 17 | +Here is an example of how you can connect to your node: |
| 18 | + |
| 19 | +{{< os_tabs items="unix,windows" >}} |
| 20 | + {{< os_tab >}} |
| 21 | + |
| 22 | +```shell |
| 23 | +./pactus-gui -grpc-addr http://testnet1.pactus.org:50052 -grpc-insecure |
| 24 | +``` |
| 25 | + |
| 26 | + {{< /os_tab >}} |
| 27 | + {{< os_tab >}} |
| 28 | + |
| 29 | +```shell |
| 30 | +pactus-gui.exe -grpc-addr http://testnet1.pactus.org:50052 -grpc-insecure |
| 31 | +``` |
| 32 | + |
| 33 | + {{< /os_tab >}} |
| 34 | +{{< /os_tabs >}} |
| 35 | + |
| 36 | +You can use an IP address for the connection, such as `157.180.70.236:50052`. |
| 37 | +The `-grpc-insecure` flag indicates that the connection is not secure and not encrypted. |
| 38 | +We do not recommend enabling the wallet service in this mode, as all credentials and |
| 39 | +information you send or receive may be observed by a man-in-the-middle attacker. |
| 40 | + |
| 41 | +## Secure Connection |
| 42 | + |
| 43 | +One simple way to secure the gRPC connection is to wrap it over the `https` protocol. |
| 44 | +This is known as [gRPC-Web](https://grpc.io/docs/platforms/web/). |
| 45 | + |
| 46 | +You can follow the [Secure Connections](./secure-connections.md) tutorial to set up your server to |
| 47 | +wrap the gRPC connection over the `https` protocol. We have explained how to secure the connection there. |
| 48 | +This approach requires a domain name and NGINX installed on your server. |
| 49 | + |
| 50 | +Once the gRPC-Web setup is complete, you can connect to your node in a secure and encrypted way, as shown below: |
| 51 | + |
| 52 | +{{< os_tabs items="unix,windows" >}} |
| 53 | + {{< os_tab >}} |
| 54 | + |
| 55 | +```shell |
| 56 | +./pactus-gui -grpc-addr https://testnet1.pactus.org/grpc-web |
| 57 | +``` |
| 58 | + |
| 59 | + {{< /os_tab >}} |
| 60 | + {{< os_tab >}} |
| 61 | + |
| 62 | +```shell |
| 63 | +pactus-gui.exe -grpc-addr https://testnet1.pactus.org/grpc-web |
| 64 | +``` |
| 65 | + |
| 66 | + {{< /os_tab >}} |
| 67 | +{{< /os_tabs >}} |
| 68 | + |
| 69 | +In this case, your connection from your computer to your node is fully encrypted and secure against man-in-the-middle attacks. |
| 70 | + |
| 71 | +## Enabling Wallet Service |
| 72 | + |
| 73 | +By default, the wallet service on your node is disabled. You can enable it in the config file; |
| 74 | +however, if your connection is insecure, we do not recommend it. |
| 75 | +If you do enable it, make sure you set a strong password for your wallet. |
| 76 | + |
| 77 | +## FAQ |
| 78 | + |
| 79 | +### I got a `server: 403 (Forbidden)` error |
| 80 | + |
| 81 | +If you set up your domain using Cloudflare, this is most likely because the Cloudflare gRPC service is disabled. |
| 82 | +You can check their [documentation](https://developers.cloudflare.com/network/grpc-connections/#enable-grpc) |
| 83 | +to enable the gRPC service. |
0 commit comments