The primary difference between onsen and ryokan relates to whether or not you can sleep there. Not all onsens have their own accommodations or are situated particularly close to them. On the other hand, while Dogo Onsen in Shikoku has many hotels nearby, including some ryokans, it is not itself a ryokan.