Portoferraio is a town and comune in the province of Livorno, on the edge of the eponymous harbour of the island of Elba. It is the island's largest city.