An electron beam ion trap (EBIT) creates and confines highly charged ions (HCIs). To maximize the movement of the EBIT towards and away from the accelerator beamlines, we adopted permanent magnets, thereby reducing the size and maintenance costs associated with the EBIT. A magnetic field of 0.84 T at the trap center provided a trap capacity of approximately 107\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${10}<^>{7}$$\end{document} charges. By sweeping the electron beam energy from 2.4 keV to 3.3 keV at an electron beam current of 10 mA, the silicon drift detector successfully measured the KLL lines of the HCI states of argon and confirmed the presence of up to He-like argon ions. Before measuring the highly charged irons for astrophysics purposes, we conducted preliminary experiments to connect the EBIT with the Pohang Accelerator Laboratory X-ray Free Electron Laser (PAL-XFEL) hard X-ray beamline. In this study, we present the initial operation of the compact EBIT at an XFEL facility, demonstrating its X-ray fluorescence measurement capability.