-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Let's Encrypt integration #54
Comments
Hi @madushan1000, what do you think about this approach? |
The proposal looks good, Let's encrypt apache/Nginx modules seems to be able to do the certificate renewal without stopping/disturbing the server (I haven't tested it though). If we can use Nginx module it's better. But it's still in alpha AFAIK(again I haven't tested how well it works). In the PR you mentioned, I can see that auto renewal is not yet working. If we can make this work with webroot, or the Nginx module(when it's production ready) with auto renewal It's great. |
Yes, I was a bit in a rush when I did the PRs, so the API was not really thought through. Therefore I am kind of glad I confused the project, cause we can implement it well. I though about using the Nginx plugin, but I didn't want to introduce a non stable dependency. However, it is worth checking in out (I didn't) to see how stable the Nginx plugin is. |
Hello, Any news about that feature? |
@tomasz-nolberczak Hi, we were waiting on nginx let's encrypt module to become stable. @carlosbaraza was using the webroot method to get the certificate as I can recall. Since the nginx module seems to be taking more time, We can start working on a We can't use standalone method because the productions server must have to be stopped for each certificate renewal. and even getting the webroot method working would be somewhat hackish. We would have to use some kind of a virtual host (I don't know it it's the right term in the context of nginx) to inject the challenge response on our server while it's running. @carlosbaraza any thoughts on how to do that? |
@madushan1000, indeed we have to add a location to the nginx config for the challenge. I already did it in the PR meteorhacks/mup-frontend-server#10. Here how to use the container: https://github.com/arunoda/meteor-up/pull/873/files#diff-2f09fabea34b444982cf909f840205b1R51 Unfortunately, I will not have more time to invest on this feature in the following two months, as I am 100% booked for other things. |
Hopefully that is helpful and can give some light about how to set that up in nginx. |
@madushan1000 anything I can do to help push this forward? I don't know where to start, but it'd be nice to get this in eventually. |
We are currently working on this #72, As soon as it finishes this can be continued, follow the changes on @carlosbaraza pull on old mup repo, it should give some insight. |
Work on pull #72 is over. Anyone interested can start working on this. |
Big +1 on this, would love to have it. Will do manual generation for now, and then again in 60 days, etc. This would be a killer feature! Just wish CloudFlare would enable websockets on Free/Pro plans, then this would be moot... could just CF's free SSL. Ah well! +1! |
+1 |
@dkmooers how are you doing manual generation? With |
Yep, exactly. Followed these instructions: https://nickpolet.com/blog/using-letsencrypt-with-meteor-up/P82p2SNZSSfc4mGvT (which site ironically has an expired cert!)
Except with fullchain.pem and privkey.pem instead of concatenating them to a single ssl.pem b/c I'm using mupx at the moment. Ran this on my deployment server after pointing my DNS to it, so letsencrypt could verify ownership of the domain. |
@dkmooers I followed those instructions too. But for me it doesn't work. Just running How did you get it working? *edit: Never mind. First I configured wrong certificates. And mupx didn't manage to override them with the new ones. So I just rebuilt my droplet and started from scratch. That worked! |
@vuhrmeister Ah got it, well glad you got it figured out! |
+1 |
Galaxy just added auto SSL: @madushan1000: Following your post: Did kadira stop development on this? |
@Obiwarn We haven't started working on this yet. I'd love to see some community support on this though :) |
+1 |
As an interim solution until the code supports it directly, couldn't we just use the |
It actually looks like it uses external files for the certs. I haven't tested it yet, but I think maybe I'll try to simply soft-link them to the Let's Encrypt cert files. This way I can have the certbot client running in a cron, and it should update the certs with no manual work from me. |
So, it seems that linking from the installed folder to the lets encrypt folder works just fine. Here are the steps I took:
So far this seems to work. The certs are supposed to only last 90 days, so we will see in time if the auto cert renewal works without issues, or if I will have to somehow schedule a restart of the services when the cert is renewed. |
Hi, any news on this? :) |
Does anyone know the status of this? It would be nice to simply have a property set in the build file to trigger Let's Encrypt support. |
Would still love to have support for this. I'm on manual renew at the moment and would be super convenient to have this all happen automatically! |
+1 |
@madushan1000 we should try to get this or something similar to mup. |
+1, could the fork be integrated in kadira's and arunoda's mup? |
This thing is working perfectly and I see talks about a merge, but it does not seem to happen? |
I am trying to get this to work with the letsencrypt-nginx-proxy, but not having much luck. My fork can be found here if anyone wants help. I think the problem is in how the Meteor docker container is being port-mapped to the nginx proxy, but I am not sure. |
I updated the last I have working. Most of the docker containers are starting now, all except the nginx one. That one is throwing the following error in it's docker logs:
I think the issue now is that the meteor image is exposing port 80, and it's conflicting with the nginx port 80. I need to see if I can customize the meteor docker image to change the startup port back to 3000. |
Latest update: After LOTS of frustration with the Let's Encrypt docker project, I finally got something working. The latest checkin in my fork branch is running on my test Meteor server, but I would LOVE to get some others to see what I have done and make improvements. What I have done feels very hack-ish at the moment, and I feel that it may not be "complete" in all the required changes. There is definitely more work to be done, but it does work. The premise on how this all works: Once we get the code cleaned up I can submit a PR to the main project to get those changes pulled in. |
@madushan1000 @arunoda hey lovely folks, any news about this? :-) |
@lfilho I would welcome your input on the branch I reference above. It is working locally for me but would love others to give some feedback. |
@mbabauer how could I test it? I mean, I already have my app in production and I don't have any extra droplets to test it... Thanks. Appreciate your efforts and contribution towards this 🙂 👍 |
@carlosbaraza would you please consider opening a pull request in this repository? I do not see one referenced in the discussion. |
@mbabauer any status update on opening a PR with your changes? Some of the improvements could be made during the PR review process. That way, we could see the changes and work in progress. |
The PR has been merged. |
Hey People, I assume that Lets Encrypt is now usable with Zodern-Meteor up. Is there link anywhere how to set it up? |
Yesterday I did a quick integration of Let's Encrypt in the deprecated MeteorUp repository. These are the pull requests: #873 and meteorhacks/mup-frontend-server#10
CLI
I would like to do this in a better way within this repo. After having a look to the architecture of this new MeteorUp, I thought that could be nice to create another module called
tls
orssl
, so we could use the following commands in the CLI:mup tls status
: Give current status of the certificate, expiration, register, etc.mup tls renew
: Renew the certificate.Config
To configure Let's Encrypt generator, I was thinking about the following
mup.js
API:In order to use the renew, it should be needed to include the
autogenerate
option in themup.js
file.Frontend server generating certificates
The way I would like to approach the generation is using the Let's Encrypt plugins
webroot
andstandalone
. Both behaviours could be included in themeteorhacks/mup-frontend-server
container, as Let's Encrypt needs to expose a challenge file using a webserver that will be fetched by the certificate authority using the given domains as URL base. If the file is correctly fetched by them using the domains, the certificate is validated.The usage I was thinking is mounting a volume to the container including the certificates.
autogenerate
is set up: Container should run a cron job every week to check if the certificate will expire soon and renew the certificate, persisting it through the volume. This will use thewebroot
plugin, to avoid having downtime for the generation of the certificate.autogenerate
is set up: The container should generate a new certificate using thestandalone
plugin, as nginx can not boot up without the certificate (Another option is having twonginx.conf
files). Once the certificate is generated, nginx would boot normally.Impressions and improvements
If you have any suggestion to improve this implementation, let me know and we can work on it.
The text was updated successfully, but these errors were encountered: