We consider a multipartite system consisting of two noninteracting qubits each embedded in a single-mode leaky cavity, in turn connected to an external bosonic reservoir. Initially, we take the two qubits in an entangled state while the cavities and the reservoirs have zero photons. We investigate, in this six-partite quantum system, the transfer of quantum discord from the qubits to the cavities and reservoirs. We show that this transfer occurs also when the cavities are not entangled. Moreover, we discuss how quantum discord can be extracted from the cavities and transferred to distant systems by traveling leaking photons, using the input-output theory.