Abstract. The behaviour of a rooftop-mounted generic H-rotor Darrieus vertical-axis wind turbine (H-VAWT) is investigated numerically in realistic urban terrain. The interaction of the atmospheric boundary layer with the different buildings, topography, and vegetation present in the urban environment leads to the highly turbulent-inflow conditions with continuously changing inclination and direction. Consequently, all these factors can influence the performance of a VAWT significantly. In order to simulate a small H-VAWT at rooftop locations in the urban terrain under turbulent-inflow conditions, a computational approach is developed. First, the flow field in the terrain is initialized and computed with inflow turbulence. Later, the mesh of wind turbine is superimposed on the mesh of the terrain at two distinct locations and different heights for further computation in the turbulent flow field. The behaviour of the H-VAWT is complex due to the 3D unsteady aerodynamics resulting from continuously changing the angle of attack, blade–wake interaction, and dynamic stall. To get more insight into the behaviour of a rooftop-mounted H-VAWT in turbulent flow, high-fidelity delayed detached-eddy simulations (DDESs) are performed at different rooftop positions and the results compared against the behaviour under uniform-inflow conditions in the absence of inflow turbulence. It is found that the performance of a wind turbine is significantly increased near the rooftop positions. The skewed flow at the rooftop location increases the complexity. However, this effect contributes positively to increasing the performance of H-VAWT wind turbines.