Stenotrophomonas rhizophila has great potential for applications in biotechnology and biological control due to its ability to both promote plant growth and protect roots against biotic and a-biotic stresses, yet little is known about the mode of interactions in the root-environment system. We studied mechanisms associated with osmotic stress using transcriptomic and microscopic approaches. In response to salt or root extracts, the transcriptome of S. rhizophila DSM14405(T) changed drastically. We found a notably similar response for several functional gene groups responsible for general stress protection, energy production, and cell motility. However, unique changes in the transcriptome were also observed the negative regulation of flagella-coding genes together with the up-regulation of the genes responsible for biofilm formation and alginate biosynthesis were identified as a single mechanism of S. rhizophila DSM14405(T) against salt shock. However, production and excretion of glucosylglycerol (GG) were found as a remarkable mechanism for the stress protection of this Stenotrophomonas strain. For S. rhizophila treated with root exudates, the shift from the planktonic lifestyle to a sessile one was measured as expressed in the down-regulation of flagellar-driven motility. These findings fit well with the observed positive regulation of host colonization genes and microscopic images that show different colonization patterns of oilseed rape roots. Spermidine, described as a plant growth regulator, was also newly identified as a protector against stress. Overall, we identified mechanisms of Stenotrophomonas to protect roots against osmotic stress in the environment. In addition to both the changes in life style and energy metabolism, phytohormons, and osmoprotectants were also found to play a key role in stress protection.