I've worked from home now for 5 years and never want to go back to an office daily. The work I do, though, has been setup such that working from wherever actually "works". We have a central system to plan the work, open communication channels on Slack, Skype for Business, or even phone calls (haven't gotten one in about 4 years, though).
There are a few things I've learned:
1. You have to be okay with people just dropping in on you via Slack or something similar. The only time you can't allow it is when you're in a meeting or really working heads down on something complex. When someone pings, you respond. It's the digital analog (oxymoron) to passing in the hallway...
2. You need to be flexible about your time. Getting a ping at 7pm has to be okay with you if you're working with people from other time zones.
3. You do need occasional team get togethers. These are great for everyone, including the folks who actually are in the office. I used to go to the office for a week per quarter, and now it's more like a week every 6 months. 3 days is probably enough, but there has to be some face time. The best for me would probably be 3 days per quarter, but I can live with my current setup.
4. I, personally, have to have people around me, so I work from Starbucks or the library quite a bit. I'm fortunate in that I don't have a lot of critical meetings, so the background noise hasn't hurt me yet. I think a co-work place would be even cooler, but I don't have one around me and I'm afraid they'd be more expensive than my $2.50 cup of coffee a day.