The capital of the Portuguese colony until 1763 was Salvador, a city in eastern Brazil on the Atlantic Ocean.

An excerpt from the article 31 facts about Brazil

The city was founded on the site where Amerigo Vespucci came ashore in 1501. Salvador was founded in 1549 by Tome de Sousa. By 1650 Salvador was the largest metropolis in the southern hemisphere. The city's boom ended when the capital was moved to Rio de Janeiro in 1763.