Local Community

Regenerating Docker Machine TLS Certificate, checking system won't start

Hey @coreyallen,

Sorry about that!

Did you turn on a VPN this morning and then start Local? Sometimes that can cause issues with VirtualBox/Docker.

I see in the log it suggests docker-machine regenerate-certs [name] may regenerate them, would that work here?

I did though I do that every morning and has never been an issue before. I saw that suggestion on other threads so after rebooting I tried launching without the vpn several times. I haven’t had the VPN on since and still no luck.

For what it’s worth, Local is automatically attempting that regenerate-certs command.

I found a way to reproduce the symptoms you’re running into. I’m currently working on an solution I can pass back to you :slight_smile:

Awesome I can’t thank you enough Clay, I’m deploying a client site soon so your speed at getting back to me will keep me from hitting a wall. Much appreciated.

Okay, let me know how this works for you:

  1. Quit Local if it’s running
  2. Open Terminal
  3. Run:
alias local-docker-machine="/Applications/Local\ by\ Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine"
  1. Run (wait for it to finish before moving onto step #5):
local-docker-machine stop local-by-flywheel; rm -rf ~/.docker/machine/certs; local-docker-machine create local-cert-gen; local-docker-machine start local-by-flywheel; local-docker-machine regenerate-certs -f local-by-flywheel; local-docker-machine rm -f local-cert-gen;
  1. Re-open Local

Thanks so much that did the trick! Is there a way I can prevent this from happening again?

Great! I’m very glad to hear that helped :slight_smile:

I’m not sure at the moment but if I find out more we’ll most likely build preventative measures into Local itself.

I am experiencing this same problem. I tried the recommended steps above without luck.

The alias command runs with no output. The regenerate-certs command fails with a “command not found” message. I assume that means the alias command failed. I’m running MacOS 10.13.3

I’ve tried the remedies suggested in other threads as well (restarting local, upgrading Virtual Box, rebooting my system).

One thing I’ve noticed while Local is cycling through the Regenerating Docker Machine TLS Certificates message, the certs are being created in my Local vm directory, then being recreated again and again. It’s like Local is stuck in a loop.

I have a dozen dev sites installed on Local and need to regain access. Any help is greatly appreciated.

1 Like

For some reason, I wasn’t able to alias the docker-machine command. However, I was able to run the second set of commands by changing “local-docker-machine” to “docker-machine”. And now Local is starting without looping on certificate regeneration.

Problem solved.


Still having this issue, even with the couple fixes mentioned here. Trying to reinstall I’m also getting the error. Is there a new version of Local forthcoming?

I’m having the same issue. Shell commands didnt fix the issue, still stuck regenerating Docker Machine TLS Certs when opening Local.

 rocket55@rocket55s-mbp-6  ~  alias local-docker-machine="/Applications/Local\ by\ Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine"

rocket55@rocket55s-mbp-6  ~  local-docker-machine stop local-by-flywheel; rm -rf ~/.docker/machine/certs; local-docker-machine create local-cert-gen; local-docker-machine start local-by-flywheel; local-docker-machine regenerate-certs -f local-by-flywheel; local-docker-machine rm -f local-cert-gen;
Stopping “local-by-flywheel”…
Machine “local-by-flywheel” is already stopped.
Creating CA: /Users/rocket55/.docker/machine/certs/ca.pem
Creating client certificate: /Users/rocket55/.docker/machine/certs/cert.pem
Running pre-create checks…
(local-cert-gen) No default Boot2Docker ISO found locally, downloading the latest release…
(local-cert-gen) Latest release for github.com/boot2docker/boot2docker is v18.03.0-ce
(local-cert-gen) Downloading /Users/rocket55/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v18.03.0-ce/boot2docker.iso
(local-cert-gen) 0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Creating machine…
(local-cert-gen) Copying /Users/rocket55/.docker/machine/cache/boot2docker.iso to /Users/rocket55/.docker/machine/machines/local-cert-gen/boot2docker.iso…
(local-cert-gen) Creating VirtualBox VM…
(local-cert-gen) Creating SSH key…
(local-cert-gen) Starting the VM…
(local-cert-gen) Check network to re-create if needed…
(local-cert-gen) Found a new host-only adapter: “vboxnet2”
(local-cert-gen) Waiting for an IP…
Waiting for machine to be running, this may take a few minutes…
Detecting operating system of created instance…
Waiting for SSH to be available…
Detecting the provisioner…
Provisioning with boot2docker…
Copying certs to the local machine directory…
Copying certs to the remote machine…
Setting Docker configuration on the remote daemon…
Checking connection to Docker…
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: /Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine env local-cert-gen
Starting “local-by-flywheel”…
(local-by-flywheel) Check network to re-create if needed…
(local-by-flywheel) Waiting for an IP…
Machine “local-by-flywheel” was started.
Waiting for SSH to be available…
Detecting the provisioner…
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
Regenerating TLS certificates
Waiting for SSH to be available…
Detecting the provisioner…
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
About to remove local-cert-gen
WARNING: This action will delete both local reference and remote instance.
Successfully removed local-cert-gen

Followed instructions here. Nothing changed, still getting the same message. Any ideas?

Thank you! This worked for me as well. I’m not sure if it’s relevant, but I had Docker installed prior to installing Local and while running Local I also run two docker containers for my development project via docker-compose. But this is probably not an issue… Anyway here’s the screenshot with Terminal output of the steps described above that solved the issue. Warning - it takes really long time for the second command to finish! :slight_smile:

I also had the same issue here. I followed the above guide but it didn’t work.

  • Setting
    Virtualbox 5.2.18
    macOS High Sierra version 10.13.6
    Docker version 18.06.1-ce, build e68fc7a

When I ran the step 3 command alias local-docker-machine="/Applications/Local\ by\ Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine" nothing is changed,

Then ran the step 4 command it was not working (“No such file or directory”) So I replace the command “local-docker” to just “docker” following the other’s approach.


But even after this,

the “Regenerating Docker Machine Certificates …” message is repetitively shown.
Sometimes I can see the screen “Looks like you haven’t create …” some normal screen but it only lasts for one or two seconds then the Regenerating Docker Machine Certificates …" message and the “Checking System” is shown so I can not do any works here.

Should I reinstall the Local by Flywheel? At first when I installed this program I also had the issue for the 2nd bar part (I can not remember what it was exactly)

After this “There was an error validating certificates for host” error, I just kept going but it was never ended for the 2nd bar part.
So I googled and the answer was just turning off the local by flywheel in the virtualbox and restart the local by flywheel. So I did then the issue for the “Regenerating Machine Certificates” is newly detected.

Please help me !!! :slight_smile:
Much appreciated,

I solved this after uninstalling the local and install again.
Maybe I had the issue when installing this.

I refer to the below link to uninstall the local.

This is the at least the 2nd and probably 3rd time this app has broken after an update and resulted in several wasted hours of useless troubleshooting. At first I was getting endless notifications about invalid TLS certificates and how Local was fixing them. Those never stopped. I followed the advice here and had the same result (“alias” command didn’t do anything). Occasionally the app would seem to load and be ready for me to start a site, but every time I clicked on a site’s title, it would say it couldn’t find the site ID. Now I get a message saying, “Uh Oh! We ran into a hiccup when trying to start the Local Machine. Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded”

Attaching log

local-by-flywheel.log (102.5 KB)

I wanted to say that this solution did seem to work for me on macOS. (The “alias” command only creates a shortcut name for several commands to the docker-machine…) If this is still a problem, give the procedure a try again.

1 Like

I don’t know why it is so darn difficult to get Local by Flywheel to work. I am on MacOS X with the latest version of LbyF, the latest VirtualBox and the latest Docker. I have uninstalled and reinstalled several times. I deleted the VM and got LbyF to at least start to do things. However, it gets to about 75% of the Host Machine setup step and dies with:

Error creating machine: Error checking host: Error checking and/or regenerating the certs: There was an error validating certificates for host “”: x509: certificate has expired or is not yet valid

I tried to regenerate certificates:

docker-machine regenerate-certs
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...

Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded

SSH session establishment never completes