{"id":19580768,"url":"https://github.com/warriorbrian/auto-tls","last_synced_at":"2025-10-26T17:04:11.164Z","repository":{"id":97196795,"uuid":"227763234","full_name":"warriorBrian/auto-tls","owner":"warriorBrian","description":"Generate docker tls certificate automatically","archived":false,"fork":false,"pushed_at":"2019-12-13T06:35:10.000Z","size":4,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-27T08:37:20.797Z","etag":null,"topics":["bash","docker","openssl","shell","shell-script","tls-certificate"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/warriorBrian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-12-13T05:28:53.000Z","updated_at":"2023-04-08T14:31:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"babec003-dfa8-48de-a5fe-b067cea8b010","html_url":"https://github.com/warriorBrian/auto-tls","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/warriorBrian/auto-tls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warriorBrian%2Fauto-tls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warriorBrian%2Fauto-tls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warriorBrian%2Fauto-tls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warriorBrian%2Fauto-tls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warriorBrian","download_url":"https://codeload.github.com/warriorBrian/auto-tls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warriorBrian%2Fauto-tls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281139041,"owners_count":26450141,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","docker","openssl","shell","shell-script","tls-certificate"],"created_at":"2024-11-11T07:29:32.567Z","updated_at":"2025-10-26T17:04:11.129Z","avatar_url":"https://github.com/warriorBrian.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automatically generate Docker TLS certificate script\n\n[中文](https://github.com/warriorBrian/auto-tls/blob/master/README_zh.md) | [English](https://github.com/warriorBrian/auto-tls/blob/master/README_zh.md)\n\nAutomatically generate Docker TLS certificate to make docker cross-platform connection more secure!\n\n## How to use\n\n### 1. Edit the script, changes need to be configured\n\nOpen the `auto-tls.sh` file using `vi/vim`, Example:\n\n```sh\n# configure IP *(Required):\nip=\"127.0.0.1\"\n\n# configure password *(Required):\npassword=\"any\"\n\n# configure filename *(Required):\nfilename=\"tls\"\n\n# default\ndays=1000\n```\n\n### 2. Configure docker file\n\nThe script will automatically generate two tar archives:\n\n* tls-server.tar.gz\n* tls-client.tar.gz\n\n**Configure docker TLS two ways:**\n\n#### 1). Modify the `daemon.json` file\n\n```sh\n$ cd /etc/docker/\n```\n\n```sh\n$ vi daemon.json\n\n  {\n\t\"tlsverify\": true,\n\t\"tlscacert\": \"/etc/cert path\", \t\t\t// ca-xxx.pem\n\t\"tlscert\": \"/etc/cert path\",   \t\t\t// server-cert-xxx.pem\n\t\"tlskey\": \"/etc/cert path\",\t\t        // server-key-xxx.pem\n\t\"hosts\": [\"tcp://0.0.0.0:2375\", \"unix:///var/run/docker.sock\"]\n  }  \n```\n\n```sh\n$ systemctl daemon-reload\n```\n\n```sh\n$ systemctl restart docker\n```\n\n-----------------------------------------------------------------------\n\u003e TIPS: If an error occurs during restart, modify the file:\n\n**Modify the `docker.service` file, which is located at `/usr/lib/systemd/system/docker.service`**\n\n```sh\n# ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock\n# modify:\nExecStart=/usr/bin/dockerd\n```\n-----------------------------------------------------------------------\n\n#### 2). Modify docker.service\n\n```sh\n$ vi /usr/lib/systemd/system/docker.service\n```\n```sh\n# Add modification code:\n\n  ExecStart=/usr/bin/dockerd --tlsverify --tlscacert=/etc/\u003ccert path\u003e --tlscert=/etc/\u003ccert path\u003e --tlskey=/etc/\u003ccert path\u003e -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock\n\n$ systemctl daemon-reload\n\n$ systemctl restart docker\n```\n\n### 3. Connection method\n\nCopy `tls-client.tar.gz` to another server, unzip it, and connect with a certificate\n\n```sh\n$ docker --tlsverify --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem -H tcp://ip:2375 ps\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarriorbrian%2Fauto-tls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarriorbrian%2Fauto-tls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarriorbrian%2Fauto-tls/lists"}