|This feature has one or more outstanding bugs in the current release version. Please view the Bugs section.|
Soap is used by dwarves for both personal cleaning and health care. It is extremely important in health care, as without it, many dwarves will die due to infection.
Lye can be used whether it is stored in a barrel or a bucket.
Dwarves do not require soap to clean contaminants such as mud and blood from themselves - if necessary, they will use murky pools, artificial pools of water, brooks, or a well. However, using soap will occasionally generate the happy thought "recently took a soapy bath". It is possible to construct bath-houses (rooms containing pools of water, a soap stockpile, and perhaps a few nice statues) so dwarves living deep underground need not venture to dangerous cave pools or surface brooks to clean off a little mud or bloodstain. For cleaning wounds and preventing infection after surgery, however, hospitals should be kept stocked with a small amount of soap.
Soap is stored in bar/block stockpiles with the "soap" option enabled.
Soap will get used up as dwarves wash themselves. (The current rate seems to be 1/10 a bar per washing.)
Dwarves have an internal "dirtiness" level, which gets lowered when they have a bath, lowered further when they have a soapy bath and slowly builds up over time. This "dirtiness" value is connected to the chance of getting an infection if the dwarf is injured, making soap useful as a preventative as well as treatment.
A convenient way to keep an emergency stockpile of soap is to use it as a building material for workshops or constructions such as walls. When/if you need more soap, you can deconstruct and get the soap bars back. Since soap in a hospital is reserved for hospital use, this is especially useful in case you start to produce soap before setting up a hospital.
 Lye Container Difficulties
Lye that is in a bucket which also contains another substance, such as water, cannot be used for the reaction. Bug:1236 As a workaround, view the contents of the bucket, select the water and forbid it, then order the bucket be brought for trading at the depot. A small puddle of water will remain on the floor, which your dwarves will never clean up.