-
Notifications
You must be signed in to change notification settings - Fork 93
Documentation does not provide an SSL-friendly setup. #238
Comments
@jjperezaguinaga thanks very much for such a detailed setup. I totally agree that we should make this more clear. Would you like to make a PR for this repo with this? I would like to have a Markdown file with these instructions, and a mention to it in the main README |
@vasco-santos Happy to do so! I also think it would be useful to highlight the instructions for “deploy your own node” or even add something like a “Deploy Server” to GCP or AWS so users can also use their own infra instead of just expecting the nodes from |
@vasco-santos @jacobheun Quick update here. I've created a Terraform module which automates the deployment of a For this ticket in particular, perhaps it could be useful to provide an “annex” like “Deployment on SSL using Cloudflare & GCP”. Instead of using Terraform, the average user could use Google's Cloud SDK CLI
The generated output will produce an Now we have a signaling server behind SSL which can be used in online applications and/or behind https. Let me know if this makes sense to you, and I can create a PR with the aforementioned annex. |
Hey @jjperezaguinaga Sorry for the delay, but I wanted to look at this properly first. First of all, this is super nice and will potentially be important for some users. My biggest concern is the introduction of a lot of concepts/tools that users might not be familiar with, like Terraform, GCP, among others. What do you think? |
FYI: my goal is to get this documentation into this repo and link it from this larger docs for all libp2p infra libp2p/js-libp2p#718 |
Hey @vasco-santos, no worries! We appreciate any input you guys can share. We have our own setup and are working on stuff other devs can use in https://github.com/hoprnet/hopr-devops, where we are mounting our app (which uses I actually agree with your iterative setup, I already see some work in libp2p/js-libp2p#718, so can add some annexe there. As I've done the As a side note, have you successfully deployed bootstrap nodes as Docker images in cloud servers that can successfully dial other nodes using the DHT? I'm facing a bunch of |
@jjperezaguinaga can you check your dependencies for |
@jacobheun Thanks! Saw that in one of the issues in the lib, but we have yet to test it. What worked for us was moving away from @vasco-santos Let me see if I can add something to libp2p/js-libp2p#718 under |
Yes, this can also be super nice for libp2p users. I think there is space for it in the iterative approach.
My goal is to have the production document for
Yes please ❤️ |
@vasco-santos Testing the water in libp2p/js-libp2p#722. For the SSL setup, IMHO we could leverage on @solderjs‘s greenlock.domains to quickly generate the SSL certs when adding a |
The |
Perfect, let's go for the |
Referencing libp2p#238 (comment).
Seems to have already been completed in #274, thanks! |
When following
0.27.x
libp2p in the browser example, the README describes how to run a signalling server and even points you to this repository (i.e. js-libp2p-webrtc-star). If you run the server (e.g.docker run -p 9090:9090 libp2p/js-libp2p-webrtc-star
) and then connect locally (e.g.http://localhost:1234
fromparcel index.html
), you can see the application up and running. All good so far!However, whenever you are trying to run the demo behind SSL (e.g. using an online service like Glitch.com or via remote desktop), you will be presented with an SSL error similar to the following one:
You can also find the same error if you run
parcel index.html --https
instead, which is closer to a production setup. In addition, if you try to connect via the browser using a non-localhttp
application, you'll see something like this:This can be avoided by providing some instructions to users on how to setup an SSL reverse proxy. For instance, locally one can setup
nginx/proxy
with adocker-compose.yml
file as follows:Where
nginx/certs
with the following commands:The
nginx/certs
would look something like this:After running

docker-compose up
users would see something like the following:which can then be used as the actual server.
A similar setup can be achieved on a live server. Either way, it would be ideal if these instructions could be described in your README so beginners could connect easily and check the capabilities of
libp2p
in the browser. If you think this would be useful, I can happily send a PR with the instructions for the README in addition on how to achieve this on production using something like LE on GCP.The text was updated successfully, but these errors were encountered: