Wallet - Custom Endpoint

From xx network wiki
(Redirected from Explorer - Custom Endpoint)
Jump to navigation Jump to search
This is a community contributed page

Instructions to use your own custom endpoint via SSH tunnel

1. Set up xxnetwork chain service

Use your existing xx network node or gateway computer, or set up a stand-alone node.

2. Stop the xxnetwork-chain service


3. Modify the chain service file

NOTE: It is only necessary to make changes to one of the computers running the xx network software.

In order to connect to your local instance using https://wallet.xx.network/[1], edit the xxnetwork-chain.service file and insert the following argument into the ExecStart line: --rpc-cors 'https://wallet.xx.network,http://localhost:63007'


On a Validator node, generally the cMix node computer, the line should look something like this:

ExecStart=/bin/bash -c "/opt/xxnetwork/bin/xxnetwork-chain --validator --name YOURNAME --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' --base-path /opt/xxnetwork/db --port 15974 --ws-port 63007 --rpc-cors 'https://wallet.xx.network,http://localhost:63007' >> /opt/xxnetwork/log/chain.log 2>&1"

On the computer running the cMix gateway server or a stand-alone node, the line should look something like this:

ExecStart=/bin/bash -c "/opt/xxnetwork/bin/xxnetwork-chain --name YOURNAME --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' --base-path /opt/xxnetwork/db --port 15974 --ws-port 63007 --rpc-cors 'https://wallet.xx.network,http://localhost:63007' >> /opt/xxnetwork/log/chain.log 2>&1"

4. Update systemd to digest the modified configuration


5. Start the xxnetwork-chain service


6. Set up your SSH tunnel

The command to establish a tunnel to your node through ssh is the same on Windows and Linux:


You will be prompted for a password (or, if you use a certificate, supply it with the -i flag, e.g. -i C:\Users\sshkey\privatekey.ppk) and the terminal will remain in use until the ssh tunnel is killed.

You may test the SSH tunnel by now browsing to http://127.0.0.1:63007, where you should be greeted with a stark page with the message WebSocket Protocol Error: Unable to parse WebSocket key. This is fine.

7. Enable the custom endpoint in xx wallet

Browse to http://wallet.xx.network. If you use the default port of 63007, place your mouse over the 'Local Node' button on the left side and click the the circle in the 127.0.0.1:63007 that pops up. After a few moments you will see the xx wallet running as normal. You can click on 'Network > Explorer > Node info' to see your connected peers and other details.

If you use a different port, you can add a custom endpoint by placing your mouse over 'Add Custom Endpoint' and filling in your details, e.g. wss://127.0.0.1:80085.