Why not have a somewhat open core model? The user is free to use the open source app in their local machine, but then there is a license that says you definitely can't host this on your own and charge for it.
Meanwhile for the commercial customers they can offer a managed solution.
Meanwhile for the commercial customers they can offer a managed solution.