If the idea of running out of money in retirement gives you night terrors, you're not alone. Nearly half of all Americans worry about outliving their finances, and for good reason. Surveys repeatedly show that we aren't saving enough to fund 30 years of work-free living.

If you're in that camp, you can set yourself up better by addressing the problem head-on now. There are two keys to success when you're short on savings and nearing retirement age. First, take action today. And then, plan to keep working at least part-time until you can firm up your finances. Here are four things you can do to get started.

1. Build an emergency fund

If you don't already have a robust emergency fund, start saving for one today. Plan to stockpile three to six months' worth of living expenses. You can make this easy on yourself by transferring amounts to your emergency fund automatically on every pay day.

Older woman reviewing her finances while seated at her desk.

Image source: Getty Images

While you're still working, the emergency fund protects you against job loss and unexpected expenses. But your emergency fund becomes even more important once you retire. As a retiree with limited resources, you'll be on a fixed budget. At that point, even small expenses that you could previously cover with your paycheck can be financially disruptive. Having the extra cushion of emergency cash on hand helps you manage through those budget busters -- so you don't have to pull from your funds invested in retirement accounts that are growing and producing income for you.

This system works as long as you are disciplined about replenishing your emergency fund when you need to use it. If you take $200 out to pay the plumber, for example, save an extra $20 or $25 per month until it's paid back.

2. Create a passive income stream

The best way to overcome a retirement savings shortfall is to keep producing income. But if you don't want to stay at your job forever, it's time to find new ways to make money. And in this digital age and gig economy, you can generate cash from both your assets and from your hobbies.

Making money with your assets

If you have extra cash on hand, you could invest in dividend stocks. But the next obvious starting point for a second revenue stream is your home, if you own it. You can rent out or sublease an extra room long-term by advertising in the local college newspaper or Craigslist. Or, if you prefer less commitment, list your extra living space on Airbnb for short-term rentals. Depending on where you live, you might even be able to rent out your place as an event space on Splacer or movie set on Giggster.

If you have a car, you can pick up a side gig driving for Uber or Lyft. You could also rent your driveway on Pavemint or your garage on Store At My House. You can even rent out your camera, bicycle, and other random items on Fat Llama.

Making money with your hobbies

Income-producing hobbies are nice to have in retirement, as they keep you both funded and entertained. You can sell your photography on Shutterstock or homemade jewelry on Etsy. You can also pick up handyman or gardening jobs on TaskRabbit. Or, find students in need of tutoring at Wyzant. You can even get paid to walk dogs by setting up a profile on Rover or Wag.

Find your niche and start building a customer base now. Any cash you earn pre-retirement can go into your emergency fund or long-term savings.

3. Know what you can spend

There's no getting by in retirement without a budget. Start by looking at your total savings in your retirement plans. Multiply that number by 4% -- the answer is a rough estimate of how much you can afford to take out of your retirement account each year. If you qualify for Social Security benefits and you're nearing full retirement age, add your estimated annual benefit to the 4% to get to your total retirement income.

Now make a list of your living expenses, including annual bills like property tax and insurance. Compare your total annual living expenses with the total income you calculated above. Your expenses will probably be higher, but by how much? If you have a huge gap to cover, consider doing these three things:

  1. Keep working
  2. Increase your monthly contributions to your retirement account
  3. Reassess your situation in a year

If the shortfall is on the lower side, you might be able to trim your expenses and build up your passive income streams to cover the gap. Make that your immediate goal, but keep working your regular job in the meantime.

4. Use insurance to protect against major expenses

Minimize your risk of a financially devastating accident by keeping your homeowners or renters insurance policy active, and carrying ample insurance on your car. And if you decide to rent out your home or car for extra income, look into an umbrella policy as well. Umbrella insurance provides extra liability coverage over your base policies, which can protect your savings if you get sued.

Plan today for retirement tomorrow

So, you weren't able to save much earlier in life. That's old news, and now it's time to look ahead and plan for at least a partial retirement.

The first step is knowing where you stand financially. Identify the gap between where you are and where you need to be. Then, make a plan to cover it -- by saving more, adding to your income, and cutting back on expenses. It's not sexy advice, but it's the only way to make sure your cash doesn't run out before your life does.