When traveling with another person or a group, it seems that people feel fulfilled with the existing company that they have. When you travel alone, it's a different story. You'll definitely find yourself yearning for companionship, but you won't have to go very far to find it. If you're willing to put yourself out there, other people will be receptive to it.
One of the best parts about staying in hostels is that friendship is, literally, a bunk bed away. Or down at the bar in the hostel. Strike up a conversation with a stranger, and you might find yourself a buddy for the rest of your time in that city. Even if you're not staying in shared accommodations, you can grab an outside table at a café or sit at the bar and strike up a conversation. As a solo traveler, you're already an interesting person with a unique story that people will want to hear, if you want to tell it.