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

Not working anymore with Snap based Certbot installs #6

Open
tcaddy opened this issue Nov 19, 2021 · 14 comments
Open

Not working anymore with Snap based Certbot installs #6

tcaddy opened this issue Nov 19, 2021 · 14 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@tcaddy
Copy link

tcaddy commented Nov 19, 2021

I'm not sure how I was able to get this working before with Snap based installs of Certbot but I cannot get it work anymore to renew my certs. The snap based version of certbot was updated in the last 90 days and it doesn't see the certbot-dns-godaddy package anymore installed on the host system.

When I try to use the python embedded in the Snap install to pip install a package, it fails on install due to read-only filesystem.

/snap/certbot/current/bin/python3 -m pip install certbot-dns-godaddy
ERROR: Could not install packages due to an OSError: [Errno 30] Read-only file system: '/snap/certbot/current/lib/python3.8/site-packages/soupsieve'

Looks like the official certbot DNS plugins all got their own Snap packages: certbot/certbot#8096

I think we need a snap based install of this certbot DNS plugin.

For now, I'm doing a pip-based install of certbot based on these instructions: https://certbot.eff.org/instructions?ws=apache&os=pip

@miigotu
Copy link
Owner

miigotu commented Nov 19, 2021

I'll try to get this done soon

@miigotu
Copy link
Owner

miigotu commented Nov 19, 2021

@adferrand is there any way you could help with a PR? I know very little about snaps.

@miigotu miigotu added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Nov 19, 2021
@Prem1605
Copy link

Hi,

I tried creating a wild card for my domain.
pip install certbot-dns-godaddy - gives the below output
Could not find a version that satisfies the requirement certbot-dns-godaddy (from versions: )
No matching distribution found for certbot-dns-godaddy

Can it be fixed.?

@miigotu
Copy link
Owner

miigotu commented Nov 23, 2021

likely your pip is python2, try pip3 install certbot-dns-godaddy

@vitaminxp
Copy link

vitaminxp commented Dec 16, 2021

Still not working with certbot installed by snap on Debian 10 (snap is the recommended way to install certbot, per certbot's official instructions).

I used: "pip3 install certbot-dns-godaddy" command.

I also tried to install certbot by: "apt install certbot", but then after "pip3 install certbot-dns-godaddy" even though the plugin is visible by certbot, but certbot doesn't recognize parameters specific to certbot-dns-godaddy, so basically certbot-dns-godaddy doesn't work anyway.

Somehow I got it to work 2 months ago without the use of snap, but it took me all night of googling and trying things, but this time no luck. If properly installed, the certbot doesn't see certbot-dns-godaddy python3 plugin.

PLEASE HELP!

Thanks so much for your hard work. If any additional info is needed about the server or python, let me know. By the way while trying many different things I also removed python 2.7 completely. Only kept 3.7 and installed pip3 separately, because initially it wasn't installed.

"snap install certbot-dns-google" works good. I wish "certbot-dns-godaddy" could be installed by snap as well.

@Prem1605
Copy link

I tried the "pip3 install certbot-dns-godaddy" command as adviced
Got an error
Screenshot 2021-12-16 at 11 55 12 AM
.

@miigotu
Copy link
Owner

miigotu commented Feb 26, 2022

I tried the "pip3 install certbot-dns-godaddy" command as adviced Got an error Screenshot 2021-12-16 at 11 55 12 AM .

That error is from cryptography, not this package. You should first make sure pip is up to date pip3 install -U pip

What system/arch is this on? If it is a rpi you should add piwheels

For ubuntu or alpine you could add the correct repo maintained by linuxserver.io with --find-links or and environment variable PIP_FIND_LINKS= or add it to /etc/pip.conf to avoid having to build wheels on your system. (Only add the correct one for your OS)
https://wheel-index.linuxserver.io/alpine-3.15
https://wheel-index.linuxserver.io/alpine
https://wheel-index.linuxserver.io/ubuntu
https://wheel-index.linuxserver.io/homeassistant
https://wheel-index.linuxserver.io/homeassistant-3.15

For ubuntu on rpi you would add both piwheels and https://wheel-index.linuxserver.io/ubuntu like this:

In /etc/pip.conf

[global]
extra-index-url=https://www.piwheels.org/simple
find-links=https://wheel-index.linuxserver.io/ubuntu

Otherwise, you will need to build cryptography with the instructions here

@miigotu
Copy link
Owner

miigotu commented Feb 26, 2022

@tcaddy looking at this again, I am in total disagreement with the official certbot documentation about snap being the preferred installation. They say that for sake of making it easier to tell people how to do it. Currently it is limiting users that need to use 3rd party plugins.

I would argue that running python you should use the most pythonic way to do it, not the most canonical method.
The easiest way to use this and be in an isolated installation, using python's preferred method, is:

python3 -m venv ~/certbot
source ~/certbot/bin/activate
pip install certbot-dns-godaddy

From now on either activate the venv or call the certbot with the full path and it is isolated, just not a full sandbox, and you have read/write permissions.

~/certbot/bin/certbot certonly --authenticator dns-godaddy --dns-godaddy-credentials $FILENAME --dns-godaddy-propagation-seconds 900 --keep-until-expiring --non-interactive --expand --server https://acme-v02.api.letsencrypt.org/directory -d '$DOMAINNAME'

I am hoping to create a snap for this, but I need some outside help because I have never created a snap before. It would be cool if this project could just be added to the official plugins as well, so it could be automatically kept in sync with the main certbot.

@dtwilliamson
Copy link

Have you seen this?

@aalku
Copy link

aalku commented Dec 11, 2022

Hi. I had to uninstall certbot with snap and install it back with pip, then it start detecting this plugin. If you could explain this in the readme it will help many people. It took me a lot to figure this out.

@miigotu
Copy link
Owner

miigotu commented Jul 14, 2023

Have you seen this?

I'd like to do that, my plate is kind of full right now doing very large rewrites of legacy webserver code on my other projects and building out some new applications. If someone else can't get around to trying to add support for this here, I'll try someday.

@vhatzist
Copy link

Is there an update to this issue? I am facing the same problem.

@miigotu
Copy link
Owner

miigotu commented Jul 20, 2023

Is there an update to this issue? I am facing the same problem.

You don't have to run certbot as a snap.

@bucktaylor
Copy link

bucktaylor commented Jul 25, 2023

Having a few issues with this as well.

Just installed on Ubuntu 22.04. Kept getting errors. Had to uninstall ALL versions of Certbot. Then did the following:

`sudo python3 -m venv ~/opt/certbot/

source ~/opt/certbot/bin/activate

sudo ~/opt/certbot/bin/pip install --upgrade pip

sudo ~/opt/certbot/bin/pip install certbot certbot-apache

sudo ln -s ~/opt/certbot/bin/certbot /usr/bin/certbot

sudo pip3 install --target=~/opt/certbot/lib/python3.10/site-packages certbot-dns-godaddy

sudo pip3 install --target=~/opt/certbot/lib/python3.10/site-packages dns-lexicon

sudo pip3 install --target=~/opt/certbot/lib/python3.10/site-packages zope.interface`

You will get some errors during the installation. Look at what is missing, or not of correct version. Open up the folder "certbot_dns_godaddy-0.2.4.dist-info" and edit the METADATA. Make sure it says something like this for the requirements (or higher in case of additional updates to versions):

`Requires-Dist: certbot (>=0.31.0,<2.8.0)

Requires-Dist: dns-lexicon (>=3.2.3)

Requires-Dist: urllib3 (>=1.26.4,<2.0.6)

Requires-Dist: zope.interface (>=5.4.0)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants