I've made a compost bin out of old scaffold boards - approx 80cm x 80cm square (say 30 inches). It has four sides, with no top and no bottom and it's sitting directly on soil. I've read that compost can get warm and should be kept damp. If I want the bin to last 5 years,do I need to line it to protect the wood? And if so, with what?
All untreated wood that is part of a compost bin will start to rot eventually, but how fast it will rot will depend on the type of wood you've used. I think most wood types will last about 5 to 10 years.
Plastic linings will help prevent decay, but chemicals from the plastic may leach into your compost and the plastic itself will start to decay eventually, so small plastic parts may also end up in the compost.
Alternatively, you can oil the wood to make it last just a bit longer, but it'll probably give you about 1 year extra. If you decide to oil it, it's best to use plant oils like organic hemp oil or linseed oil.
Lining it with thick plastic sheeting would give the wood a certain amount of protection on the inside but it would still be exposed to the elements on the outside unless you covered that as well. The wood will definitely last longer.
Given that you want it to last 5 years, if the wood is thick enough then you do not need to line it. The wood will start to "compost" (i.e. rot) and fall away from the sides but only after a long time and it's highly likely that it will make it to the five year mark.
My preference is to reduce the use of plastic as much as possible so I would not line it but then I'm not the one that will have to rebuild it if it doesn't last for 5 years.
Hope that helps.