Tunnel templates
Why templates
- Run multiple tunnels at the same time.
- If you use certain subdomains/port regularly, it is easier to create them as services and reuse using simple commands.
Open the portr client config file by running the following command
portr config edit
This should open a file with the following contents
server_url: example.comssh_url: example.com:2222secret_key: { your-secret-key }tunnels: - name: portr subdomain: portr port: 4321
You can create tunnel templates under the tunnels key to quickly start them.
For example, you can start the portr tunnel using portr start portr
. You can also add a tcp connection by specifying the type of the connection.
tunnels: - name: portr subdomain: portr port: 4321 - name: pg subdomain: portr port: 5432 type: tcp
And start multiple services by using the command portr start portr pg
.
To start all the services, use the command portr start
.
For more details, run portr --help
.