This work is aimed at finding optimal conditions for the synthesis of CdS films in order to obtain films of controlled thickness and high homogeneity. The presence of Cd(OH)2 in the synthesized films was revealed. The optimal parameters for the synthesis of CdS films are found