Upāli, it’s not easy to endure isolated wilderness & forest lodgings. It’s not easy to maintain seclusion, not easy to enjoy being alone. The forests, as it were, plunder the mind of a monk who has not gained concentration.
When Upāli asks to go into retreat, the Buddha warns him that secluded wilderness dwellings are hard to endure unless one is accomplished in meditation. He gives a long account of the training required before going into solitude, and ends by encouraging Upāli to stay in the Saṅgha.