In a large braiser preferably made of terracotta, or in a cast iron Dutch oven, sauté gently the onions in abundant olive oil until soft and translucent.
Add the garlic, along with the red pepper flakes if using, giving everything a stir. Sauté for just a few moments.
Add the octopus pieces and turn them in the soffritto. Add a splash of white wine, then cover and let the octopus simmer for about half an hour.
Add the tomato passata and let simmer for a further 30 minutes, or until the octopus is almost tender, adding a drizzle of water if need be to prevent things from drying out.
Add the potatoes and mix them in with the octopus. Top up with enough water to barely cover the potatoes. Let octopus and potatoes simmer for another 15 minutes or so, or until both are fully tender and the sauce well reduced.
Add the minced parsley and stir again and turn off the heat.
Serve while stir warm, topped with some more minced parsley for color if you like.