Letsencrypt-renew command not found

When I go to cd /etc/letsencrypt/
letsencrypt-renew
letsencrypt-renew: command not found

or

letsencrypt-auto
letsencrypt-auto: command not found

Using Nginx on DigitalOcean

How did you install letsencrypt / certbot ? All that error is saying is that it can’t find the command … so it’s wherever you installed it :wink:

Not sure, I had a dev. & this is all very new to me.

I did a search w/ /find -name letsencrypt

/home/dev/.local/share/letsencrypt
/home/dev/.local/share/letsencrypt/bin/letsencrypt
/home/dev/.local/share/letsencrypt/lib/python2.7/site-packages/letsencrypt

Trying to figure out where to put that command in

It depends what your PATH statement is as well.

From the info you provided above you should be able to run;

/home/dev/.local/share/letsencrypt/bin/letsencrypt renew

That has gotten me a step further, it now says:

Access denied writing to /var/log/letsencrypt/letsencrypt.log. To run as non-root, set --logs-dir, --config-dir, --work-dir to writable paths.

You probably ran it as root before anyway ... so try;

sudo /home/dev/.local/share/letsencrypt/bin/letsencrypt renew

I think this worked!

Congratulations, all renewals succeeded. The following certs have been renewed …

Is there anything else I need to do? My old certificates will update when the current ones expire?

Thanks serverco

You will probably need to restart nginx (so it uses the new certs). I assume it’s pointing to the /etc/letsencrypt/live location of the certs.

Then I’d check in your browser if it’s using the new certs ( check the dates )

Other than that, you should be OK. Personally I’d set up a cron job to do this automatically - but that’s up to you.

I restarted nginx, but I don’t see the new dates, any clue on this?

I’m not familiar w/ this at all so I’m not sure where to start on cron job either …

I’d start by checking your nginx config files - and see where they reference the SSL certificate files.

If they are not the ones in /etc/letsencrypt/live/domain… I’d probably edit the file to point to there. I don’t know if you have a control panel or anything like that though ( there is a template of normal questions / background info for help - if you post in the help forum which asks for this info :wink: )

How do I check nginx config files? & what am I checking this for? Do I have to restart nginx from another folder or … ?

Your nginx config files are just text files, and will contain something like;

ssl_certificate /path/to/signed_cert_plus_intermediates;
ssl_certificate_key /path/to/private_key;

So it's whatever those paths are. How did you install the certs in the first place ?

I don’t know, my dev. did it.

btw I did:

sudo service nginx restart

To restart the server.

Then you should really talk to your dev - rather than us trying to second guess, when you haven't told us anything about your setup.

Can you find your nginx config files ?

Yes I know, my dev isn’t responding … I can tell you w/e you need to know. How do I find my nginx config files?

The best way is to fill out the help form …


Please fill out the fields below so we can help you better.

My domain is:

I ran this command:

It produced this output:

My operating system is (include version):

My web server is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):


Typically the config would be in the /etc/nginx folder but I have no idea what you operating system is ( hence the usefulness of the standard questions

Yes, its in /etc/

I found the nginx folder & it has:
conf.d fastcgi_params koi-win nginx.conf proxy_params sites-available snippets win-utf
fastcgi.conf koi-utf mime.types passenger.conf scgi_params sites-enabled uwsgi_params

OK - can you manage to answer all the previous questions ?

The key ones to me are;

My domain is:

My operating system is (include version):

My web server is (include version):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

mkultra.ws

I used sudo service nginx restart
It restarted as it always does but I didn’t see the date on change on the certificates
My host is DigitalOcean with ubuntu-512mb-sf01-01
I login via SecureShell in Chrome
No Control Panel

OK - so the certificate that's using is valid from today until the 18th Feb

You don't need to make any more changes.