Internet-of-Things or IoT technology becomes essential in everyday lives. The risk of security and privacy towards IoT devices, especially smarthomes IoT gateway device, becoming apparent as IoT technology progressed. The need for affordable, secure smarthome gateway device or router that smarthome user prefer. The problem of low-performance smarthome gateways was running security programs on top of smarthome gateway programs. This problem motivates the researcher designing a secure and efficient smarthome gateway using Raspberry Pi hardware as an affordable smarthome gateway device and able to run both smarthome gateways and security programs. In this research, researchers implemented snort as intrusion detection system (IDS), openHab as IoT gateway applications, and well-known encryption algorithms for file encryption in Raspberry PI 3B+ model. The researcher evaluated Snort capability on network attacks and compared each of the well-known encryption algorithm efficiency. From the result, we found Rasefiberry customized snort configuration for Raspberry pi 60 percent of the simulated network attacks. Twofish encryption algorithms were found to have best encryption time, throughput, and power consumption compared to other encryption algorithms in the research. Rasefiberry architecture successfully processes both lightweight security programs and Openhab smarthome gateway programs with a lowperformance computing device such as Raspberry Pi.