XServer requirement for context creation

I was curious if it is necessary to have a XServer to create an OptiX context. My intuition would be that as long as you are not rendering to GL buffer an XServer shouldn’t be necessary to run an OptiX program (such as just generating an image straight to a file), but when running Context::create and not having an XServer open I am getting the error message:

cannot connect to X server

Is the Xserver required? If so, what is the reason for this?