Agricultural technology is always developing in terms of creating ideal conditions for crop production. The growing demand for organic, chemical-free vegetables has an effect on celery vegetable demand and availability. Due to the technological improvements of agricultural sector, traditional greenhouse technology has been phased out in favor of the development of greenhouses equipped with smart farm systems. On the basis of this issue, the author creates a smart farm capable of determining the optimal parameters through the use of the Internet of Things (IoT). The data needed came from sensors installed in the greenhouse; the sensors collected data based on available information about the condition of the greenhouse room and the condition of the celery plant. Among the sensors used in the greenhouse, there was the DHT22 sensor, which was used to retrieve data from the room humidity sensor. Together with room temperature, BH1750 sensor retrieved light intensity sensor data, and YL-69 sensor retrieved soil moisture data. A choice would be made to perform automatic watering via relay based on soil moisture conditions. The purpose of this thesis is to construct an optimal prediction model for celery plant growth, specifically seedling growth. This study was based on two undergraduate thesis, the first was the concept for a smart farm, and the second was the Internet of Things based automation system. Utilizing the data stored in the dataset that may be converted into appropriate demands simplifies the process for farmers of estimating the optimal quality of celery plants, as does utilizing a MySQL database for raw data storage. The results of the tests indicated that the system was capable of functioning properly. The average delay value achieved when testing QoS (Quality of Service) for data transmission from the device to the database was 4.6641 s. The average throughput obtained during the QoS test for reading data from the device to the database was 592.8 bps. Meanwhile, the data used to develop the plant growth prediction model was extracted from MySQL database server and processed into a csv file dataset. The Decision Tree method was employed in this prediction model. This algorithm will produce the classification results for each attribute used, in the form of optimal and not optimal values. Keywords: Internet of Things, Sensor, MySQL, Dataset, Raspberry Pi 3B+.