Nowadays, conventional agriculture farms lack high-level automated management due to the limited number of installed sensor nodes and measuring devices. Recent progress of the Internet of Things (IoT) technologies will play an essential role in future smart farming by enabling automated operations with minimum human intervention. The main objective of this work is to design and implement a flexible IoT-based platform for remote monitoring of agriculture farms of different scales, enabling continuous data collection from various IoT devices (sensors, actuators, meteorological masts, and drones). Such data will be available for end-users to improve decision-making and for training and validating advanced prediction algorithms. Unlike related works that concentrate on specific applications or evaluate technical aspects of specific layers of the IoT stack, this work considers a versatile approach and technical aspects at four layers: farm perception layer, sensors and actuators layer, communication layer, and application layer. The proposed solutions have been designed, implemented, and assessed for remote monitoring of plants, soil, and environmental conditions based on LoRaWAN technology. Results collected through both simulation and experimental validation show that the platform can be used to obtain valuable analytics of real-time monitoring that enable decisions and actions such as, for example, controlling the irrigation system or generating alarms. The contribution of this article relies on proposing a flexible hardware and software platform oriented on monitoring agriculture farms of different scales, based on LoRaWAN technology. Even though previous work can be found using similar technologies, they focus on specific applications or evaluate technical aspects of specific layers of the IoT stack.