Our findings indicate that OGT in astrocytes acts as a stress sensor and modulates depression-related behaviors. Here, OGT is linked to depressive disorder.