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.