4

I see there are web-gateways to enable early access to swarm hosted content.

I read they are more down then running, I am wondering, can I also run a swarm gateway? If so, how?

Is it just a modified geth as swarm node I have to run? Is there anything else I need for serving the content to a webserver, e.g., nginx?

2 Answers 2

4

The reddit post you link to is rather old. Why don't you try http://swarm-gateways.net now? We have a brand new cluster backing the gateway.

It is true that it has been down a lot in the past, but that is because swarm is under heavy development. It will only get more stable with time.

To run your own swarm node, simply follow the swarm guide: https://swarm-guide.readthedocs.io/en/latest/ This will give your own private window into the swarm at localhost:8500 If you want to run a public gateway, just run an nginx reverse proxy for localhost:8500 :)

server {
    server_name my-swarm-gateways.net ;
    listen 80 ;
    location / {
       proxy_pass http://localhost:8500;
    }
}
3
  • At present, the only active gateway I've found is swarm-gateways.net. I'm really excited about Swarm, but I think more gateways or at least stable ones are necessary if developers are to build upon it until the technology has become more mainstream. I imagine that will take a long time. Is there a long-term plan for swarm-gateways.net or is it just a tech testing ground?
    – user11495
    Nov 28, 2017 at 16:19
  • This will run the node as a private network correct? How can I connect my node to the public gateway so that when I put files into my node it becomes generally available through the gateways? Dec 6, 2018 at 2:34
  • 1
    no. if you run swarm locally, you will automatically connect to the public network unless you explicitly override the default options.
    – cobordism
    Dec 6, 2018 at 9:50
1

To add to @cobordism's answer, it is worth remembering that the default nginx configuration for the largest client file is 1 MB only, so one might want to change this by changing the config file to something like this:

server {
    server_name my-swarm-gateways.net ;
    listen 80 ;
    client_max_body_size 512m;
    location / {
       proxy_pass http://localhost:8500;
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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