{"action":"created","issue":{"url":"https://api.github.com/repos/mholt/caddy/issues/383","labels_url":"https://api.github.com/repos/mholt/caddy/issues/383/labels{/name}","comments_url":"https://api.github.com/repos/mholt/caddy/issues/383/comments","events_url":"https://api.github.com/repos/mholt/caddy/issues/383/events","html_url":"https://github.com/mholt/caddy/issues/383","id":120468667,"number":383,"title":"LE: Rate limiting woes: some certificates not saved","user":{"login":"kseistrup","id":25586,"avatar_url":"https://avatars.githubusercontent.com/u/25586?v=3","gravatar_id":"","url":"https://api.github.com/users/kseistrup","html_url":"https://github.com/kseistrup","followers_url":"https://api.github.com/users/kseistrup/followers","following_url":"https://api.github.com/users/kseistrup/following{/other_user}","gists_url":"https://api.github.com/users/kseistrup/gists{/gist_id}","starred_url":"https://api.github.com/users/kseistrup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kseistrup/subscriptions","organizations_url":"https://api.github.com/users/kseistrup/orgs","repos_url":"https://api.github.com/users/kseistrup/repos","events_url":"https://api.github.com/users/kseistrup/events{/privacy}","received_events_url":"https://api.github.com/users/kseistrup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-04T19:22:32Z","updated_at":"2015-12-05T09:05:10Z","closed_at":null,"body":"I run a multi-host setup but I didn't know about Let's Encrypt's [public beta rate limits](https://community.letsencrypt.org/t/public-beta-rate-limits/4772), so the first time I ran Caddy 0.8 it failed for some of the domains that have several subdomains:\r\n```txt\r\n[subdom.example.com] failed to get certificate: acme: Error 429 - urn:acme:error:rateLimited - Error creating new cert :: Too many certificates already issued for: example.com\r\n```\r\nThis happened even if I pruned the list to be within the acceptable limits. However, I still receive the same error messages, and it seems it's because Caddy saves one certificate for each domain name it sees, but only saves these if there were no errors at all. So the first time I ran Caddy it apparrently registered as many domains as it could, but didn't save any of these due to some errors from Let's Encrypt. Now Let's Encrypt refuses to create more subdomains because it thinks it has already created them, but Caddy hasn't saved them anywhere.\r\n\r\nCaddy managed to save two certificates from a third run, and it seems indeed that it requests one certificate for each domain it sees.\r\n"},"comment":{"url":"https://api.github.com/repos/mholt/caddy/issues/comments/162163145","html_url":"https://github.com/mholt/caddy/issues/383#issuecomment-162163145","issue_url":"https://api.github.com/repos/mholt/caddy/issues/383","id":162163145,"user":{"login":"lenovouser","id":7549136,"avatar_url":"https://avatars.githubusercontent.com/u/7549136?v=3","gravatar_id":"","url":"https://api.github.com/users/lenovouser","html_url":"https://github.com/lenovouser","followers_url":"https://api.github.com/users/lenovouser/followers","following_url":"https://api.github.com/users/lenovouser/following{/other_user}","gists_url":"https://api.github.com/users/lenovouser/gists{/gist_id}","starred_url":"https://api.github.com/users/lenovouser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenovouser/subscriptions","organizations_url":"https://api.github.com/users/lenovouser/orgs","repos_url":"https://api.github.com/users/lenovouser/repos","events_url":"https://api.github.com/users/lenovouser/events{/privacy}","received_events_url":"https://api.github.com/users/lenovouser/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T09:05:10Z","updated_at":"2015-12-05T09:05:10Z","body":"The rate limit error showed up to me on my first try using Let's Encrypt too. It has nothing to do with Caddy. As a temporary solution, disable IPv6 with:\r\n\r\n```\r\nsudo sysctl -w net.ipv6.conf.all.disable_ipv6=1\r\n```\r\n\r\nissue your Let's Encrypt certificate,\r\n\r\nand re-enable IPv6 with:\r\n```\r\nsudo sysctl -w net.ipv6.conf.all.disable_ipv6=0\r\n```\r\n\r\nThe above works on Ubuntu/Debian."}}