Skip to main content

How to open several tunnels from a proximamp.yml file

Describe your tunnels in a proximamp.yml file and open them all with one command: on the next run each one gets the same address while your account holds it. The service and the Docker image read the same file.

Describe the tunnels​

Create proximamp.yml in the folder you will run the command from:

tunnels:
minecraft:
type: tcp # tcp, udp or http
port: 25565
udp: true # tcp only: the same address answers on UDP too
site:
type: http
port: 8080
host: 192.168.1.20 # another computer of your network; optional
  • A tunnel's name is up to 64 Latin letters, digits, dots, dashes and underscores.
  • Two tunnels of one protocol on one port of one computer are an error: "the tunnel … opens the same port as a tunnel above it".
  • The file has no https type: open a website that itself works over https with the command proximamp https (HTTPS link).
  • What to keep in mind with host: is on the "Another device or server" page.
  • To open a tunnel on an address your account already holds, put it in address:. proximamp addresses lists those addresses.
  • Save the file as UTF-8. Windows PowerShell 5.1 writes UTF-16 with >, and the command won't take such a file: open it in Notepad, choose "File" → "Save as" and set "Encoding" to "UTF-8".

Open the tunnels​

In Docker and with the service this step isn't needed: the container and the service open the file's tunnels. In Docker the file is mounted as /etc/proximamp/proximamp.yml, and host: names the server's service (Docker).

proximamp up

A file from another folder:

proximamp up -c /etc/proximamp/proximamp.yml

Every line of output starts with the tunnel's name, and a tunnel's first line is its address. Ctrl+C closes all the tunnels.

An error in the file names the line, for example "proximamp.yml, line 7: port is a whole number from 1 to 65535". An unknown setting is an error too.

If one tunnel can't open, the command prints its name and the error and keeps the others. With proximamp up --wait-sign-in the command doesn't exit when nobody is signed in but waits for a sign-in, and a tunnel ProximaMP refused (for example, when the account already holds as many addresses as the plan allows) is tried again by itself, first after 10 seconds, then less and less often, up to every 5 minutes.

Check​

Stop the command and run it again: every tunnel has the same address as last time.