In what sense was it a righteous war?
It may be "righteous" to abolish slavery but the wide spread notion that Lincoln was motivated to fight the confederacy by his desire to free slaves and abolish slavery doesn't totally comport with the facts or his own statements and actions before the war and during the war.
Consider this:
So he was prepared to permit slavery in the rebelliously states to continue as long as they gave up their challenge to federal authority.
Subsequently, when Lincoln issued the Emancipation Proclamation, it only "freed" the slaves in the confederacy, and in fact, did not even apply to every place in the confederacy.
Further, his Emancipation Proclamation did not free the slaves in the non-rebel "northern" states - and there were plenty there at the time. And it did not abolish or outlaw the owning of slaves in the north.
At its heart the War of Northern Aggression was a war of power politics to assert the dominance of the northern industrialists. The agricultural south was fueled by slave labor which made it relatively autonomous and able to prosper independently of the industrialized north and the power bloc that dominated the federal government.
The Secession, leading to the Civil War did not garner popular support from the North until the populist introduction of freeing slaves was instituted in the Union War platform.
The initial revolt of the Southern States was because of unfair taxation of cotton and other items of commerce, creating an unfair balance of economics between the Rich north and the impoverished south.
When Lincoln included the abolition of slavery, which then rallied church and religious support for the war, only then did the civil war gain become a “righteous” war.. The elevation of slavery became an emotional subject, even though many southern farms had no slaves, but the slave traders lived mostly in the north. The war was no longer a matter of economics, but a matter of emotions.