Remote worker here for the last 3 months pulling a silicon valley salary. Here is how it happened.
1) Domain/specialization. Thought I've got generalist skills as well, have lots of years in a specialized category of enterprise software.
2) Flexible Company. My employer has a small minority of remote developers.
3) Negotiated it up front. I felt the initial offer was below what I wanted and was worth and they were not the type of outfit that payed very high by valley standards. They wouldn't budge on salary so I proposed remote at the salary there were offering. They countered with remote after one year. I said ok. Busted my butt for one year and here I am back in my home state where I can afford a decent house.