The perks of self-employment are plenty, but there's at least one significant drawback: the lack of an employer-sponsored retirement plan like a 401(k).

Enter the solo 401(k), or what the IRS calls a one-participant 401(k). Designed for self-employed workers, this account mimics many of the features of an employer-sponsored plan, without the drag of working for the man.

What is a solo 401(k)?

Pretty much exactly what it sounds like: an individual 401(k) designed for a business owner with no employees.

In fact, IRS rules say you can't contribute to a solo 401(k) if you have employees, though you can use the plan to cover both you and your spouse.

Solo 401(k) contribution limits

The total solo 401(k) contribution limit is up to $54,000 in 2017. There is a catch-up contribution of an extra $6,000 for those 50 or older.

To understand solo 401(k) contribution rules, you want to think of yourself as two people: an employer (of yourself) and an employee (yes, also of yourself).

Within that overall $54,000 contribution limit, your contributions are subject to additional limits in each role:

As the employee, you can contribute up to $18,000 in 2017, or 100 percent of compensation, whichever is less. Those 50 or older get to contribute an additional $6,000 here.

As the employer, you can make an additional profit-sharing contribution of up to 25 percent of your compensation or net self-employment income, which is your net profit less half your self-employment tax and the plan contributions you made for yourself. The limit on compensation that can be used to factor your contribution is $270,000 in 2017.

Keep in mind that if you are side-gigging, 401(k) limits apply by person, rather than by plan. That means if you are also participating in a 401(k) at your day job, the limits apply to contributions across all plans, not each individual plan.

Solo 401(k) tax advantages

The nice thing about a solo 401(k) is you get to pick your tax advantage: You can opt for the traditional 401(k), under which contributions reduce your income in the year they are made.

In that case, distributions in retirement will be taxed as ordinary income.

The alternative is the Roth solo 401(k), which offers no initial tax break but allows you to take distributions in retirement tax-free.

In general, a Roth is a better option if you expect your income to be higher in retirement. If you think your income will go down in retirement, opt for the tax break today with a traditional 401(k).

Because of these tax perks, the IRS has pretty strict rules about when you can tap the money you put into either type of account.

With few exceptions, you will pay taxes and penalties on any distributions before age 59½.

Covering your spouse under your solo 401(k)

The IRS allows one exception to the no-employees rule on the solo 401(k): your spouse, if he or she earns income from your business.

That could effectively double the amount you can contribute as a family, depending on your income. Your spouse would make elective deferrals as your employee, up to the $18,000 employee contribution limit (plus the 50-and-older catch-up provision, if applicable).

As the employer, you can then make the plan's profit-sharing contribution for your spouse, of up to 25 percent of compensation.

How to open a solo 401(k)

You can open a solo 401(k) at most online brokers, though you will need an Employer Identification Number. The broker will provide a plan adoption agreement for you to complete, as well as an account application.

Once you have done that, you can set up contributions. You will have access to many of the investments offered by your broker, including mutual funds, index funds, exchange-traded funds, individual stocks and bonds. If you want to make a contribution for this year, you must establish the plan by Dec. 31 and make your employee contribution by the end of the calendar year. You can typically make employer profit-sharing contributions until your tax-filing deadline for the tax year.

Note that once the plan gets rocking, it may require some additional paperwork — the IRS requires an annual report on Form 5500-SF if your 401(k) plan has $250,000 or more in assets at the end of a given year.

Arielle O'Shea is a staff writer at NerdWallet, a personal finance website.