Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6597f13
Refs #6636: Remove the part of the script that actually installs Choc…
Mar 5, 2025
d2137d7
Refs #6636: Installed DDEV & gsudo on Windows.
Mar 5, 2025
c0ab7da
Refs #6636: Finished adding Windows versions of DDEV, mkcert & gsudo.
Mar 5, 2025
cc946b6
Refs #6636: Get non-Chocolatey versions of dependencies for Docker De…
Mar 5, 2025
a2d9905
Refs #6636: Stop installing gsudo & mkcert as this is done by the DDE…
Mar 6, 2025
b3ea9a5
Refs #6636: Stop hardcoding the DDEV release to download; get the ver…
Mar 6, 2025
1aeb294
Refs #6636: Download the installer for the correct architecture. [ski…
Mar 7, 2025
9537b38
Refs #6636: Run the installer in silent mode. [skip buildkite]
Apr 3, 2025
dfa4d21
Remove admin requirement from scripts [skip buildkite]
rfay Apr 3, 2025
b31839d
Refs #6636: Mention in docs that admin Powershells usually aren't nec…
Apr 4, 2025
b3766d1
Refs #6636: Delete old installer (to avoid errors) before downloading…
Apr 8, 2025
ef3782d
Refs #6636: Delete old installer (to avoid errors) before downloading…
Apr 8, 2025
ecd4355
Refs #6636: Update docs to state than Admin Powershell isn't required…
Apr 9, 2025
93aaeba
Remove most references to Chocolatey [skip buildkite]
rfay Apr 9, 2025
28a1b27
Remove choco suggestion from docker desktop installer [skip buildkite]
rfay Apr 9, 2025
34c5914
Experimental: remove ChocolateyMode completely and always install mkc…
rfay Apr 9, 2025
d6ed039
Put back chocolatey mode, but only skip mkcert in that mode [skip bui…
rfay Apr 9, 2025
8aec8b5
Change sudo_license to gsudo_license [skip buildkite]
rfay Apr 9, 2025
b4f577f
Keep ChocolateyMode but don't use [skip buildkite]
rfay Apr 9, 2025
9354eb7
Use unique name for installer, thanks to chatgpt [skip buildkite]
rfay Apr 9, 2025
48cdfdf
same changes to docker desktop script [skip buildkite]
rfay Apr 9, 2025
bf4b3c6
Delete existing installers [skip buildkite]
rfay Apr 9, 2025
82bfa61
Add cleanup to docker-inside script [skip buildkite]
rfay Apr 9, 2025
ae08a20
Remove the remove-item as not needed [skip buildkite]
rfay Apr 9, 2025
d4a44a2
Make sure DDEV dir is in PATH to use mkcert [skip buildkite]
rfay Apr 9, 2025
641b1f2
Use mkcert.exe [skip buildkite]
rfay Apr 9, 2025
21ddd48
Execute explicitly with path [skip buildkite]
rfay Apr 9, 2025
7189d5e
Why isn't mkcert there yet? [skip buildkite]
rfay Apr 9, 2025
f7ccc28
Fix numbering in doc that is in tab [skip buildkite]
rfay Apr 10, 2025
cd443ed
More renumbering [skip buildkite]
rfay Apr 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/RELEASE_NOTES_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ See the [installation instructions](https://github.com/ddev/ddev/blob/main/docs/
- macOS or Linux Homebrew: `brew upgrade ddev`
- Linux or macOS via script (an unusual and nonstandard approach):
`curl https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev.sh | bash`
- Windows: Download the ddev_windows_installer above or `choco upgrade ddev` (on Intel/AMD64 systems)
- Windows: Download and run the ddev_windows_installer above.

And anywhere, you can download the tarball or zipball, un-tar or un-zip it, and place the executable in your path where it belongs.

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@ windows_sign_binaries: $(GOTMP)/bin/windows_amd64/ddev.exe $(GOTMP)/bin/windows_
ls -l .gotmp/bin/windows_arm64
@if [ "$(DDEV_WINDOWS_SIGN)" != "true" ] ; then echo "Skipping signing arm64 ddev.exe, DDEV_WINDOWS_SIGN not set"; else echo "Signing windows arm64 binaries..." && signtool sign -fd SHA256 ".gotmp/bin/windows_arm64/ddev.exe" ".gotmp/bin/windows_arm64/mkcert.exe" ".gotmp/bin/windows_arm64/ddev_gen_autocomplete.exe"; fi

$(GOTMP)/bin/windows_amd64/ddev_windows_amd64_installer.exe: windows_sign_binaries $(GOTMP)/bin/windows_amd64/sudo_license.txt $(GOTMP)/bin/windows_amd64/mkcert_license.txt winpkg/ddev.nsi
$(GOTMP)/bin/windows_amd64/ddev_windows_amd64_installer.exe: windows_sign_binaries $(GOTMP)/bin/windows_amd64/gsudo_license.txt $(GOTMP)/bin/windows_amd64/mkcert_license.txt winpkg/ddev.nsi
@makensis -DTARGET_ARCH=amd64 -DVERSION=$(VERSION) winpkg/ddev.nsi # brew install makensis, apt-get install nsis, or install on Windows
@if [ "$(DDEV_WINDOWS_SIGN)" != "true" ] ; then echo "Skipping signing amd64 $@, DDEV_WINDOWS_SIGN not set"; else echo "Signing windows installer amd64 binary..." && signtool sign -fd SHA256 "$@"; fi
$(SHASUM) $@ >$@.sha256.txt

$(GOTMP)/bin/windows_arm64/ddev_windows_arm64_installer.exe: windows_sign_binaries $(GOTMP)/bin/windows_arm64/sudo_license.txt $(GOTMP)/bin/windows_arm64/mkcert_license.txt winpkg/ddev.nsi
$(GOTMP)/bin/windows_arm64/ddev_windows_arm64_installer.exe: windows_sign_binaries $(GOTMP)/bin/windows_arm64/gsudo_license.txt $(GOTMP)/bin/windows_arm64/mkcert_license.txt winpkg/ddev.nsi
@makensis -DTARGET_ARCH=arm64 -DVERSION=$(VERSION) winpkg/ddev.nsi # brew install makensis, apt-get install nsis, or install on Windows
@if [ "$(DDEV_WINDOWS_SIGN)" != "true" ] ; then echo "Skipping signing arm64 $@, DDEV_WINDOWS_SIGN not set"; else echo "Signing windows installer arm64 binary..." && signtool sign -fd SHA256 "$@"; fi
$(SHASUM) $@ >$@.sha256.txt
Expand Down Expand Up @@ -265,13 +265,13 @@ $(GOTMP)/bin/windows_arm64/mkcert.exe $(GOTMP)/bin/windows_arm64/mkcert_license.
curl --fail -JL -S --retry 5 --retry-delay 5 --retry-connrefused -s -o $(GOTMP)/bin/windows_arm64/mkcert.exe "https://dl.filippo.io/mkcert/latest?for=windows/arm64"
curl --fail -sSL --retry 5 --retry-delay 5 --retry-connrefused -o $(GOTMP)/bin/windows_arm64/mkcert_license.txt -O https://raw.githubusercontent.com/FiloSottile/mkcert/master/LICENSE

$(GOTMP)/bin/windows_amd64/sudo_license.txt:
$(GOTMP)/bin/windows_amd64/gsudo_license.txt:
set -x
curl --fail -sSL --retry 5 --retry-delay 5 --retry-connrefused -o "$(GOTMP)/bin/windows_amd64/sudo_license.txt" "https://raw.githubusercontent.com/gerardog/gsudo/master/LICENSE.txt"
curl --fail -sSL --retry 5 --retry-delay 5 --retry-connrefused -o "$(GOTMP)/bin/windows_amd64/gsudo_license.txt" "https://raw.githubusercontent.com/gerardog/gsudo/master/LICENSE.txt"

$(GOTMP)/bin/windows_arm64/sudo_license.txt:
$(GOTMP)/bin/windows_arm64/gsudo_license.txt:
set -x
curl --fail -sSL --retry 5 --retry-delay 5 --retry-connrefused -o "$(GOTMP)/bin/windows_arm64/sudo_license.txt" "https://raw.githubusercontent.com/gerardog/gsudo/master/LICENSE.txt"
curl --fail -sSL --retry 5 --retry-delay 5 --retry-connrefused -o "$(GOTMP)/bin/windows_arm64/gsudo_license.txt" "https://raw.githubusercontent.com/gerardog/gsudo/master/LICENSE.txt"

# Best to install golangci-lint locally with "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v1.31.0"
golangci-lint:
Expand Down
56 changes: 24 additions & 32 deletions docs/content/users/install/ddev-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,12 @@ Once you’ve [installed a Docker provider](docker-installation.md), you’re re
* Projects should live under the home directory of the Linux filesystem.
WSL2’s Linux filesystem (e.g. `/home/<your_username>`) is much faster and has proper permissions, so keep your projects there and **not** in the slower Windows filesystem (`/mnt/c`).
* Custom hostnames are managed via the Windows hosts file, not within WSL2.
DDEV attempts to manage custom hostnames via the Windows-side hosts file—usually at `C:\Windows\system32\drivers\etc\hosts`—and it can only do this if it’s installed on the Windows side. (DDEV inside WSL2 uses `ddev.exe` on the Windows side as a proxy to update the Windows hosts file.) If `ddev.exe --version` shows the same version as `ddev --version` you’re all set up. Otherwise, install DDEV on Windows using `choco upgrade -y ddev` or by downloading and running the Windows installer. (The WSL2 scripts below install DDEV on the Windows side, taking care of that for you.) If you frequently run into Windows UAC Escalation, you can calm it down by running `gsudo.exe cache on` and `gsudo.exe config CacheMode auto`, see [gsudo docs](https://github.com/gerardog/gsudo#credentials-cache).
DDEV attempts to manage custom hostnames via the Windows-side hosts file—usually at `C:\Windows\system32\drivers\etc\hosts`—and it can only do this if it’s installed on the Windows side. (DDEV inside WSL2 uses `ddev.exe` on the Windows side as a proxy to update the Windows hosts file.) If `ddev.exe --version` shows the same version as `ddev --version` you’re all set up. Otherwise, install DDEV on Windows by downloading and running the Windows installer. (The WSL2 scripts below install DDEV on the Windows side, taking care of that for you.) If you frequently run into Windows UAC Escalation, you can calm it down by running `gsudo.exe cache on` and `gsudo.exe config CacheMode auto`, see [gsudo docs](https://github.com/gerardog/gsudo#credentials-cache).
* WSL2 is not the same as Docker Desktop’s WSL2 engine.
Using WSL2 to install and run DDEV is not the same as using Docker Desktop’s WSL2 engine, which itself runs in WSL2, but can serve applications running in both traditional Windows and inside WSL2.

The WSL2 install process involves:

* Installing Chocolatey package manager (optional).
* One time initialization of mkcert.
* Installing WSL2 and installing a distro like Ubuntu.
* Optionally installing Docker Desktop for Windows and enabling WSL2 integration with the distro (if you're using the Docker Desktop approach).
Expand Down Expand Up @@ -216,7 +215,7 @@ Once you’ve [installed a Docker provider](docker-installation.md), you’re re

* Verify that your Ubuntu default distro is WSL v2 using `wsl -l -v`.

2. In an administrative PowerShell run [this PowerShell script](https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_wsl2_docker_inside.ps1) by executing:
2. Open a non-administrative PowerShell terminal. However, if the commands below don't work (e.g. "the system cannot find all the information required"), you may need to reboot or open a new Powershell terminal before trying again. Run [this PowerShell script](https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_wsl2_docker_inside.ps1) by executing:

```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
Expand All @@ -234,7 +233,7 @@ Once you’ve [installed a Docker provider](docker-installation.md), you’re re

In all cases:

4. Install WSL2 with an Ubuntu distro. On a system without WSL2, run:
1. Install WSL2 with an Ubuntu distro. On a system without WSL2, run:
```powershell
wsl --install
```
Expand All @@ -246,42 +245,36 @@ Once you’ve [installed a Docker provider](docker-installation.md), you’re re

If you prefer to use another Ubuntu distro, install it and set it as default. For example, `wsl --set-default Ubuntu-24.04`.

5. In *Windows Update Settings* → *Advanced Options* enable *Receive updates for other Microsoft products*. You may want to occasionally run `wsl.exe --update` as well.
2. In *Windows Update Settings* → *Advanced Options* enable *Receive updates for other Microsoft products*. You may want to occasionally run `wsl.exe --update` as well.

6. Install Docker Desktop. If you already have Chocolatey, run `choco install -y docker-desktop`. Otherwise [download Docker Desktop from Docker](https://www.docker.com/products/docker-desktop/).
7. Start Docker Desktop. You should now be able to run `docker ps` in PowerShell or Git Bash.
8. In *Docker Desktop* → *Settings* → *Resources* → *WSL2 Integration*, verify that Docker Desktop is integrated with your distro.
9. In an administrative PowerShell run [this PowerShell script](https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_wsl2_docker_desktop.ps1) by executing:
3. Install Docker Desktop. Download [Docker Desktop from Docker](https://www.docker.com/products/docker-desktop/).
4. Start Docker Desktop. You should now be able to run `docker ps` in PowerShell or Git Bash.
5. In *Docker Desktop* → *Settings* → *Resources* → *WSL2 Integration*, verify that Docker Desktop is integrated with your distro.
6. Open a non-administrative PowerShell terminal. However, if the commands below don't work (e.g. "the system cannot find all the information required"), you may need to reboot or open a new Powershell terminal before trying again. Run [this PowerShell script](https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_wsl2_docker_desktop.ps1) by executing:

```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_wsl2_docker_desktop.ps1'))
```

10. For unusual browsers and situations that don't automatically support the `mkcert` certificate authority, [configure your browser](configuring-browsers.md).
7. For unusual browsers and situations that don't automatically support the `mkcert` certificate authority, [configure your browser](configuring-browsers.md).

Now you can use the "Ubuntu" terminal app or Windows Terminal to access your Ubuntu distro, which has DDEV and Docker Desktop integrated with it.

### WSL2/Docker Desktop Manual Installation

You can manually step through the process the install script attempts to automate:

1. Install [Chocolatey](https://chocolatey.org/install):
```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))`
```
2. In an administrative PowerShell, run `choco install -y ddev mkcert`.
3. In an administrative PowerShell, run `mkcert -install` and follow the prompt to install the Certificate Authority.
4. In an administrative PowerShell, run `$env:CAROOT="$(mkcert -CAROOT)"; setx CAROOT $env:CAROOT; If ($Env:WSLENV -notlike "*CAROOT/up:*") { $env:WSLENV="CAROOT/up:$env:WSLENV"; setx WSLENV $Env:WSLENV }`. This will set WSL2 to use the Certificate Authority installed on the Windows side. In some cases it takes a reboot to work correctly.
5. In administrative PowerShell, run `wsl --install`. This will install WSL2 and Ubuntu for you. Reboot when this is done.
6. **Docker Desktop for Windows:** If you already have the latest Docker Desktop, configure it in the General Settings to use the WSL2-based engine. Otherwise install the latest Docker Desktop for Windows and select the WSL2-based engine (not legacy Hyper-V) when installing. Install with Chocolatey by running `choco install docker-desktop`, or download the installer from [desktop.docker.com](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe). Start Docker. It may prompt you to log out and log in again, or reboot.
7. Go to Docker Desktop’s *Settings* → *Resources* → *WSL integration* → *enable integration for your distro*. Now `docker` commands will be available from within your WSL2 distro.
8. Double-check in PowerShell: `wsl -l -v` should show three distros, and your Ubuntu should be the default. All three should be WSL version 2.
9. Double-check in Ubuntu (or your distro): `echo $CAROOT` should show something like `/mnt/c/Users/<you>/AppData/Local/mkcert`
10. Check that Docker is working inside Ubuntu (or your distro) by running `docker ps`.
11. Open the WSL2 terminal, for example `Ubuntu` from the Windows start menu.
12. Install DDEV:
1. Download and run the [Windows-side installer](https://github.com/ddev/ddev/releases) (used for hosts-file management only).
2. In an administrative PowerShell, run `mkcert -install` and follow the prompt to install the Certificate Authority.
3. In an administrative PowerShell, run `$env:CAROOT="$(mkcert -CAROOT)"; setx CAROOT $env:CAROOT; If ($Env:WSLENV -notlike "*CAROOT/up:*") { $env:WSLENV="CAROOT/up:$env:WSLENV"; setx WSLENV $Env:WSLENV }`. This will set WSL2 to use the Certificate Authority installed on the Windows side. In some cases it takes a reboot to work correctly.
4. In administrative PowerShell, run `wsl --install`. This will install WSL2 and Ubuntu for you. Reboot when this is done.
5. **Docker Desktop for Windows:** If you already have the latest Docker Desktop, configure it in the General Settings to use the WSL2-based engine. Otherwise install the latest Docker Desktop for Windows and select the WSL2-based engine (not legacy Hyper-V) when installing. Download the installer from [docker.com](https://www.docker.com/products/docker-desktop/). Start Docker. It may prompt you to log out and log in again, or reboot.
6. Go to Docker Desktop’s *Settings* → *Resources* → *WSL integration* → *enable integration for your distro*. Now `docker` commands will be available from within your WSL2 distro.
7. Double-check in PowerShell: `wsl -l -v` should show three distros, and your Ubuntu should be the default. All three should be WSL version 2.
8. Double-check in Ubuntu (or your distro): `echo $CAROOT` should show something like `/mnt/c/Users/<you>/AppData/Local/mkcert`
9. Check that Docker is working inside Ubuntu (or your distro) by running `docker ps`.
10. Open the WSL2 terminal, for example `Ubuntu` from the Windows start menu.
11. Install DDEV:

```bash
sudo apt-get update && sudo apt-get install -y curl
Expand All @@ -291,9 +284,9 @@ Once you’ve [installed a Docker provider](docker-installation.md), you’re re
sudo apt-get update && sudo apt-get install -y ddev
```

13. In WSL2, run `mkcert -install`.
12. In WSL2, run `mkcert -install`.

14. For unusual browsers and situations that don't automatically support the `mkcert` certificate authority, [configure your browser](configuring-browsers.md).
13. For unusual browsers and situations that don't automatically support the `mkcert` certificate authority, [configure your browser](configuring-browsers.md).

You have now installed DDEV on WSL2. If you’re using WSL2 for DDEV, remember to run all `ddev` commands inside the WSL2 distro.

Expand All @@ -302,12 +295,11 @@ Once you’ve [installed a Docker provider](docker-installation.md), you’re re

### Traditional Windows

If you must use traditional Windows, then Docker Desktop is your only choice of a Docker provider. DDEV is supported in this configuration but it's not as performant as the WSL2 options.
If you must use traditional Windows, then Docker Desktop is your only choice of a Docker provider. DDEV is supported in this configuration but it may not be as performant as the WSL2 options.

* We recommend using [Chocolatey](https://chocolatey.org/). Once installed, you can run `choco install ddev docker-desktop git` from an administrative shell. You can upgrade by running `ddev poweroff && choco upgrade ddev`.
* Each [DDEV release](https://github.com/ddev/ddev/releases) includes Windows installers for AMD64 and ARM64 Windows (`ddev_windows_<architecture>_installer.<version>.exe`). After running that, you can open a new Git Bash, PowerShell, or cmd.exe window and start using DDEV.

Most people interact with DDEV on traditional Windows using Git Bash, part of the [Windows Git suite](https://git-scm.com/download/win). Although DDEV does work with cmd.exe and PowerShell, it's more at home in Bash. You can install Git Bash with Chocolatey by running `choco install -y git`.
Most people interact with DDEV on traditional Windows using Git Bash, part of the [Windows Git suite](https://git-scm.com/download/win). Although DDEV does work with cmd.exe and PowerShell, it's more at home in Bash.

!!!note "Windows Firefox Trusted CA"

Expand Down
9 changes: 0 additions & 9 deletions docs/content/users/install/ddev-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ Installing and upgrading DDEV are nearly the same thing, because you're upgradin

### Traditional Windows

#### Chocolatey (only on Intel machines)

```bash
# Turn off DDEV and upgrade it
ddev poweroff && choco upgrade ddev
```

#### Installer

Download and run the Windows installer (for your architecture, most often AMD64) for the latest [DDEV release](https://github.com/ddev/ddev/releases) (`ddev_windows_<architecture>_installer.<version>.exe`).

=== "Codespaces"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/users/install/docker-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ You’ll need a Docker provider on your system before you can [install DDEV](dde

### Docker Desktop for Windows

Docker Desktop for Windows can be downloaded via [Chocolatey](https://chocolatey.org/install) with `choco install docker-desktop` or it can be downloaded from [docker.com](https://www.docker.com/products/docker-desktop). It has extensive automated testing with DDEV, and works with DDEV both on traditional Windows and in WSL2.
Docker Desktop for Windows can be downloaded from [docker.com](https://www.docker.com/products/docker-desktop). DDEV has extensive automated testing using Docker Desktop, and Docker Desktop with DDEV works both on traditional Windows and in WSL2.

See [WSL2 DDEV Installation](ddev-installation.md#wsl2-docker-desktop-install-script) for help installing DDEV with Docker Desktop on WSL2.

Expand Down
Loading