We studied Eurasian perch (Perca fluviatillis) and its eye parasite (Diplostomidae) communities in fourteen lakes that differed in humic content to test host-parasite-environment interaction. We hypothesised that high humic content would decrease pH and the abundance of the intermediate hosts (gastropods), potentially changing Diplostomidae community structure and affecting perch host immunity. We integrated RNA-seq, PCR-based validation and metabarcoding approaches in our analyses. RNA-seq from whole eyes revealed that 265 genes were differentially expressed in perch originating from lakes of low and high humic content. The top most significantly enriched GO terms were associated with the immune system. Further, PCR-based validation confirmed that only perch from clear-water lakes that contain low amounts of humic substances harboured Diplostomidae (prevalence close to 100%), while perch from humic lakes were free from the eye parasites.