In this paper, we present a three-dimensional Poisson equation solver for the electrostatic potential of a charged beam with large longitudinal to transverse aspect ratio in a straight and a bent conducting pipe with open-end boundary conditions. In this solver, we have used a Hermite–Gaussian series to represent the longitudinal spatial dependence of the charge density and the electric potential. Using the Hermite–Gaussian approximation, the original three-dimensional Poisson equation has been reduced into a group of coupled two-dimensional partial differential equations with the coupling strength proportional to the inverse square of the longitudinal-to-transverse aspect ratio. For a large aspect ratio, the coupling is weak. These two-dimensional partial differential equations can be solved independently using an iterative approach. The iterations converge quickly due to the large aspect ratio of the beam. For a transverse round conducting pipe, the two-dimensional Poisson equation is solved using a Bessel function approximation and a Fourier function approximation. The three-dimensional Poisson solver can have important applications in the study of the space-charge effects in the high intensity proton storage ring accelerator or induction linear accelerator for heavy ion fusion where the ratio of bunch length to the transverse size is large.