Now that Optimizely 12 runs on .NET 5 it can be run on a Mac, and with most front enders using Macs, I thought it might be useful to demonstrate the steps on how to get it up and running on a Mac.

  • Install .NET 5.0
  • Install Docker
  • Install Powershell
    1. Install Brew (if not installed) /bin/bash -c "$(curl -fsSL"
    2. Run brew install --cask powershell
  • Environment setup tasks (these only need running once)
    1. Run powershell (pswh in terminal or from finder, mission control, etc)
    2. Run dotnet new -i EPiServer.Net.Templates --nuget-source --force
    3. Run dotnet tool install EPiServer.Net.Cli --global --add-source
    4. Run dotnet nuget add source -n Optimizely
    5. Run dotnet dev-certs https --trust
  • Setup a DB server on Docker
    1. Grab the docker compose file from my Gist (also included at the bottom of the post).
    2. In Terminal run docker compose up from where you saved the docker compose file.
  • Create a new empty project. In Powershell run the following
    1. dotnet new epicmsempty --name Training.A
    2. cd Training.A
    3. dotnet-episerver create-cms-database Training.A.csproj -S localhost -U sa -P 0pti_R0cks
    4. dotnet-episerver add-admin-user Training.A.csproj -u admin -p P4ssw0rd! -e [email protected] -c EPiServerDB
    5. dotnet build
    6. dotnet run

You can now edit you code through Visual Studio for Mac, Visual Studio Code or Rider. I would also recommend installing Azure Data Studio if you have knowledge of SQL server and you're confident querying content in the database.

Andy Blyth
Andy Blyth

Andy Blyth is a technical architect/senior C# developer, studies martial arts and attempts to write blog posts (when he remembers). He currently works as an Optimizely (Episerver) Technical Architect at the DEPT® in Manchester, UK.