This study aims to design a hand sanitizer and automated portal based on the NodeMCU microcontroller using an infrared sensor. This study uses the development model developed by Borg and Gall. The development procedure includes the exploration and product testing stages. The results of the development obtained a tool in the form of a hand sanitizer and an automated portal based on the NodeMCU microcontroller using an infrared sensor to prevent the spread of virus in West Sumbawa Regency. The trial of using the product was carried out in class XI of SMA Negeri 1 Brang Rea. The trial was carried out twice, namely the initial field trial with 10 test subjects by the teacher and the final field trial with 20 student test subjects. Initial trials obtained assessment data on media/products, namely 62 of the maximum number of assessments of 69 with a percentage of 89.2% which stated that the hand sanitizer product and the NodeMCU microcontroller-based automated portal using infrared sensors were feasible to be used as a tool to prevent the spread of virus in West Sumbawa Regency. The final trial obtained data on student assessment of the product, namely 154 of the maximum number of assessments of 171 with a percentage of 90.1% which was categorized as suitable for use. These results indicate that the design of the Hand Sanitaizer and automatic portal based on the nodemCU microcontroller is feasible to be used as a product/media to prevent the spread of virus in West Sumbawa Regency.