Skip to content

Using Lokal Server on Lokal Client

After you had Lokal Tunnel Server running, please click on Tunnel Server menu on Lokal app, then click on Add New Server button.

Preview of Add New Tunnel Server Modal on Lokal Tunnel Client app

On previous section we already had a .env file that is look like this

lokal.env
TUNNEL_SERVER_BIND_HOST="0.0.0.0"
TUNNEL_SERVER_BIND_PORT="26515"
TUNNEL_SERVER_JWT_SECRET="CHANGE_ME"
TUNNEL_SERVER_ENCRYPTION_KEY="CHANGE_ME"
VHOST_HTTP_HOST="0.0.0.0"
VHOST_HTTP_PORT="80"

Name

fill this field with the name you would like, any identifiable are recommended, for example if I had my server running on Linode CGK-1 region, I would name it “Linode CGK-1 2CPU”.

Server Host

Server Host are basically an Hostname or IP Address for accessing the TUNNEL_SERVER_BIND_HOST address, it could be an Public IP Address, or a domain if you want to check what’s your current VPS public IP are, you could do curl ipinfo.io

Server Port

fill this field with the value from TUNNEL_SERVER_BIND_PORT, make sure the port is publicly accessible.

Pointed Domain

Fill this field with a list of domain that are pointed to the same server as VHOST_HTTP_HOST’s Public IP for TCP Public Address, make sure that any other port rather than 443 and 80 are accessible from the domain.

http public address TCP/UDP public address

make sure that the domain listed are having A DNS with Wildcard enabled.

wildcard with orange cloud enabled

Secret Key

paste the same value as Server’s TUNNEL_SERVER_JWT_SECRET

Encryption Key

paste the same value as Server’s TUNNEL_SERVER_ENCRYPTION_KEY