{"id":20694754,"url":"https://github.com/syp1975/mkcert","last_synced_at":"2026-04-20T17:05:09.955Z","repository":{"id":260739950,"uuid":"881505367","full_name":"syp1975/mkcert","owner":"syp1975","description":"A pure bash script that generates self-signed certificates.","archived":false,"fork":false,"pushed_at":"2024-11-02T07:50:19.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T18:02:00.911Z","etag":null,"topics":["bash","certificates","homelab","openssl","ssl","webdevelopment"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syp1975.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-31T17:53:10.000Z","updated_at":"2024-11-02T07:48:24.000Z","dependencies_parsed_at":"2024-11-02T08:35:32.122Z","dependency_job_id":null,"html_url":"https://github.com/syp1975/mkcert","commit_stats":null,"previous_names":["syp1975/mkcert"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syp1975%2Fmkcert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syp1975%2Fmkcert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syp1975%2Fmkcert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syp1975%2Fmkcert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syp1975","download_url":"https://codeload.github.com/syp1975/mkcert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242958491,"owners_count":20212810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","certificates","homelab","openssl","ssl","webdevelopment"],"created_at":"2024-11-17T00:06:22.032Z","updated_at":"2026-04-20T17:05:09.907Z","avatar_url":"https://github.com/syp1975.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mkcert\n\nA pure _bash script_ that generates self-signed certificates.\n\nCertificates are signed with a custom CA root certificate.\nInstall this CA root certificate in your computer as a Trusted Root Certification Authority once, then all generated self-signed certifcates will be trusted by your browser. Usefull for web development or home labs.\n\n\u003e If a CA root certificate is not found, one will be generated automatically.\u003cbr\u003eCA root certificate is not renewed automatically.\n\n## Usage\n\n`mkcert \u003cdomain\u003e [\u003cdomain|ip\u003e ...]`\u003cbr\u003e\nGenerate a self-signed certificate for the given domain(s) or IP address(es).\n\n## Examples\n\n```sh\n#creates example.com.key and example.com.crt in current folder\nmkcert example.com *.example.com\n\n#creates\n#/etc/ssl/my_home/CA.key (password protected, password is stored in /etc/ssl/my_home/.password),\n#/etc/ssl/my_home/CA.crt (copy this file to your computer and install it as trusted root CA)\n#/etc/ssl/my_home/my_router.home.key (use this cert on your web server)\n#/etc/ssl/my_home/my_router.home.crt\nDAYS=1825 ORGANIZATION=/etc/ssl/my_home CA_PASSWORD=file:.password mkcert my_router.home 192.168.1.1\n```\n\n## Variables\n\nPass options to the script using environment variables.\n\n### For self-signed certificate generation\n\n- **`DAYS`**: number of days the certificate is valid for (730).\n- **`ORGANIZATION`**: path to the folder where certificates will be stored.\u003cbr\u003e\n  Defaults to the current folder.\u003cbr\u003e\n  Folder will be created if it does not exist.\u003cbr\u003e\n  Folder name will be used as the organization name.\n- **`CA`**: name of the root CA certificate files (CA).\n- **`CA_PASSWORD`**: password to access the private key of the root CA certificate.\u003cbr\u003e\n  If not set, a password will be prompted when needed.\u003cbr\u003e\n  Examples:\n\n  - `pass:123456`\n  - `env:MyCAPassEnvVar`\n  - `file:/path/to/protected/file/with/password`\n\n- **`RENEW`**: days before expiration that an existing certificate will be renewed.\u003cbr\u003e\n  If no set, allways replaces existing certificates.\n- **`ENV`**: path to a file containing environment variables.\n- **`BITS`**: number of bits in the generated private keys (2048).\n\n### For CA root certificate generation\n\n- **`COUNTRY`**: name of the country (US).\n- **`STATE`**: name of the state (CA).\n- **`LOCALITY`**: name of the locality (Home).\n- **`CA_DAYS`**: number of days the root CA certificate is valid for (3650).\n- **`CA_ENCRYPTION`**: encryption algorithm for the root CA certificate (des3).\n- **`CA_EXPIRATION`**: days before CA certificate end date that a warning will be issued (30).\n\n## Files\n\nVariables can be placed in:\n\n- `/etc/mkcert`\n- `.mkcert` in `ORGANIZATION` folder.\n- In defined `ENV` file.\n- Passed in the command line.\n\n\u003e Do not put a plain password in the command line.\u003cbr\u003e`ps` command will reveal it.\n\n## Dependencies\n\n- The script uses _openssl cli tool_ to generate and sign certificates.\n\n## License\n\n_mkcert_ is released under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyp1975%2Fmkcert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyp1975%2Fmkcert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyp1975%2Fmkcert/lists"}