Yeah you'd have to make sure the little bugger couldn't escape! They're like contortion artists, so can fit through the tiniest whole.
I watched a program on Discovery Channel where they kept an octopus in a tank (were testing its mental capacity and stuff) anyway, they noticed fish started "disappearing" from another tank but couldn't understand how as there were no bodies to be found, all the other fish were healthy and happy...
Any way, turns out the octopus would escape from its tank in the middle of the night, "walk" all the way over to the other side of the room and pick up a "snack", then walk all the way back to its tank!
Amazing!