ipfs-webui
ipfs-webui copied to clipboard
Preview link broken if using non default port
- OS: macOS 10.15.6
- Version of IPFS Desktop: 0.13.2
Describe the bug
If IPFS Desktop is not using the default port (8080) the link to preview it still uses 8080, which is incorrect. I'm running another service that's holding port 8080 (nginx) so IPFS will use 8081 instead. I see "Gateway": "/ip4/127.0.0.1/tcp/8081",
in my config file. When i click the link below it opens http://localhost:8080/ipfs/<cid>
which is actually routed to nginx and I get a 404. If I manually change the port in the url to 8081 things work correctly.

To Reproduce Steps to reproduce the behavior:
- Change the Gateway port in
~/.ipfs/config
to 8081 ("Gateway": "/ip4/127.0.0.1/tcp/8081",
) - Restart IPFS Desktop
- Try to open a pinned file, or any file via the localhost gateway api
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
combined.log (error log empty)
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
- "Priority" labels will show how urgent this is for the team.
- "Status" labels will show if this is ready to be worked on, blocked, or in progress.
- "Need" labels will indicate if additional input or analysis is required.
Finally, remember to use https://discuss.ipfs.io if you just need general support.
Thanks - we will look deeper in our next weekly triage.
I suspect we read port from config during HTTP API client initialization, and we never update it again.
@msfeldstein can you confirm the issue goes away if you fully Quit via menubar and start IPFS Desktop again?
No it still persists. The steps i just took were
- Close IPFS desktop via menubar icon -> quit
- Start up a webserver to hog port 8080
PORT=8080 yarn start
in a create-react-app app - Launch IPFS Desktop
- It asks if i want to use 8081 instead, and i say yes
- Open my pinned files and open one, i still get port 8080
- Close IPFS desktop via menubar icon -> quit
- Launch IPFS Desktop
- There is no dialog about which port to use
- I still see the same problem where it launches urls with port 8080
On Mon, Jan 4, 2021 at 8:50 AM Marcin Rataj [email protected] wrote:
I suspect we read port from config during HTTP API client initialization, and we never update it again.
@msfeldstein https://github.com/msfeldstein can you confirm the issue goes away if you fully Quit via menubar and start IPFS Desktop again?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ipfs-shipyard/ipfs-desktop/issues/1726#issuecomment-754087866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABHK3YLJDAI5LWXI6DMSZDSYHWXFANCNFSM4VPZ6EZQ .
Just to confirm, I've seen the same behavior @msfeldstein describes above - specifically the same annoyance in doing some sort of webdev work in an application that defaults to port 8080.
Note from triage: purging cache of local gateway port when changing/saving config is likely to solve this.
@lidel It is better to support set port of public gateway! With v2.13.0
The public gateway can be set, but the port cannot be set.
Submit https://ipfs.lilu.red:444
, check url is https://ipfs.lilu.red/ipfs/bafybeibwzifw52ttrkqlikfzext5akxu7lz4xiwjgwzmqcpdzmp3n5vnbe?now=1632573744950&filename=1x1.png
, code not set port
In China, personal cannot use ports 80, 8080, and 443. The network service provider closed these ports. The important feature of IPFS is decentralization, so that everyone can enjoy the network equally. This restriction prevents the possibility of individuals providing gateways.
I was unable to reproduce this using the webui provided by Kubo:
WebUI: http://127.0.0.1:5002/webui
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8081
Nor with ipfs-desktop.
Is this still an issue @msfeldstein ?
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.
This issue was closed because it is missing author input.