# ICE\_SERVERS configuration issue on OpenVidu CE 2.29

**URL:** <https://openvidu.discourse.group/t/ice-servers-configuration-issue-on-openvidu-ce-2-29/5098>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [May 29, 2024, 9:26am UTC](https://openvidu.discourse.group/t/ice-servers-configuration-issue-on-openvidu-ce-2-29/5098 "2024-05-29T09:26:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felix](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/felix/32/2445_2.png) [@Felix](https://openvidu.discourse.group/u/Felix)\
**Post date:** [May 29, 2024, 9:26am UTC](https://openvidu.discourse.group/t/ice-servers-configuration-issue-on-openvidu-ce-2-29/5098/1 "2024-05-29T09:26:22Z")

</div>

The WEBRTC ICE SERVERS can be configured in .env as below.  
OPENVIDU\_WEBRTC\_ICE\_SERVERS=[“url= **turns** :example.turn.com:443,staticAuthSecret=secret”]  
But I found we only can use **turn** :example.turn.com:443 not **turns**.

I also checked the source code as below, it seems the code only check turn and stun.

```auto
		public IceServerProperties build() throws IllegalArgumentException {
			if (this.ignoreEmptyUrl) {
				if (this.staticAuthSecret != null && this.username == null && this.credential == null) {
					try {
						this.generateTURNCredentials();
						return new IceServerProperties(this.url, this.username, this.credential);
					} catch (NoSuchAlgorithmException | InvalidKeyException e) {
						throw new IllegalArgumentException("Error while generating credentials: " + e.getMessage());
					}
				} else {
					throw new IllegalArgumentException(
							"ignoreEmptyUrl=true can only be used with staticAuthSecret defined");
				}
			}
			if (this.url == null) {
				throw new IllegalArgumentException("External turn url cannot be null");
			}
			this.checkValidStunTurn(this.url);
			if (this.url.startsWith("turn")) {
				if (this.staticAuthSecret != null) {
					if (this.username != null || this.credential != null) {
						throw new IllegalArgumentException(
								"You can't define username or credential if staticAuthSecret is defined");
					}
					try {
						this.generateTURNCredentials();
					} catch (NoSuchAlgorithmException | InvalidKeyException e) {
						throw new IllegalArgumentException("Error while generating credentials: " + e.getMessage());
					}
				}
				if ((this.username == null || this.credential == null)) {
					throw new IllegalArgumentException("Credentials must be defined while using turn");
				}
			} else if (this.url.startsWith("stun")) {
				if (this.username != null || this.credential != null) {
					// Credentials can not be defined using stun
					throw new IllegalArgumentException("Credentials can not be defined while using stun.");
				}
			}
			return new IceServerProperties(this.url, this.username, this.credential);
		}

```

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [May 29, 2024, 11:07am UTC](https://openvidu.discourse.group/t/ice-servers-configuration-issue-on-openvidu-ce-2-29/5098/2 "2024-05-29T11:07:52Z")

</div>

turns and stuns are both accepted. `String#startsWith` cover `turn` and `turns` if you use `turn` as parameter. And you can see here as well both are accepted: [openvidu/openvidu-java-client/src/main/java/io/openvidu/java/client/IceServerProperties.java at master · OpenVidu/openvidu · GitHub](https://github.com/OpenVidu/openvidu/blob/master/openvidu-java-client/src/main/java/io/openvidu/java/client/IceServerProperties.java#L236-L237)

---

<div class="post-metadata">

**Author:** ![Felix](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/felix/32/2445_2.png) [@Felix](https://openvidu.discourse.group/u/Felix)\
**Post date:** [May 30, 2024, 3:03am UTC](https://openvidu.discourse.group/t/ice-servers-configuration-issue-on-openvidu-ce-2-29/5098/3 "2024-05-30T03:03:40Z")

</div>

Understood, thanks a lot.
