Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Optimizely will be sunsetting Full Stack Experimentation on July 29, 2024. See the recommended Feature Experimentation migration timeline and documentation.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Install Optimizely Agent

This topic describes how to install Optimizely Agent on Linux/macOS, Windows, and Docker.

Running Agent from source (Linux/macOS)

To develop and compile Optimizely Agent from source:

  1. Install Golang version 1.20+ .
  2. Clone the Optimizely Agent repo.
  3. From the repo directory, open a terminal and start Optimizely Agent:
make setup

Then

make run

This starts the Optimizely Agent with the default configuration in the foreground.

Running Agent from source (Windows)

You can use a helper script to install prerequisites (Golang, Git) and compile agent in a Windows environment. Take these steps:

  1. Clone the Optimizely Agent repo.
  2. From the repo directory, open a Powershell terminal and run:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

.\scripts\build.ps1

.\bin\optimizely.exe

Running Agent via Docker

If you have Docker installed, you can start Optimizely Agent as a container. Take these steps:

  1. Pull the Docker image:
docker pull optimizely/agent

By default this will pull the "latest" tag. You can also specify a specific version of Agent by providing the version as a tag to the docker command:

docker pull optimizely/agent:X.Y.Z
  1. Run the docker container with:
docker run -p 8080:8080 
--env OPTIMIZELY_LOG_PRETTY=true 
--env OPTIMIZELY_SERVER_HOST=0.0.0.0
--env OPTIMIZELY_SERVER_ALLOWEDHOSTS=127.0.0.1 optimizely/agent

This will start Agent in the foreground and expose the container API port 8080 to the host.

  1. (Optional) You can alter the configuration by passing in environment variables to the preceding command, without having to create a config.yaml file. See configure optimizely agent for more options.

Versioning:
When a new version is released, 2 images are pushed to dockerhub. They are distinguished by their tags:

  • :latest (same as :X.Y.Z)
  • :alpine (same as :X.Y.Z-alpine)

The difference between latest and alpine is that latest is built FROM scratch while alpine is FROM alpine.