Octopus are arguably the coolest animal you can keep. I have kept 3 or 4 of them over many years and they have a high cool factor. I would feed them live crabs such as you can buy for bait, (if you live near the sea) They seem to enjoy hunting and killing them.
You can keep a small octopus in a very small tank and you can get octopus as large as a nickel. These hatched out in my tank.
The tank must be sealed, I just drilled a small hole for an air tube. If the tank is only half filled, the octopus would probably not climb out but I would not count on it. You can use some sort of material to put around the top edge. Aquariums use outdoor carpeting. If their suction cups can't grip, they can't move.