The utilization of renewable biomass resources for biofuel production has gained widespread popularity as an effective means of converting waste into a valuable resource. This study investigated the optimization of biodiesel production from coconut oil (CO) using a bifunctional catalyst derived from crab shell and coconut shell. The catalyst underwent characterization through Fourier transform infrared spectroscopy, scanning electron microscopy, X-ray diffraction, and Brunauer-Emmett-Teller. The acid precursor for the bio-based bifunctional catalyst was created from carbonized and sulfurized coconut shell, while the base precursor was obtained from calcined and KOH-treated crab shell. The experimental design was optimized using Box-Behnken design for the simultaneous esterification and transesterification of CO. Response surface methodology was employed to model and optimize the process. Under the determined ideal conditions, which included a methanol to oil ratio of 16.75:1, a 1.00% catalyst loading, a temperature of 58.19 °C, and a reaction time of 78.76 minutes, a CO methyl ester yield of 85.73% was achieved under experimental conditions. This yield closely aligned with the predicted range of 85.84% as per the model. The resulting methyl ester (biodiesel) obtained under these optimized conditions exhibited physicochemical properties well within the requirements specified by ASTM D6751 set by the International Organization of Standardization.