There are difficulties in analyzing the stability of microgrids since they are located on various network structures. However, considering that the network often consists of passive elements, the passivity theory is applied in this paper to solve the above-mentioned problem. It has been formerly shown that when the network is weakly strictly positive real (WSPR), the DC microgrid is stable if all interfaces between the microgrid and converters are made to be passive, which is called interface passivity. Then, the feedback passivation method is proposed for the controller design of various DC–DC converters to achieve the interface passivity. The interface passivity is different from the passivity of closed-loop systems on which the passivity based control (PBC) concentrates. The feedback passivation design is detailed for typical buck converters and boost converters in terms of conditions that the controller parameters should satisfy. The theoretical results are verified by a hardware-in-loop real-time labotray (RTLab) simulation of a DC microgrid with four generators.