Peer-assisted cloud storage systems use the unutilizedresources of the clients subscribed to a storage cloudto offload the servers of the cloud. The provider distributesdata replicas on the clients instead of replicating on the localinfrastructure. These replicas allow the provider to providea highly available, reliable and cheap service at a reducedcost. In this work we introduce NileStore, a protocol forreplication management in peer-assisted cloud storage. Theprotocol converts the replica placement problem into a lineartask assignment problem. We design five utility functionsto optimize placement taking into account the bandwidth,free storage and the size of data in need of replication oneach peer. The problem is solved using a suboptimal greedyoptimization algorithm. We show our simulation results usingthe different utilities under realistic network conditions. Ourresults show that using our approach offloads the cloud serversby about 90% compared to a random placement algorithmwhile consuming 98.5% less resources compared to a normalstorage cloud.