Dfx nns install port 8080

Why is it a must to use port 8080 for dfx nns install and/or how can I change it?

❯ dfx nns install
Using project-specific network ‘local’ defined in /Users/daviddalbusco/projects/lab/emulator-nns/dfx.json
WARN: Project-specific networks are deprecated and will be removed after February 2023.
Found local replica running on port 63135
Checking out the environment…
Error: Failed to install NNS components.

Caused by:
0: Failed to get a valid provider for network ‘local’. Please check networks.json and dfx.json.
1: dfx nns install supports only port 8080, not http://127.0.0.1:8000/. Please set the ‘local’ network’s provider to ‘127.0.0.1:8080’.
Error: Extension exited with non-zero status code ‘1’.

1 Like

The constraint was part of a hacky starting point and hasn’t been removed. You can probably easily change it here

I don’t understand what you mean, how can I change it?

With a PR. I just assumed that that would be ‘easy’ for you :wink: I’ve asked around in the past and nobody really had a reason against lifting the restriction

Providing a PR is not on the agenda. Thanks for the feedback.

By the way, it’s probably more work than removing the limitation. The dapps (NNS dapp) that get installed through this dfx command should probably also inherit the port. I guess that’s why the limitation was introduced in the first place. Now I understand it better by reading the comment you pointed.

Anyway, I’m going to continue development while switching between ports. I probably won’t have to switch and use “dfx stop/start” too often.