It depends. If the company is in SF, they'll either pay you an SF salary, or a salary relative to where you're working from (see Buffer's ad in WhoIsHiring). But more abstractly: don't take a salary you won't be happy with.
It really depends whether you want to work remotely long term or short term.