Context. The comet 103P/Hartley 2, target of the EPOXI mission (NASA), was supposed to be observed for 3 days around its perihelion, from October 27 to 29, 2010, but photometric data were obtained only on October 27 and 29, 2010. On both dates, the comet visibility was not optimal due to its proximity to the Moon, as projected on the plane of the sky, whereas on October 28, the comet could not be observed at all. Aims. The goal of the campaign was to give ground support to the EPOXI mission by establishing a baseline of activity at perihelion to be compared with in situ activity observed by the space mission about 7 days later on Nov. 4, 2010. We aimed to assess gas and dust production rates, to study the gas and dust coma morphology, to investigate the behaviour of the refractory component by analysing the dust colour variations with date and with projected cometocentric distance, ρ, and to determine the slope of the surface brightness profiles, B, as a function of ρ. Methods. Long-slit spectra and optical broad- and narrowband images were acquired with the instrument ACAM mounted on the William Herschel Telescope (WHT) at La Palma Observatory. We investigated the evolution of the dust coma morphology from the images acquired with specific continuum cometary filters (in the blue and red wavelength region) with image-enhancing techniques. We studied (1) the gas and dust production rates; (2) the dust radial brightness profiles; (3) the profiles of the CN, C2 ,C 3 and NH2 column densities, and (4) the CN and C3 coma morphologies. The dust and gas profiles were azimuthally averaged, as well as measured in both the E-W direction (∼Sun-antisolar direction) and in a direction defined by the slit orientation at PA 70 to 250 degrees. Results. The morphological analysis of the dust coma reveals only one structure. Aside from the dust tail in the west direction, a bright jet is detected in images acquired on October 27 at 03:00-04:00 UT. This jet turns on and off and it is not clearly detected at any time on the images obtained during October 29. This structure is enhanced by making use of the radial renormalization and the LarsonSekanina method. It is also confirmed by the distortion of the isophotes at the same position angle (PA). The Afρ parameter, a proxy to the dust production rate, and the gas (CN, C3 ,C 2 ,a nd NH 2) production rate, Qi, have been measured at perihelion, rh ≈ 1.058 AU. The quotient QC2 /QCN ∼ 1.3 places 103P/Hartley 2 as a typical comet in terms of long-chain hydrocarbon abundance. The gas-to-dust mass ratio is ∼3−6, indicating that 103P/Hartley 2 is a relatively gas-rich comet. At perihelion, Afρ, as measured in a circular aperture of ∼4700 km ranges from ∼60 cm in the blue to ∼110 cm in the red, which indicates an overall change in the optical properties of the dust grains. On the other hand, the Afρ is rather stable in the innermost coma when it is computed from the spectroscopic measurements within several continuum spectral ranges from 482–685 nm. Both 2D dust colour maps and profiles in the directions imposed by the slit indicate that there are variations with ρ with a trend towards bluer dust colour with increasing ρ. This could indicate sublimation of ices as the cameras on board the EPOXI mission have shown. The average dust reddening is ∼24%/100 nm. The azimuthally averaged surface brightness profiles of the continuum from the broad band images can be well fitted with m ∼ 1i n the tail direction, whereas in the opposite direction the dust profiles are much flatter at ρ ≤ 10 000 km. The azimuthally averaged profiles of the comet images acquired with the blue and red continuum cometary filters show a nominal behaviour of log B ∼− m log ρ with m ∼ 1.