The increase in international trade and production automation has led to a global container traffic surge at ports, including Terminal Peti Kemas X, one of Surabaya's main domestic terminals. This situation requires more effective and efficient management of handling equipment, particularly internal trucks that link the dock and the stacking yard, to avoid congestion and operational delays. However, the loading and unloading performance and vessel service at this terminal are not optimal due to fluctuating container flows and suboptimal equipment allocation, particularly for quay cranes (QC) and internal trucks (IT). This study aims to optimize the number of internal trucks based on quay allocation and quay crane assignment tailored to the volume of containers being loaded and unloaded, using discrete event simulation as the primary approach. Performance is measured using two leading indicators: box/crane/hours (BCH) and vessel turnaround time (TRT). Under existing conditions, the BCH and TRT values are 23.43 boxes and 15.24 hours, respectively. Several improvement scenarios were developed by varying the number or ratio of quay crane and internal truck assignments, without adding new equipment. The scenario analysis found that the best scenario has a container volume configuration of 150 boxes with 2 QC and 7 IT assignments, while a container volume of 150 boxes has 2 QC and 11 IT assignments. This configuration can increase BCH to 25.33 boxes and reduce TRT to 11.82 hours. These findings indicate that this approach is practical in significantly improving system performance.