Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advise Lotus node engineers/users put lotus behind an NGINX server. #239

Open
laudiacay opened this issue Oct 27, 2021 · 4 comments
Open
Labels
dif/hard Having worked on the specific codebase is important effort/days Estimated to take multiple days, but less than a week kind/discussion need/author-input Needs input from the original author P2 Medium: Good to have, but can wait until someone steps up

Comments

@laudiacay
Copy link

filecoin-project/lotus#7573

This issue was opened on lotus asking for HTTPS support on the API- the real solution is that documentation should make it exceedingly clear that the lotus API needs to go through Nginx for some DoS protection, HTTPS, and various other security features/niceties of a real production webserver.

The python-Django tutorial has good examples of the type of frequent warnings of « do not open ports directly into this service in production » that we might want to add, that was the first thing that came to mind.

we probably also want a tutorial somewhere of what to put in the nginx conf.

@johnnymatthews
Copy link
Contributor

This is fair. Do you happen to have a link to the Python-Django tutorial you're referencing.

we probably also want a tutorial somewhere of what to put in the nginx conf.

This would be great. It'd have to come from the Lotus team initially. Is this something you've got experience with and/or could help out with?

@johnnymatthews johnnymatthews changed the title More fearmongering about proxying lotus API through nginx Advise Lotus node engineers/users put lotus behind an NGINX server. Nov 3, 2021
@johnnymatthews johnnymatthews added dif/hard Having worked on the specific codebase is important effort/days Estimated to take multiple days, but less than a week kind/discussion need/author-input Needs input from the original author P2 Medium: Good to have, but can wait until someone steps up labels Nov 3, 2021
@laudiacay
Copy link
Author

Here's the tutorial in question. Basically in every stage up until this, they're really aggressive about saying "don't open up your firewall to the wider internet until you complete this stage and use a real webserver!!" https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Deployment

@laudiacay
Copy link
Author

I think you could just do this- the example with the "local server" is relevant: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
you'd add it to a config that looks kinda like this for the rest of the server including hostname stuff: https://docs.nginx.com/nginx/admin-guide/web-server/app-gateway-uwsgi-django/
and this would add SSL: https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/

@laudiacay
Copy link
Author

also apparently we should put lotus-gateway in front of lotus before nginx

@johnnymatthews johnnymatthews transferred this issue from filecoin-project/filecoin-docs May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/hard Having worked on the specific codebase is important effort/days Estimated to take multiple days, but less than a week kind/discussion need/author-input Needs input from the original author P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

2 participants