In your case, 2 feet above anything within 10 feet measured horizontal. If roof is pitched upward, simply measure from outlet, 10 feet sideways. It needs to be 2 feet over that height. When you can measure 10 feet in all directions sideways without hitting anything you're fine.
So a flat roof would be ok to be 2 feet above roof edge. A pitched roof, measure horizontal towards roof, depending on how steep, where the 10 foot horizontal (level) measurement hits roof, it needs to go higher. If the chimney would be on a porch roof, with taller building wall (or another building) within 10 feet, it needs to go 2 feet above that obstruction that is 10 feet to the outlet.
When going through a roof, it also has to be 3 feet above the roof at penetration point (for sparks falling onto roof) which doesn't pertain to your install.
I ask about diameter because this is a 4 inch outlet stove. Somewhere the pipe is going from 4 to 6. That is where the expansion takes place and exhaust gasses cool as they expand into the larger area. Whatever the stove is built with for flue outlet, is the "size" of the stove. The connector pipe and chimney should be this size. Never decrease, that is not allowed by code. An increase of 3 times the size is legal, but not recommended for efficiency and being able to keep clean causing a fire hazard from creosote formation.