how to use localhost as subject #52

Closed
opened 2020-06-09 05:48:37 +00:00 by Ghost · 1 comment

hi, i use greenlock-express to serve an webserver. in production environment, everything is fine but i need greenlock to work in dev/test environment using "localhost" as subject / SAN name but im not able to create a valid config using localhost.

using npx im getting the error message:

npx greenlock add --subject localhost --altnames localhost

error: valid hostnames must be restricted to a-z0-9_.- and contain at least one ".": 'localhost'

i also tried to directly edit the greenlock.d/config.json file but this also doesnt work.

regarding to the readme, i should be able to create a localhost certificate. whats wrong with my command.

hi, i use greenlock-express to serve an webserver. in production environment, everything is fine but i need greenlock to work in dev/test environment using "localhost" as subject / SAN name but im not able to create a valid config using localhost. using npx im getting the error message: ``` npx greenlock add --subject localhost --altnames localhost error: valid hostnames must be restricted to a-z0-9_.- and contain at least one ".": 'localhost' ``` i also tried to directly edit the greenlock.d/config.json file but this also doesnt work. regarding to the readme, i should be able to create a localhost certificate. whats wrong with my command.
Owner

You have to use a proper localhost domain.

I'd suggest using DuckDNS DNS-01 and manually setting a 127.0.0.1 address at the record.

You have to use a proper localhost domain. I'd suggest using DuckDNS DNS-01 and manually setting a 127.0.0.1 address at the record.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: root/greenlock-express.js#52
No description provided.