firebase / firebase/firebase-tools-ui
Ability to configure the web socket port
- Dominant language
- TypeScript
- Stars
- 291
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
I'm running the firebase local emulator suite within a docker container so need to expose the ports I map to the services.
The only port I don't seem to be able to configure is that of the web socket request `ws://redacted:44181/requests`.

The port appears to be random so every time I spin up the container I'm presented with a new port.
I can see a request is made to `http://redacted/api/config` which returns:
Request Response
```json
{
"projectId": "redacted-project-id",
"hub": {
"name": "hub",
"host": "0.0.0.0",
"port": 5008
},
"ui": {
"name": "ui",
"host": "0.0.0.0",
"port": 5000,
"pid": 94
},
"logging": {
"name": "logging",
"host": "0.0.0.0",
"port": 5009
},
"firestore": {
"name": "firestore",
"host": "0.0.0.0",
"port": 5004,
"pid": 33,
"webSocketHost": "0.0.0.0",
"webSocketPort": 44181
},
"pubsub": {
"name": "pubsub",
"host": "0.0.0.0",
"port": 5007,
"pid": 63
}
}
```
From that I can see a `webSocketPort` property which I tried adding in the `firebase.json` as you can see below but the port is still random.
firebase.json
```json
{
"firestore": {
"rules": "firestore.rules"
},
"emulators": {
"ui": {
"enabled": true,
"host": "0.0.0.0",
"port": 5000
},
"firestore": {
"host": "0.0.0.0",
"port": 5004,
"webSocketHost": "0.0.0.0",
"webSocketPort": 5010
},
"pubsub": {
"host": "0.0.0.0",
"port": 5007
},
"hub": {
"host": "0.0.0.0",
"port": 5008
},
"logging": {
"host": "0.0.0.0",
"port": 5009
}
}
}
```
Is there any way to configure this?
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.