Running Certbot on Windows - Phase 1

after installing certbot if you run certbot you should get an error like the one below

A brief explanation of the error:

The os.geteuid() method returns the current user ID in linux systems. This is a linux only method (review documentation here os — Miscellaneous operating system interfaces — Python 3.12.0 documentation)

In order to work around this we need to replace this method with '0' where '0' is the root user.

Below is a screenshot of the code that affects this and a find and replace method

The files that you need to update are under the python root\Lib\site-packages\certbot

For example in my Python 3.6 environment (installed at C:\Python36)

The files you need to update are:

account.py 2x Instances
cert_manager.py 2x Instances
crypto_util.py 2x Instances
main.py 3x Instances

1 Like