First off, you need to make a small tweak to your mind-set. You aren't initially doing freelance work and then starting a company, rather you are starting a company as soon as you start doing client work. The mind-set is important because you will be more successful from the start.

You absolutely need to know JS well, and be proficient in HTML / CSS, so I'm not sure a focus on either front-end or back-end is good advice. However, with limited time you need to choose your battles well, so don't worry about mastering HTML / CSS at the start (ie, you can duplicate any site but you won't be as fast at it as someone who does this part as a regular gig.) Become proficient with Linux, but don't spend too much time there. Just learn the basics, the rest can quickly become a sand trap and your time is best spent elsewhere.

To make this work, you need six months living expenses at the start of doing client work. Three months is an absolute minimum and once you hit that point you are in critical territory. This is extremely important because this determines how you are able to plan and pick your jobs. Drop below the three month point and you are taking a hit in your job selection and rates because you are forced to take whatever comes along as opposed to having a buffer period where you can work out better gigs. This then places you in a vicious circle because not being able to select the right gigs might make getting your savings back up to six months difficult. Freelancing can be very lucrative to those who are well established in development circles, but at the beginning you will be hard pressed to even be able to pay your basic expenses.

You mentioned you are a traveler. Get out of San Francisco and move somewhere cheaper while you are just getting started. San Francisco is probably great for looking for start-ups to work for as a full timer, but you can do freelancing from anywhere. You can move back at a later time.

You might consider PHP because there are more things that you can do in the market with it due to easier hosting options and the large number of PHP content management systems available. If you were to learn a CMS such as Wordpress, Drupal or ExpressionEngine well then you could easily be landing your first clients within 3 - 6 months. CMS work is mostly configuration and converting static HTML / CSS into dynamic templates. You could focus on learning the CMS (pick just one to start) well for 2 - 3 months while also learning JS / CSS / HTML. After that, you can start looking for clients and move into PHP so that you can extend the platform.

CMS work in PHP may not sound as good as building custom applications in Python and it probably doesn't pay as well on average, but you are on a limited time frame. If you were already an A level developer in Python, then I would have different advice. You can always learn Python down the road a bit and eventually make a switch. One caveat on pay is that marketing / sales skills are ultimately more important for your rates than your programming language selection. I have seen great developers do horrible on the business side and I have seen developers with little skill raking in the cash. The business side is a totally different can of worms and will make you or break you.

Spending time learning is important but spending time building a portfolio isn't so important. A portfolio is necessary for designers, but developers just need to know their stuff. Building for friends and charities is good for learning, but it's not very helpful for your bottom line. Instead, you might focus on building small niche ideas of your own which you might be able to monetize. If nothing else, you could try selling the sites you build on Flippa. Another option (especially if you go the PHP route) is to build add-ons for content management systems and sell them on your site. Working for free should be limited to contributions to open source projects.

Always keep an open mind for alternative business models and plans. If you are a skilled marketer, you could even get started right away by bringing in work and then outsourcing that work to other developers. You could do some world travel and live very cheap by moving abroad to a place like S.E. Asia while you are getting started (that's what I did.)

Lastly, you might consider attempting to get started with a web development shop after your learning period. This will give you a chance to see how a good shop should be run while you continue to build your development chops.

I have been thinking about building out a service to help people get started in freelance web development. I will send you an email.