Tempest - particularly gnarly part of SoMa so I wouldn’t rec if it weren’t a great dive bar.
Molloy’s - just south of the city in Colma, depressing cemetery city by SFO that you can access with Bart. 19th century historic saloon that’s now a bar full of a ton of characters. The taco truck outside is fantastic and known as one of the Bay’s top players.
Ruby Room - downtown Oakland by the 14th st BART stop, also pretty gnarly area these days. Red light, as the name suggests, and very open to you smoking whatever inside.