Skip to main content

Localhost Tunnel (Pinggy)

warning

You only need to do this in case your machine running the LP node software doesn't have a static & public IP address accessible from the public internet. This is usually the case if you want to run the LP node at your home, which then runs in a local network and is not accessible from the outside world because of NAT.

Pinggy is a service which gives you a static public domain with the traffic tunneled directly to your server. You therefore don't need a public IP address when running the LP node and can run the LP node on home networks.

Creating account​

To use the pinggy tunnel you first need to create an account and then get the Pro subscription there (this costs $3 per month, with a free trial for 7 days)

Head over to Pinggy website and create an account there. Once registered go over to subscriptions and subscribe to the Pro plan.

Tunnel setup​

After registering the account and subscribing to the Pro subscription you need to head over to the subdomains. Copy the Access token & Subdomain from the page, should look like this:

Pinggy dashboard

So in this case the access token (eCC...) & subdomain (zrgaulsdkx.a.pinggy.link)

Running the tunnel​

We will now use the copied access token & subdomain to setup the tunnel on the LP node. The following command will run the tunnel inside a docker image (replace the <your access token from pinggy dashboard> with your own access token copied in the previous step)

sudo docker run -d --restart=unless-stopped --net=host -t pinggy/pinggy -p 443 -R0:localhost:443 -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -t <your access token from pinggy dashboard>[email protected]

LP configuration​

We need to configure the LP node to use a different TLS challenge mechanism and also configure the correct subdomain to be used. To do so we edit the LP node's configuration - this is stored at config/intermediary/config.yaml (for mainnet) or config-testnet/intermediary/config.yaml (for testnet). Search for the SSL_AUTO section in the config, should look like this:

config.yaml
#Automatic SSL certificate provisioning config
SSL_AUTO:
#HTTP listen port to list for ACME challenges
HTTP_LISTEN_PORT: 80
#DNS proxy to use - mapping the server's IP address to a domain
DNS_PROXY: "nodes.atomiq.exchange"

Replace the whole section with the following (be sure to copy in your subdomain you've got in the pinggy dashboard)

config.yaml
#Automatic SSL certificate provisioning config
SSL_AUTO:
#Use different TLS challenge method
ACME_METHOD: "tls-alpn-01"
#DNS domain to use
FULL_DNS_DOMAIN: "<your subdomain from pinggy dashboard>"

After this you are done with the pinggy setup and can continue the LP node setup.