Capillary electrophoresis with capacitively coupled contactless conductivity detection (CE-C4D) has the advantages of high throughput (simultaneous detection of multiple ions), high separation efficiency (higher than 105 theoretical plates) and rapid analysis capability (less than 5 min for common inorganic ions). A compact CE-C4D system is ideal for water quality control and on-site analysis. It is suitable not only for common cations (e.g. Na+, K+, Li+, NH4+, Ca2+, etc.) and anions (e.g. Cl-, SO42-, BrO3-, etc.) but also for some ions (e.g. lanthanide ions, Pb2+, Cd2+, etc.) that require complex derivatization procedures to be detected by ion chromatography (IC). However, an obvious limitation of the CE-C4D method is that its sensitivity (e.g. 0.3-1 μM for common inorganic ions) is often insufficient for trace analysis (e.g. 1 ppb or 20 nM level for common inorganic ions) without preconcentration. For this technology to become a powerful and routine analytical technique, the system should be made compact while maintaining trace analysis sensitivity. In this study, we developed an all-in-one version of the CE-C4D instrument with custom-made modular components to make it a convenient, compact and high-performance system. The system was designed using direct digital synthesis (DDS) technology to generate programmable sinusoidal waveforms with any frequency for excitation, a kilovolt high-voltage power supply for capillary electrophoresis separation, and an "effective" differential C4D cell with a low-noise circuitry for high-sensitivity detection. We characterized the system with different concentrations of Cs+, and even a low concentration of 20 nM was detectable without preconcentration. Moreover, the optimized CE-C4D setup was applied to analyse mixed ions at a trace concentration of 200 nM with excellent signal-to-noise ratios. In typical applications, the limits of detection based on the 3σ criterion (without baseline filtering) were 9, 10, 24, 5, and 12 nM for K+, Cs+, Li+, Ca2+, and Mg2+, respectively, and about 7, 6, 6 and 6 nM for Br-, ClO4-, BrO3- and SO42-, respectively. Finally, the setup was also applied for the analysis of all 14 lanthanide ions and rare-earth minerals, and it showed an improvement in sensitivity by more than 25 times.