The surrender was at Appomattox Court House, Virginia on Palm Sunday, April 9, 1865 .