2 Servers and install on 1

Can I install piwik on one server and add sites which are on another server?

Yes, see this FAQ: Can I install Piwik on one server and track visits on websites that are hosted on other servers? - Analytics Platform - Matomo