Yes you can but I would recommend a dedicated device.

https://bitcoin.org/en/full-node#what-is-a-full-node