Purpose Online health communities (OHC) can transform the healthcare industry, particularly in developing economies. Technology advancement and increased health literacy pave the way for these communities to become powerful tools for empowering patients. The purpose of this study was to empirically validate the linkages between social support and how it overarchingly influences patient compliance. Following social support theory, this study delineates how support from the community affects the patient–physician relationship (PERP) and consequently patient compliance regarding the treatment plan. This study also invents the role of patient trust in an OHC in moderating the relationship between PERP and engagement. Design/methodology/approach This paper is based on social support and empowerment theories to investigate the importance of social support in improving patients’ health behaviours and health outcomes via patient empowerment, patient engagement and patient compliance. The authors surveyed users from three Facebook cancer communities in India to collect data. The authors used partial least squares structured equation modelling and necessary condition analysis (NCA) with 265 participants to support the proposed model. Findings The result demonstrates that PERP is a crucial factor for patient engagement in OHC, and patient engagement has a significant effect on patient compliance. The results also showed that trust was a significant moderator between PERP and engagement. The NCA analysis shows all the relationships are significant; however, emotional support is not a necessary condition for PERP. Research limitations/implications By empowering cancer patients and enabling them to meet their emotional and informational needs through OHCs, the study model can aid in the development of solutions that will improve compliance with their treatment in an emerging economic context. The findings indicate the potential chain reaction of social support and PERP in online cancer health communities. This study also contributes to quantifying the social impacts of online healthcare services and how to enhance the healthcare compliance framework. Originality/value This study combines social support and empowerment theory with patient, physician, and technology to provide a fine-grained picture of PERP in OHC. It explains how social support in OHC promotes self-care behaviour. This linkage validation enables readers and the community at large to gain a more nuanced understanding of how social support – through PERP, engagement and trust – enables patient compliance using primary data.