How to set a custom port for WebRTC in Isaac Sim 2023.1.0

We are using the container version of Isaac Sim 2023.1.0 on a Linux machine to run multiple instances of the Isaac Sim simultaneously. When the default port for WebRTC is taken (e.g., when another container is using it), Isaac Sim chooses a random port. Is there a way to set this port manually somehow?

Currently, we recommend running only one instance of Isaac Sim per VM for optimal performance but there are a few methods to run multiple instances.

You can change the http server port in the omni.isaac.sim.base.kit file. Look for:

exts.“omni.services.transport.server.http”.port = 8211

The other communications ports might remain the same and could be conflicting.

The next method is to run each container with it’s own subnet and static IP addresses. You could also remap the ports with this method.

Thanks @Sheikh_Dawood

I can now change the part by providing a custom port as an argument whole running webrtc indeed. However, we need to run multiple containers on the same PC and I noticed that two instances of Isaac Sim containers cannot stream using webrtc at the same time as I get errors (Stream Server: starting the server failed, 0x800B1002). I guess this is related to the other ports you said could be conflicting.

Do you know which ports could be conflicting and how I can change them as well? Could this issue be related to the webrtc clients using the same default user ([kiosk]) ?

Yes. There are some hard coded ports for the stream server to use.
We recommend to run only one instance of Isaac Sim when using the --network=host flag.

For multiple instances, please do not use that flag and split the containers into it’s own subnet/IP addresses.

When I split the containers into their own subnet/IP addresses, am I not preventing other features, such as connecting to the local Nucleus server?

Connecting to a Nucleus should still work. Instead of being local, the Nucleus will be seen as remote with a different IP address. For this scenario, Use the same subnet as the local machine but different IP addresses.

You may need to enable sharing on the Nucleus. See https://docs.omniverse.nvidia.com/nucleus/latest/workstation/usage.html?highlight=sharing#nucleus-service-sharing.

For using WebRTC from a container that has own subnet/IP addresses, I used the following commands:

To create a network:

docker network create --driver bridge --subnet=$subnet --gateway=$gateway $network_name

To start the container (without the --network=host flag):

docker run --name $container_name --entrypoint bash -it --gpus all -e "ACCEPT_EULA=Y" --rm --network=$network_name --ip=$container_ip -p $host_port:8211 $orbit_image_name

However, even when I use a single container, I do not see the stream starting on $host_port. I can see the play button, but nothing happens when I click on it.

Are there some other ports I need to map to make WebRTC work?

Hi. The other ports are listed here but I am not able to get it to work remotely.

Here’s my steps to get two containers running:

docker network create --subnet=172.18.0.0/16 isaac

docker run --name isaac-sim-1 --entrypoint ./runheadless.webrtc.sh -it --gpus all -e "ACCEPT_EULA=Y" --rm --net isaac -h isaac1 --ip 172.18.0.10 -p 81:8211 \
    -e "PRIVACY_CONSENT=Y" \
    -v ~/docker/isaac-sim-1/cache/kit:/isaac-sim/kit/cache:rw \
    -v ~/docker/isaac-sim-1/cache/ov:/root/.cache/ov:rw \
    -v ~/docker/isaac-sim-1/cache/pip:/root/.cache/pip:rw \
    -v ~/docker/isaac-sim-1/cache/glcache:/root/.cache/nvidia/GLCache:rw \
    -v ~/docker/isaac-sim-1/cache/computecache:/root/.nv/ComputeCache:rw \
    -v ~/docker/isaac-sim-1/logs:/root/.nvidia-omniverse/logs:rw \
    -v ~/docker/isaac-sim-1/data:/root/.local/share/ov/data:rw \
    -v ~/docker/isaac-sim-1/documents:/root/Documents:rw \
    nvcr.io/nvidia/isaac-sim:2023.1.1

docker run --name isaac-sim-2 --entrypoint ./runheadless.webrtc.sh -it --gpus all -e "ACCEPT_EULA=Y" --rm --net isaac -h isaac2 --ip 172.18.0.20 \
    -e "PRIVACY_CONSENT=Y" \
    -v ~/docker/isaac-sim-2/cache/kit:/isaac-sim/kit/cache:rw \
    -v ~/docker/isaac-sim-2/cache/ov:/root/.cache/ov:rw \
    -v ~/docker/isaac-sim-2/cache/pip:/root/.cache/pip:rw \
    -v ~/docker/isaac-sim-2/cache/glcache:/root/.cache/nvidia/GLCache:rw \
    -v ~/docker/isaac-sim-2/cache/computecache:/root/.nv/ComputeCache:rw \
    -v ~/docker/isaac-sim-2/logs:/root/.nvidia-omniverse/logs:rw \
    -v ~/docker/isaac-sim-2/data:/root/.local/share/ov/data:rw \
    -v ~/docker/isaac-sim-2/documents:/root/Documents:rw \
    nvcr.io/nvidia/isaac-sim:2023.1.1


On Firefox, connect to http://172.18.0.10:8211/streaming/webrtc-client?server=172.18.0.10 and http://172.18.0.20:8211/streaming/webrtc-client?server=172.18.0.20

Thanks for the answer. I can confirm that I am able to stream from two containers at the same time, but only locally, as you have experienced.

I didn’t manage to make it work remotely; something does not work with port forwarding. Do you have an idea how to solve this?

I’m not sure. It should work remotely using the Streaming Client in livetream native mode. For WebRTC to work remotely, you may need custom STUN/TURN servers.