1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9049],{65121:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"commandline","title":"Command Line (CLI)","description":"A set of command line tools are available using the tool certify.exe which is found in the installation directory. The commands must be performed using an elevated administrators account.","source":"@site/docs/commandline.md","sourceDirName":".","slug":"/commandline","permalink":"/docs/commandline","draft":false,"unlisted":false,"editUrl":"https://github.com/webprofusion/certify-docs/edit/master/docs/commandline.md","tags":[],"version":"current","frontMatter":{"id":"commandline","title":"Command Line (CLI)"},"sidebar":"docSidebar","previous":{"title":"Request Your First Certificate","permalink":"/docs/certificate-process"},"next":{"title":"PowerShell Support and Execution Modes","permalink":"/docs/powershell-support"}}');var a=t(74848),r=t(28453);const s={id:"commandline",title:"Command Line (CLI)"},c=void 0,o={},d=[{value:"Manage ACME Accounts",id:"manage-acme-accounts",level:2},{value:"Example - Create Let's Encrypt Account:",id:"example---create-lets-encrypt-account",level:4},{value:"Example - Add Zero SSL Account with your EAB key id and key:",id:"example---add-zero-ssl-account-with-your-eab-key-id-and-key",level:4},{value:"Listing Managed Certificates",id:"listing-managed-certificates",level:3},{value:"Performing Renewals and Deployment Tasks",id:"performing-renewals-and-deployment-tasks",level:3},{value:"Adding or Removing Managed Certificates",id:"adding-or-removing-managed-certificates",level:3},{value:"Stored Credentials",id:"stored-credentials",level:3},{value:"Diagnostics",id:"diagnostics",level:3},{value:"Managing license activation",id:"managing-license-activation",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.p,{children:["A set of command line tools are available using the tool ",(0,a.jsx)(n.em,{children:"certify.exe"})," which is found in the installation directory. The commands must be performed using an elevated administrators account."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsx)(n.p,{children:"Most users do not need to use the command line options at all. By default all certificate renewals are taken care of automatically by the Certify background service."})}),"\n",(0,a.jsxs)(n.p,{children:["Usage: ",(0,a.jsx)(n.code,{children:"certify <command>"})]}),"\n",(0,a.jsx)(n.h2,{id:"manage-acme-accounts",children:"Manage ACME Accounts"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify acmeaccount list"}),": list registered acme account details (JSON output)"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify acmeaccount add <ACME CA ID> <your contact email> <optional EAB key id> <optional EAB Key>"}),": add a new ACME account"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["You can use the ",(0,a.jsx)(n.code,{children:"acmeaccount add"})," command to add/create a new ACME account registration. Using this command implies your agreement with the chosen ACME CAs current terms and conditions :"]}),"\n",(0,a.jsx)(n.h4,{id:"example---create-lets-encrypt-account",children:"Example - Create Let's Encrypt Account:"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.code,{children:"certify acmeaccount add letsencrypt.org [email protected]"})}),"\n",(0,a.jsx)(n.h4,{id:"example---add-zero-ssl-account-with-your-eab-key-id-and-key",children:"Example - Add Zero SSL Account with your EAB key id and key:"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.code,{children:'certify acmeaccount add zerossl.com [email protected] "abcdkeyid" "_Example_Key_Value_"'})}),"\n",(0,a.jsx)(n.h3,{id:"listing-managed-certificates",children:"Listing Managed Certificates"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify list"})," : list managed certificates and current running/not running status in IIS"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify list --json <path-to-output-json>"})," : output list of managed certificates as JSON to a given file path."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"performing-renewals-and-deployment-tasks",children:"Performing Renewals and Deployment Tasks"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify renew"})," : renew certificates for all auto renewed managed certificates, if they are due or have not yet been requested."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify renew id=<first item id>,<next item id>"})," : target the specific comma separated list of IDs (no spaces), optionally with other renewal flags."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify renew --renew-all-due"})," : renew all certificates which are due or have not yet been requested even if auto-renew is not enabled."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify renew --force-renew-all"})," : renewal for all auto renewed certificates even if they are not yet due."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify renew --renew-witherrors"})," : attempt renewal for all certificates which have most recently failed to renew."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:'certify deploy "<managed cert id>" "<task id>"'})," : perform a specific deployment task for the given managed certificate. See the Manual trigger mode for deployment tasks."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"adding-or-removing-managed-certificates",children:"Adding or Removing Managed Certificates"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"certify importcsv"})," : import managed certificates from a CSV file. See ",(0,a.jsx)(n.a,{href:"/docs/csv-import",children:"CSV Import"})," for more details"]}
1),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"certify add"})," and ",(0,a.jsx)(n.code,{children:"certify remove"})," commands can be used to add or remove domains from an existing managed certificate or create a new managed certificate. You can find the correct managed certificate ID in the app under ",(0,a.jsx)(n.em,{children:"Certificate > Advanced > Actions > Managed Certificate Reference Id"})," (e.g. ",(0,a.jsx)(n.code,{children:"a02e3afe-49ba-470a-83e5-2e397aa946eb:1"}),"). The remove command accepts ",(0,a.jsx)(n.code,{children:"any"})," as the managed cert id to remove the matching domains from any managed certificates."]}),"\n",(0,a.jsxs)(n.p,{children:["These will not request/renew the actual certificate unless you append ",(0,a.jsx)(n.code,{children:"--perform-request"})," to the end of the command. These commands assume the same domain validation settings are being used for all domains on the same managed certificate:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify remove <managed cert id, or any> domain1.test.com;domain2.test.com"})," : remove one or more certificates from the configuration of a managed certificate. If removing a domain will mean there are zero domains remaining on the certificate then the managed certificate will be removed completely."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify add <managed cert id, or new> domain1.test.com;domain2.test.com"})," : add one or more additional domains to the configuration of a managed certificate. e.g. ",(0,a.jsx)(n.code,{children:"certify add new example.com"})]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify add new domain1.test.com;domain2.test.com --template C:\\Temp\\managedcert-template.json"})," : add new managed cert with given domain, using a template (json exported from an existing managed cert)."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.admonition,{title:"using templates",type:"info",children:[(0,a.jsx)(n.p,{children:"Templates are an advanced feature intended only for users who require managed certificate automation with non-default challenge configuration (e.g. DNS validation)."}),(0,a.jsx)(n.p,{children:"To generate a template:"}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Use ",(0,a.jsx)(n.code,{children:"certify list --json output.json"})," to export your managed certificates as JSON"]}),"\n",(0,a.jsxs)(n.li,{children:["Edit the JSON file down to a single item, remov
1ing the array ",(0,a.jsx)(n.code,{children:"[ ... ]"})]}),"\n",(0,a.jsx)(n.li,{children:"Save the file as your new template. Domains etc will be discarded from the template and you still need to provide these arguments"}),"\n"]}),(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Templates are not guaranteed to stay compatible between major version updates so you should test integrations which use them with each new release."})})]}),"\n",(0,a.jsx)(n.h3,{id:"stored-credentials",children:"Stored Credentials"}),"\n",(0,a.jsx)(n.p,{children:"For advanced automation scenarios you can add/update stored credentials or list your existing items:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:'certify credential store <unique storage key GUID> "<title>" "<type id>" "<secret values as JSON>"'})," : for advanced automation use. Stores or updates a stored credential."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify credential list"})," : list current stored credential summary information. This does not show secret values."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Note that when storing credentials information such as the Type ID and JSON format for the secrets will vary by credential type and are not arbitrary. ",(0,a.jsx)(n.a,{href:"https://github.com/webprofusion/certify-plugins/blob/development/src/DeploymentTasks/Examples/Misc/storedcredential-definitions.txt",children:"See an export"})," of the current list on github or contact support to discuss your requirements."]}),"\n",(0,a.jsx)(n.p,{children:"Below is an example command adding a stored credential for the Cloudflare DNS API. The GUID ID is generated by you and just needs to be unique where you are using it:"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.code,{children:'./certify credential store "00213bb0-ec38-49db-bbec-f38f40e91809" "A test credential" DNS01.API.Cloudflare "{\'apitoken\':\'anexampletokenvalue\'}"'})}),"\n",(0,a.jsx)(n.h3,{id:"diagnostics",children:"Diagnostics"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify diag"})," : check existing ssl bindings and managed certificate integrity"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify httpchallenge keys=stop,configcheck"})," : run the temporary http challenge server on port 80 to test firewall and routing configuration. This uses http.sys to register a listener for ACME http challenges as ",(0,a.jsx)(n.code,{children:"http:/*/.well-known/acme-challenge/"})," and will not conflict with IIS. The server will run for 60 seconds after the last matching request is received or until stopped by calling the control key."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["With the example control key ",(0,a.jsx)(n.code,{children:"stop"})," and config check key ",(0,a.jsx)(n.code,{children:"configcheck"})," you can:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["test your servers response using ",(0,a.jsx)(n.code,{children:"http://<your domain or server ip>/.well-known/acme-challenge/configcheck"})," e.g. ",(0,a.jsx)(n.code,{children:"http://127.0.0.1/.well-known/acme-challenge/configcheck"})]}),"\n",(0,a.jsxs)(n.li,{children:["stop the service using ",(0,a.jsx)(n.code,{children:"http://<your domain or server ip>/.well-known/acme-challenge/stop"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The user agent returned should be ",(0,a.jsx)(n.code,{children:"Certify/HttpChallengeServer"})]}),"\n",(0,a.jsx)(n.h3,{id:"managing-license-activation",children:"Managing license activation"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify activate <email> <key>"})," : activate the license for this instance of ",(0,a.jsx)(n.em,{children:"Certify Certificate Manager"}),". Useful for larger scale automated deployments."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"certify deactivate <email>"})," : deactivates the license for this instance of ",(0,a.jsx)(n.em,{children:"Certify Certificate Manager"}),"."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>c});var i=t(96540);const a={},r=i.createContext(a);function s(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.