This work is concerned with the effect of the nanostructure on the electrical conductivity of n -type In-doped PbTe thin films. Nanostructured thin films were prepared by varying the rate of nucleation as a function of the nature and temperature of the substrates. On low-temperature substrates, the increased rate of nucleation and the limited mobility of the atoms give rise to a nanostructured deposit with a 50 nm grain size. The broken bonds at the grain boundaries generate acceptor states in n -type films, capture electrons from the interior of the grains and give rise to p -type inversion layers between adjacent grains. In the nanostructured n -type films with the high density of grain boundaries, thermally activated hole conductivity becomes dominant and leads to its inversion from n to p type. The experimental results confirm the physical model put forward by Neustroev and Osipov [L. N. Neustroev and V. V. Osipov, Sov. Phys. Semicond. 20, 34 (1986)] regarding the creation of inversion channels (p -type conductivity), generated by the diffusion of oxygen along the grain boundaries of polycrystalline lead chalcogenide films. In the present case, these inversion channels appear on account of the acceptor states that have been generated at the grain boundaries of the nanostructured thin layers.