Growing cannabis at home can be risky, depending on where you’re growing it. Especially in the United States, since a possession charge can land you in jail with a minimum sentence - and a permanent record in the police system. However, there are plenty of ways to find out. For legalities, the details will not be disclosed in detail here.
Cannabis, more commonly known as marijuana, can be grown in a lot of places. Cop shows often feature reenhouses that have been made in offices, basements, and abandoned warehouses.
The environment needs to be warm, but that’s all one can gather from this kind of peek at the growth of marijuana. Online searches can probably show more details, but it depends on where you look and where you live.