--user-agent flag explained?


#1

Hi I see a --user-agent flag has been added to LE client https://github.com/letsencrypt/letsencrypt/blob/151c674cba6cd1e88521dbb5141d0c25662757b1/letsencrypt/cli.py#L933-L937

Set a custom user agent string for the client. User agent strings allow "
"the CA to collect high level statistics about success rates by OS and "
"plugin. If you wish to hide your server OS version from the Let’s "
'Encrypt server, set this to “”.

@jsha @kelunik

what are the acceptable values for this ? or anything goes ?

i.e. for my Centmin Mod LEMP stack’s LE integration via webroot authentication I can use --user-agent=centminmod ?


#2

Essentially anything goes. This is mainly used to determine what type of clients are regularly accessing Let’s Encrypt, and what versions they are, to help make decisions about deprecating old features. My recommendation would be that you choose a user agent string that reflects the name of your software (e.g. centminmod), plus its version (1.0), plus any underlying software you using and its version (in this case, the contents of the default user-agent string for the official client, assuming you are using the official client under the hood.


#3

cheers @jsha thanks the clarification :slight_smile:


#4

oh is the --user-agent flag supported in cli.ini ?


#5

I’m not sure. @bmw, can you answer whether cli.ini supports the user agent flag?


#6

Yep! Setting the user-agent is supported in cli.ini. For example, you can do:

user-agent = foo


#7

thanks @bmw for the clarification :smiley: