-
Notifications
You must be signed in to change notification settings - Fork 0
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
Thoughts about Nginx, certbot, and processes #17
Comments
Before this issue I was thinking of a different solution, but scoping the need for sudo only to those commands (which can then be added to the install tutorial as "copy this line into visudo, it will do X Y Z"), and running certbot/acme-python in-process, does make things a lot easier from the user-installation and management side, and allows pulling more statistics/data about certificate expiry, and renewal errors. I like this, I think i'll take this option for v1, since it makes things relatively self-contained. One other thought is that I'd have users run essy under One other thing, the current configuration will basically have every website pull from the same webroot, shouldnt it be this? root {{webroot}}/$host; |
My idea was that essy puts in something like So site 1 lives in Site 2 then lives in |
That might not work, though i'm not sure. Oh, and on systems with selinux/apparmor, it would be pain to configure without turning them off, which should be avoided imho |
I don't want to have essy run as root, its both a security risk and an ask of trust for the user, so the visudo approach is better imo, and relatively simple ^^ Also; do join the Zulip via the link i gave you, so we can talk about this more. I don't know exactly your vision for the webroot, but i guess i'd have to tell you my idea first, since i dont see how it fits with what you're telling me. |
I did some thinking, and thought I'd document that here.
Some definitions to prevent confusion:
General stuff
As the webserver I'd use nginx.
For generating TLS certs, i'd use certbot with the webroot plugin.
For reloading the webserver configuration, i'd use sudo.
Sudo allows you to restrict what an account can do, so i'd allow essy
to exclusively issue reload commands to nginx, and not allow anything
else.
Example:
For nginx, i'd template configuration with jinja.
The main nginx config defines a folder thats writable by essy.
Essy templates its nginx config snippets into that folder, and triggers a nginx reload.
The Nginx configuration for a site should be secure by default.
For certbot, i'd run it as a subprocess.
Alternative: Look into using acme-python.
Advantage: No external dependency on certbot
Disadvantage: More complicated
Need to handle renewals ourselves
Certbot should be set up to automatically renew all certs on the machine.
Certbot should reload nginx automatically upon renewal.
Certbot is used with the
webroot
plugin.Certbot puts its challenge files into a folder outside of the users
webroot, nginx is configured to server
.well-known/acme-challenge
from this path.
Adding a new Site
Removing a site
Configuration templates
HTTP only nginx config
HTTPS nginx config
The text was updated successfully, but these errors were encountered: