Installing root certificates

<aside> 💡

This makes sure your iPhone trusts the certificates that your Caddy server on your local computer creates.

</aside>

Next step is to download the Root caddy certificate on your computer. Easiest way is to openKeychain Access app. Select login on the left, and search for caddy.

caddy-root.png

You should see Caddy Local Authority - 2022 ECC Root. Select it and File -> Export Items... Save as .cer.

Airdrop this file to you iPhone (if that doesn’t work, try saving it to iCloud and opening the file on your iPhone via the Files app).

You should get a popup (if you have an Apple Watch, it will ask whether to save it to your iPhone or Watch, choose iPhone). Save the profile.

Now go to you settings app on your iPhone. -> General > VPN and device management > Click on ‘Caddy Local Authority...’ > Install.

Go back to General > Info > Trusted certificates (at the end) > Make sure ‘Caddy Local Authority’ is checked.

Setting DNS-servers

You’ll also need to change the DNS-server to the local IP adres of your computer. You can change this in the wifi settings on your iPhone

Change local resolution IP

Now you need to make sure your local DNS server on your computer returns the local IP address of your computer, and not the localhost address (the iPhone will ask the DNS server for the IP address of dashboard.stamhoofd → your DNS server needs to respond with the server that will answer to those requests, that is your local computer)

Change this in .development/.env and restart yarn dev:server

Testing

You might need to restart Safari on iOS.