Wolfram offers several services for running code in the cloud: Mathematica Online, Programming Cloud, CloudEvaluate, etc.

How can a piece of code detect if it is being run in the cloud or the standard version of Mathematica?

Certain features, such as running external programs, are not available in the cloud. A package might want to check if it's running in Mathematica Online and abort or adapt accordingly, for example replace a fast LibraryLink-based implementation of a function with a slower pure Mathematica one.


1 Answer 1


You are looking for $CloudEvaluation system variable.

For example:


(* False *)



(* True *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.