Have to be raspberry pi?

YES!
You can use hass.io on a generic linux server
Installation - Home Assistant
or you can run HA in a virtual environment
Installation - Home Assistant

Here’s a topic about the difference of hass.io and a venv (like hassbian)
What is the difference between Hassbian and HASS.io?