- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.
- Windows Subsystem for Linux (version 2).
- Docker Desktop for Windows.
- Windows Terminal (A Windows Store application).
- Install Windows Subsystem for Linux (version 2) aka WSL
- Install Docker Desktop For Windows
- Install and configure SquareOne Global Docker in the VM
- Install CA Certificate in Windows
- Configure Windows DNS / nameservers
- Complete launching the project
IMPORTANT: you must have CPU virtualization enabled in your BIOS to use WSL. If you get an error after rebooting that WSL can't be started, follow these Red Hat Instructions.
- Install Windows Terminal from the Windows App Store.
- Launch Windows Terminal as an administrator (search for terminal, right click and run as administrator).
- Stop any built in Windows HTTP instances using port 80:
net stop http /y
and disable from start up:sc.exe config "W3SVC" start= disabled
- Install WSL:
wsl --install
to install the default Ubuntu VM (Virtual Machine) and reboot once asked to.
- Download the installer and follow the instructions.
- Launch Docker Desktop, it should automatically configure itself for WSL support once terms are agreed to etc...
NOTE: We're going to use the "projects" folder in your Linux user's home directory to store your Tribe projects, aka
~/projects
.
We're going to configure the Ubuntu VM with the proper packages and install the so
CLI tool for managing Tribe local environments.
- Launch Windows Terminal.
- Run
wsl
to start the VM and create your username and password when asked. - Copy the installation command from the main README and paste it into the terminal window.
- Once the installation is complete, open a new Windows Terminal tab and restart the VM by running:
wsl --shutdown
and thenwsl
to start it back up again. - Once back inside the VM shell, run the following to create a projects folder in your home directory and clone the SquareOne framework:
mkdir ~/projects; cd ~/projects; git clone https://github.com/moderntribe/square-one/ && cd square-one
- Start the project to download docker containers and generate SSL certificates:
so start
. Watch carefully for any errors, if everything goes smoothly, continue to the next section.
We've now automatically generated a CA certificate, but Windows doesn't know to trust it yet.
- In your Windows taskbar, search for certificates and click on Manage Computer Certificates from the results.
- From the left menu, expand Trusted Root Certificate Authorities > Certificates.
- From the top menu, select Action > Import and once you're asked to browse for a file, enter
\\wsl$\Ubuntu
into the Explorer bar and then navigate tohome/<your picked username>/.config/squareone/global/certs/
inside the VM. Change the dropdown to "All Files", and select thetribeCA.pem
file. When asked, make sure the certificate is placed in the Trusted Root Certificate Authorities Store. - Fully restart all instances of your web browser.
You now have custom nameservers running inside the WSL VM, and you can use these to not have to adjust your hosts file manually.
- Bring up your network adapter's properties, and select Internet Protocol Version 4 (TCP/IPv4) properties
- Enter
127.0.0.1
as the preferred server, and any valid nameserver as the alternate. For example,1.1.1.1
is Cloudflare and8.8.8.8
is Google.
- Open Windows Terminal as an administrator.
- Run:
netsh interface show interface
and note the Interface Name of the adapter that is connected, something like "Ethernet", "Local Area Network" or your Wi-Fi adapter's name. - Run the following, but replace with the proper interface name:
netsh interface ipv4 add dnsservers "<Interface Name Here>" address=127.0.0.1 index=1
- Again, replace the proper interface and run:
netsh interface ipv4 add dnsservers "<Interface Name Here>" address=1.1.1.1 index=2
TIP: You can find your files by opening Windows Explorer and placing
\\wsl$\Ubuntu
in the address bar. Navigate tohome/<your picked username>
and you can mount that folder as a Windows drive and open it in your preferred IDE to begin coding.
- Return to your WSL VM, by opening a Windows Terminal window and typing
wsl
. - Return to the project we originally created:
cd ~/projects/square-one
. - Bootstrap the project to create your project's databases, WordPress user and build the frontend:
so bootstrap
and follow the onscreen instructions. - The project should automatically launch in your browser at
https://square1.tribe
. - Review the CLI usage instructions and have fun!