Want to avoid last-minute ATM runs. Do most hostels in Djibouti take card payments at check-in
My experience was that cash is king, and you'll rely on it heavily. Even if a place says it takes cards on a booking website, the machine might not work or they'll try to charge a hefty fee. I'd recommend taking out a good amount of Djiboutian Franc from a bank and using that for everything, including your hotel. Be sure to have smaller bills as well for taxis and local markets.
You'll be using cash for almost all your payments. While some larger hotels might accept cards, most hostels will not. I stayed at an independent guesthouse that only accepted cash. My advice is to assume your cards won’t work and get local currency from a bank. Make sure to withdraw from an ATM located inside a bank during business hours for safety.
Don't even bother with cards. I was just in Djibouti last year, and I did not see a single hostel that was set up to take a card. It's a very cash-based economy. I stayed at a small guesthouse near the city center and the owner was very clear that they only accepted cash. You should assume that all your hotel payments will be in cash. It's best to have plenty of local currency on hand.
You're going to want to carry a lot of cash. The financial infrastructure here is still developing, and you'll find that card payments at most hostels and guesthouses are not a thing. The vast majority of places are cash-only, and you'll need the local currency, the Djiboutian Franc (DJF). My advice is to bring US dollars with you to exchange at a bank, as ATMs are not reliable for foreign cards and are very limited.