Ubud is about 15 km from the ocean.
If you're driving to a town near the beach or coastline, you could try Nusa Lembongan.
How far is Charleston from the ocean
How far is Berkeley from the ocean
How far is Sioux Falls from the ocean
How far is Omaha from the ocean
How far is Lexington from the ocean
How far is Washington, DC from the ocean
How far is Mount Shasta, CA from the ocean
How far is Alexandria, VA from the ocean
How far is Tahoe City from the ocean
How far is Sorrento from the ocean