Large-scale natural disasters can severely damage the energy and water infrastructure, leading to disruption of services. In addition to raising possible health risks, lack of access to electricity and water can impede or prolong recovery from the disaster. To be resilient against such events, the electric power grid and the water distribution network must be able to continue operating with minimal impact on end-users and with constricted costs. Naturally, one approach is to reinforce the energy and water infrastructure against natural hazards. However, this may be cost-prohibitive or even infeasible. An alternative solution is to allocate sufficient localized resources such that these networks can continue operating at a decentralized scale until the main network is repaired and restored. In this paper, a solution is proposed to design a localized water and energy system that can serve a community affected by a natural disaster, with little external support. An optimization model is developed to optimally allocate resources, e.g., distributed energy resources and water storage capacity, based on the needs of the community and subject to operational constraints. Such decentralized systems can significantly improve the resilience of the energy and water networks and assist affected communities in the aftermath of disaster events.