I think most of us who study Civil War Raleigh recognize that Union raids from the coast helped spur the building of defenses around the city in 1863. By mid-year, Union cavalry had begun to attack the Wilmington and Weldon Railroad, one of the principal routes of supply for Petersburg and Richmond.
I thought it would be useful to post the following map of Confederate railroads, which shows the Wilmington and Weldon, but also the interconnections between railroads in the south and mid-Atlantic. You can see from the map that the railroad ran uncomfortably close to Raleigh, less that 50 miles at some stretches. So it’s understandable that the attacks on places like Kenansville, Tarboro, and Rocky Mount caused much concern. If Federal forces had succeeded at taking possession of the railroad, Raleigh would have become a natural target.

Credit for this map: United States Military Academy
ARB — 4 February 2020