If you’re using fresh octopus, freeze it for a few days. Let it thaw in the refrigerator for 18–24 hours, or at room temperature for 6–8 hours.
Bring water to a boil in a pot. Add the octopus, then reduce the heat to the barest simmer and cook for 30 minutes.
Take out the octopus, let it cool, and cut it into 1-inch (2–3 cm) bite-size pieces. Set the cooking liquid aside.
Finely chop the onion and garlic.
Heat a large pot, then add the olive oil and onion. Sauté the onion over medium heat until translucent. Add the garlic and sauté for another half minute.
Add the canned tomatoes, olives, capers, tomato paste, and the spices: thyme, marjoram, parsley, and lemon zest. Pour in the wine, add the water or octopus cooking liquid, and bring everything to a boil.
Add the octopus and cook over low heat for 30 minutes.
Meanwhile, peel the potatoes and cut them into large cubes. Add them to the octopus along with the green peas. Once it comes back to a boil, cook for another 25–30 minutes, until the potatoes are tender.
Cook the pasta according to the package directions in boiling salted water. Drain, and serve with the octopus ragù as the sauce.