We study the threshold of longitudinal instability driven by coherent synchrotron radiation in a rectangular chamber in electron storage rings. Starting with Maxwell's equation, we first derive a point-charge wakefield for longitudinal motion. Then we use the wake, along with the Vlasov-Fokker-Planck equation, to show that the threshold can be described by a simple scaling law of ξ ¼ ξ th ðχ; A;βÞ, where ξ is a dimensionless current, χ is the shielding parameter, A is the aspect ratio of the vacuum chamber, andβ is the damping rate relative to the rate of synchrotron oscillation. We further investigate the threshold with simulations for various values of aspect ratios. In particular, for a square chamber, we find that ξ th ≈ 0.25, which is a factor 2 lower than the threshold in free space.