According to Indonesian immigration and customs, the passport requirements are as follows: "Passports and/or passport-replacing documents must be valid for at least 6 months after the date of entry."
In other words, your passport must be valid for 6 months from the date you enter Indonesia.
This rule is strictly enforced upon entry into Indonesia!
If your passport does not meet this requirement, there is a very high chance you won't be allowed to board the plane to Indonesia. This is because airlines are responsible for flying passengers who are denied entry into Indonesia back to the country from which they departed.
Therefore, ensure your passport has sufficient validity before traveling to Indonesia.
You can add one right now!