I'm running this: swarm \ --bzzaccount $ACCOUNT \ --password .ethereum/.password \ --bzzapi "" \ --lightnode

And when I curl from localhost I get a response: $ curl http://localhost:8500 Code: 200 Message: Swarm: Please request a valid ENS or swarm hash with the appropriate bzz scheme Timestamp: Sat, 08 Dec 2018 01:31:05 UTC

But when I curl externally: $ curl http://otherhost:8500 curl: (7) Failed to connect to localhost port 8500: Connection refused

Running lsof reveals this about the port: $ lsof -i TCP | grep 8500 swarm 9 root 30u IPv4 140650 0t0 TCP localhost:8500 (LISTEN)

I'm pretty sure it should be instead of localhost but I'm not sure if that's really an issue.

I've confirmed other applications running on the host can expose ports and I can connect to them no problem. Its specifically swarm.

Can anyone give me an example of the commands they are running to get swarm to work right? My goal is to have this running inside a private network and have other machines in the network control and communicate with it so I don't need it to have protected ports.

EDIT: minimal, final form swarm \ --bzzaccount $ACCOUNT \ --password .ethereum/.password \ --httpaddr "" \ --lightnode

  • Hi justin,i noticed that you had been building a private ethereum blockchain and constructing a private swarm cluster(looks like you were doing all these stuff on AWS and Azure cloud?),may you write a blog about how to build a private swarm cluster and post it here please?(Now i'm doing the same thing as you did...But i dont know how to set up a private swarm cluster among multipile computers) – Sh4d0wBlade Mar 18 at 13:29
  • I ran into some blockers and haven't tried in a while so I'd need to learn it all again but if I remember correctly to make a cluster you're essentially just creating multiple independent nodes. You then have to have some kind of a controller and database which keeps track of the keys and state for each node. You won't be rapidly scaling horizontally either. You will likely need a queue to throttle requests to the apis as well. Also if you're trying to mine you won't be able to do it in the cloud easily, as their GPU machines are insanely expensive. – justin.m.chase Mar 24 at 19:28

Add –httpaddr in command line to specify network interface. –httpaddr "" should solve this.

  • And -bzzport to specify a different port, if you need. – lash Dec 8 '18 at 9:11
  • You know, I swear I tried this 100 times and it didn't work but... it works. So apparently I just needed you to answer this question first :D It may have been the quotes. – justin.m.chase Dec 8 '18 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.