Diabetic retinopathy (DR) is a condition that can lead to vision loss or blindness and is an unavoidable consequence of diabetes. Regular eye examinations are essential to maintaining a healthy retina and avoiding eye damage. In developing countries with a shortage of ophthalmologists, it is important to find an easier way to assess fundus photographs taken by different optometrists. Manual grading of DR is timeconsuming and prone to human error. It is also crucial to securely exchange patients' fundus image data with hospitals worldwide while maintaining confidentiality in real time. Deep learning (DL) techniques can enhance the accuracy of diagnosing DR. Our primary goal is to develop a system that can monitor various medical facilities while ensuring privacy during the training of DL models. This is made possible through federated learning (FL), which allows for the sharing of parameters instead of actual data, employing a decentralized training approach. We are proposing federated deep learning (FedDL) in FL, a research paradigm that allows for collective training of DL models without exposing clinical information. In this study, we examined five important models within the FL framework, effectively distinguishing between DR stages with the following accuracy rates: 94.66%, 82.07%, 92.19%, 80.02%, and 91.81%. Our study involved five clients, each contributing unique fundus images sourced from publicly available databases, including the Indian Diabetic Retinopathy Image Dataset (IDRiD). To ensure generalization, we used the Structured Analysis of the Retina (STARE) dataset to train the ResNet50 model in a decentralized learning environment in FL. The results indicate that implementing these algorithms in an FL environment significantly enhances privacy and performance compared to conventional centralized learning methods.