1:1 Port Mapping
Last updated
Was this helpful?
Last updated
Was this helpful?
This option is helpful for legacy game servers or games that doesn't support NAT punching, which means that your game probably needs the same port for the external and internal ones.
By using 1:1 port mapping, every time you deploy your application, your container will be assigned a random port. This port will be used for the internal and external ports. You will need to retrieve this port to specify to your server that it's listening and serving on it.
When creating ports in the application version form, there will be an option to activate 1:1 port mapping. It will automatically input 0 as a port, and you will not be able to modify it. You must use the checkbox. You cannot manually input 0.
When using 1:1 port mapping, the port name becomes mandatory. The name will be used to easily retrieve your port later in the deployment details.
1:1 ports can be duplicated since a unique random port will be assigned.
To create a 1:1 port with the API, you only need to put 0 as the port value.
When using 1:1 port mapping, the port name becomes mandatory. The name will be used to easily retrieve your port later in the deployment details.
1:1 ports can be duplicated since a unique random port will be assigned.
Since this option will assign a unique random port, you will need a way to get the given port.
Your deployment will have injected environment variables ARBITRIUM_PORTS_MAPPING
and ARBITRIUM_PUBLIC_IP
. Port mapping is a JSON string with this format:
You can also make an API call inside your container using the ARBITRIUM_CONTEXT_URL
. It will give you all the details for your deployment. You will also need to activate the inject context
option in your application version.
You can use a mix of 1:1 and standard non-dynamic ports.
If you are using the port verification option, you should ensure that your server tries to assign its internal port as soon as possible. If your server is doing a long operation before getting its ports up, the verification may fail due to a port not responding.
If doing a long operation is inevitable, please contact us so we can increase the maximum time to do the port verification for your application.