DevKinsta conflict with Local By Flywheel

Q: Date/Time this occurred (Provide your time zone also)
A: 23-09-2023 UTC+8

Q: DevKinsta Version
A: 2.11.0

Q: OS Version
A:

Q: Docker Desktop Version
A: 4.23.0

Q: Were any error codes or messages observed? If so, what were they?
A: No

Q: Detailed Description of the Problem
**A: Potential conflict between Local By FlyWheel and DevKinsta. Was using devKinsta for offline site which was at client.local for several months however this has changed after using Local By Flywheel (different offline site client2.flywheel) and now when using devKinsta the site url is now changed to client.local:58842 with the port appended and the site certificate etc can’t be found. If I start up Local By Flywheel I get a 502 error from visiting client.local which indicates that this is being routed to Local By Flywheel server. It seems that Local By Flywheel and devKinsta have a conflict somewhere. **

Hello John @jbman :wave: and welcome to Kinsta Community!

Thank you for reaching us out!
First of all, I’ve never used Local by flywheel and based on your report, it seems that Local’s web service/server uses the default ports: 80 (http) and 443 (https) - and those same ports can not be used at the same time concurrently by 2 different web servers/services (note: DevKinsta uses NGINX web server, by default it’s set with those ports: 80 and 443).

So in general, if you have any other web server/service runs on your local computer - and they use the same standard or default ports 80/443, then those ports can’t be used again (would be conflicted), either by NGINX in DevKinsta or vice-versa (if those have been used by NGINX in DevKinsta, the same ports can’t be used by the other web servers).

As a workaround, in DevKinsta we can set / change the default NGINX ports with custom numbers.
Please try the following and see if this will help to solve that port issue:

  1. Open your DevKinsta, then click on the bottom left (blue) icon - to open the Settings page
  2. On that Settings page, scroll down and locate for the “Port selector” section.
  3. Please un-check the " Auto-detect open ports "
  4. Put the custom port you want to set/assign, such as for example: 8080 to the HTTP field, and 8443 to the HTTPS field.
  5. Click the “Confirm” button

Then on DevKinsta, click that site name “client.local” from the Sites list, then scroll down and locate for the “SSL and HTTPS” section, and just make sure the “HTTPS” toggle has been enabled.

After that, please try to access the client.local site again with that additional custom port you set before. For example:
http://client.local:8080
or
https://client.local:8443
and see if this local site can be accessed properly.

This way, you should be able to access that client.local site with the custom port above, and you will still be able to access the other site(s) made by Local (that runs on default port: 80 / 443 ).

Regards,
Agus

Thanks Agus,

So from what you describe it seems like there was a conflict with Local by Flywheel on 80 and 443 and devKinsta then auto appended new ports which resulted in the SSL certificate for the site failing (the message in the browser window was no certificate found).

Toggling SSL on and off and hard cache refresh to browser had no effect.

I ended up attempting to change the URL from client.local to client-test.local and then back however during this process there was an error and the site DB was corrupted rendering the site inaccessible.

I imported the site again from staging and was able to get it running but it was still affected by the URL auto append (client.local:12345 ) which further created issues with urls as client.local needed to be updated to client.local:12345 which didn’t happen during the import. Additionally there were still URLs for images that had the staging site URL which hadn’t been updated in the import.

Just now based on your advice I have located the auto update port settings and disabled this and forced 80 and 443 again.

It seems the site is loading again although there are still the issues with the URL from Sync errors I raised in the other topic [Push/Pull to staging doesn't replace URLS correctly]

I have sent the logs for this period for review which covers the period both these topics occurred.

Kind Regards,

John

You’re welcome John :slight_smile: and thank you for your reply and update!

So from what you describe it seems like there was a conflict with Local by Flywheel on 80 and 443 and devKinsta then auto appended new ports which resulted in the SSL certificate for the site failing (the message in the browser window was no certificate found).

Yes that sounds like it.
So the workaround either to use the default ports (80/443) in DevKinsta but do not run the other web service/server which runs on that same default ports (just close/disable Local , so it won’t activate the web server with that same ports), or un-check the " Auto-detect open ports " and set it to any custom ports there for HTTP and HTTPS (different number for each).

Just for your information, I also tried the same on my Windows 11 machine just now, and I set custom ports there - set with HTTP = 12345 and HTTPS = 12346 .

Then I tried to import the site again from my Staging site (from MyKinsta account) to DevKintsa, and could see all the local site URLs were replaced with the local site URL e.g.: https://mysite.local:12346 .

After that I checked that local site URL (with that custom port) on my browser and all looked good (I didn’t see any of my old staging environment URL in the local site at all. All of my Staging site’s URLs were all replaced properly with that local site URL with the custom port. I didn’t find any reference for that my Staging Site URL at all in the local site’s database either).

Just now based on your advice I have located the auto update port settings and disabled this and forced 80 and 443 again.
It seems the site is loading again although there are still the issues with the URL from Sync errors I raised in the other topic [Push/Pull to staging doesn’t replace URLS correctly]
I have sent the logs for this period for review which covers the period both these topics occurred.

Alright great to hear if it works on port 80 and 443 again :+1:
(I assume the other web server/service might be disabled / the “Local” program was not running perhaps, so the DevKinsta’s local sites could be accessible with those ports.).

Thanks, I got the logs (and screenshot) you sent via DM and will check and review them and will update you again in that another thread as soon as possible :slight_smile:

regards,
Agus