Can't connect to X11 window server using ':0'

I run Quantrocket in a Linux VM and get the following error:

quantrocket_launchpad_1|500 Server Error: INTERNAL SERVER ERROR for url: http://houston/ibg1/gateway
      quantrocket_launchpad_1|b'{"status": "error", "error": "IBController is running but IB Gateway is not accepting connections. IBController log output is below:\\nException in thread \\"main\\" java.awt.AWTError: Can\'t connect to X11 window server using \':0\' as the value of the DISPLAY variable.\\n\\tat sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)\\n\\tat sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)

If I type in bash export DISPLAY=:0 and restart lauchpad, then the error disappears.