Skip to content
This repository has been archived by the owner. It is now read-only.

Running IPFS in a VM with WebUI #55

Closed
taigrr opened this issue Mar 30, 2017 · 6 comments

Comments

Projects
None yet
5 participants
@taigrr
Copy link

commented Mar 30, 2017

I'm running Arch inside a VM, with IPFS installed. Everything works well inside the VM, but I cannot access the WebUI from the Host system.

I forward, for example, port 5544 on localhost on the Host to 22 on the Guest, in order to SSH in.
(I have a Windows 10 Host.)

When I add a forwarding rule across port 5001, my Host browser returns "ERR_SOCKET_NOT_CONNECTED."

I've searched for this myself first of course, but I'm not exactly sure where to look.

Any ideas? Do I need to forward another port for some reason? (I wouldn't think so.)

I'd think that there's a config issue somewhere.

@lidel

This comment has been minimized.

Copy link
Member

commented Mar 31, 2017

I am not sure what are the defaults of your network topology, but perhaps go-ipfs daemon is listening on localhost only?
It needs to listen on all interfaces, so that forwarding between Host and Guest works.

You can check configuration via:

$ ipfs config Addresses
{
  "API": "/ip4/0.0.0.0/tcp/5001",
  "Gateway": "/ip4/0.0.0.0/tcp/8080",
  "Swarm": [
    "/ip4/0.0.0.0/tcp/4001",
    "/ip6/::/tcp/4001"
  ]
}

If you see something other than 0.0.0.0 (which means listening on all interfaces), set it like this:

ipfs config Addresses.API "/ip4/0.0.0.0/tcp/5001"
@taigrr

This comment has been minimized.

Copy link
Author

commented Mar 31, 2017

$ ipfs config Addresses
{
  "API": "/ip4/127.0.0.1/tcp/5001",
  "Gateway": "/ip4/0.0.0.0/tcp/8080",
  "Swarm": [
    "/ip4/0.0.0.0/tcp/4001",
    "/ip6/::/tcp/4001"
  ]
}

That is the default I see. After running your command, I can now pull up the main page, but the Earth looks empty, and none of the requests to peers seem to go through, they all time out (1024 requests are rapidly sent, but none are retrieved)

@Vertux

This comment has been minimized.

Copy link

commented Apr 18, 2017

@taigrr
You do not have to change the default configuration, if you access the remote machine via ssh.
Log into the remote machine like that:

ssh @remote-ip -L 5001:localhost:5001 -L 4001:localhost:4001 -L 8080:localhost:8080

Now you can use the WebUI with your local browser as normal.

@flyingzumwalt

This comment has been minimized.

Copy link
Contributor

commented May 23, 2017

@jackxujh

This comment has been minimized.

Copy link

commented Dec 4, 2018

@Vertux Hi, thanks for this amazing approach! However, I still get the 404 page not found error. Is this because some error in my IPFS configuration?

@jackxujh

This comment has been minimized.

Copy link

commented Dec 4, 2018

I just figured it out. 🤣 I typed http://localhost:5001 instead of http://localhost:5001/webui/.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.