
How to Get Electricity to a Shipping Container: 4 Options Compared
Written on November 19, 2026
by Gabriel B.
In the following categories: Container Education, How To
There are four ways to get electricity to a shipping container: an extension cord for short jobs, a buried circuit or feeder from your house or another building, a separate utility service with its own meter, or off-grid power from solar panels or a generator. For anything permanent, the usual answer is a buried line from an existing panel, installed by a licensed electrician under an electrical permit. To the inspector, the container is a separate structure, so it gets its own shut-off and grounding, and the trench has minimum burial depths.
This guide covers each option, what an inspector expects to see, the problems that come from the container being a steel box, and the decisions to make before you call an electrician.
The four options at a glance
| Option | Best for | Permit? | Main drawback |
|---|---|---|---|
| Extension cord | A few days of loading, cleaning or a one-off job | No, but temporary use only | Not allowed or safe as a permanent setup |
| Buried circuit or feeder from an existing panel | Backyard storage, workshops, home offices close to the house | Yes, in most places | Trenching, and your main panel needs spare capacity |
| Separate utility service and meter | Containers far from any building, rural land, business sites | Yes, plus the utility's approval | The utility sets the timeline and requirements |
| Solar or generator | Remote land, light loads, backup power | Check locally | Limited power, fuel or battery management |
Option 1: Extension cord (temporary only)
For a weekend of loading the container or a short repair job, a heavy outdoor-rated extension cord is fine. As a permanent supply it isn't. The Electrical Safety Foundation International says an extension cord is a temporary solution, warns against substituting cords for permanent wiring, and says not to run them through doorways or walls.
Containers make cords worse. The doors close on a steel frame with rubber gaskets, so a cord run through the doorway gets pinched every time you shut and lock it. The cord also lies on wet ground and gets driven or mowed over. If you use a cord for a short job:
- Use a cord marked for outdoor use (a "W" in the rating) and sized for the length and load. ESFI publishes a gauge-by-length chart on the same page.
- Plug it into a GFCI-protected outdoor outlet.
- Leave the doors open while it's in use, and unplug and coil it when you leave.
Option 2: A buried line from your house or another building
This is the usual setup for a container in a backyard or on a business lot near an existing building. An electrician runs a circuit or a feeder from your main panel (or a subpanel) through an underground trench to the container, where it ends in a disconnect or small panel that feeds lights and outlets.
One circuit or a subpanel?
Work out what you'll plug in before you get quotes. A few LED lights and outlets for a battery charger is a very different job from a window air conditioner, a space heater and power tools running at once.
- A single circuit is enough for lights and light-duty outlets in a storage container.
- A feeder to a small subpanel makes sense for a workshop or office, where you want separate circuits for lights, outlets and heating or cooling.
Your main panel has to have room for the new breaker and enough spare capacity for the extra load. If it doesn't, the job can grow into a panel upgrade, which is often the biggest surprise in the quote.
What the inspector will look for
The rules come from the National Electrical Code (NEC) as your state or city adopts it, with local amendments. The City of Boise's homeowner electrical permit guide (updated April 2026) is a useful plain-language summary of the parts that apply to a detached structure like a container:
- A way to cut all power at the container. The guide says a disconnect must be provided for all power to a detached building. It also lists minimum sizes: at least 30 amps for detached garages with no more than two circuits, and at least 60 amps for other installations.
- Grounding. Detached buildings with three or more circuits need their own grounding electrode system, such as ground rods. The guide also says all electrical equipment and metal boxes must be grounded.
- GFCI protection for outdoor receptacles and garage-type spaces.
- Inspections before backfilling. Boise requires a rough-in inspection before the work is covered, which for a trench means the inspector sees it open.
Your local version may differ, so treat this list as a guide to the questions to ask, not the final word. The building department that issues the permit decides.
How deep the trench has to be
Minimum cover depends on what the wires are in. The same Boise guide lists these minimums under NEC 300.5:
| Wiring method | Minimum cover |
|---|---|
| Rigid or intermediate metal conduit | 6 inches |
| PVC (nonmetallic) conduit | 18 inches |
| Direct-burial cable | 24 inches |
| Utility service lateral | 30 inches, with a warning ribbon at least 12 inches above it |
Where the wiring comes up out of the ground, it has to be protected by metal conduit or schedule 80 PVC. A trench for PVC conduit is a lot less digging than one for direct-burial cable, which is one reason electricians often choose conduit. Ask your inspector what your jurisdiction requires, because some add their own rules.
Before anyone digs, contact 811, the free national before-you-dig service, a few business days ahead so buried utility lines get marked.
Place the container with the trench in mind
If the container isn't delivered yet, you have the cheapest decision still open: where it goes. Every extra foot between the panel and the container is more trench and more wire, and long runs can need a larger wire size to keep the voltage up. Weigh this against the delivery truck's access and the ground the container sits on. Our guide to ground preparation for shipping containers covers the site side.
Option 3: A separate utility service
When the container is far from any building, on bare land, or on a business site where the owner wants it metered separately, the alternative is a new service from the utility: a meter, usually on a pole or pedestal, with its own main disconnect.
The utility decides where it can connect, what equipment it accepts and when it can schedule the work. Ask both the utility and the building department what approvals they need and in what order. If the service lateral is underground, the Boise guide lists 30 inches of cover with a warning ribbon above it. Call the utility early. Its timeline, not the electrician's, often decides when you get power.
Option 4: Solar panels or a generator
Solar
A flat container roof is an easy place to mount a few panels, and a small solar kit with a battery can run LED lights, a fan, phone and tool chargers and a security camera. It struggles with heating, air conditioning and large tools. If you want to go further, our post on an off-grid shipping container cabin powered by solar and wind walks through a bigger system. Check with your building department whether your setup needs a permit, especially if it's wired into outlets rather than plugged into a portable power station.
Generator
A portable generator works for occasional use, but where you run it matters more than anything else. The CDC says to run generators outdoors, more than 20 feet from windows, doors and vents, and never inside a home or garage, even with the doors and windows open. Apply the same rule to a container: never run a generator inside it, even with the doors open.
Problems specific to steel containers
The box conducts electricity
A wood shed doesn't become part of the electrical system. A steel container can, if a damaged wire touches the wall. That's why grounding matters more here than in a shed. Ask your electrician how they will ground the boxes and equipment and whether they will bond the container itself.
Getting wires through the wall
The wiring has to get into the container somewhere, and every hole in corrugated steel is a place for water to get in. A proper fitting and sealant at the entry point, ideally on a side wall rather than the roof, avoids leaks. If you later find water inside, our guide to telling condensation from a leak helps sort out which it is.
Plan the wiring with the insulation
If you plan to insulate, decide on the wiring at the same time. Wires either run in surface conduit on the steel walls or inside a framed wall behind the insulation, and it's much easier to plan this before the walls go up. See how to insulate a shipping container the right way.
Heating, cooling and condensation
Adding heat or air conditioning changes how moisture behaves in a steel box. A heater in an uninsulated container in winter can make condensation worse on the cold walls. Ventilation and insulation usually come first, then heating or cooling.
A simple order of steps
- List what you'll power: lights, outlets, tools, heating or cooling. This sets the size of the circuit or feeder.
- Choose the location, balancing delivery access, level ground and distance to your panel.
- Call your building department to ask about electrical permits and any zoning rules for the container itself. Our overview of whether you need a permit for a shipping container covers the structure side.
- Get quotes from licensed electricians, and ask whether your panel has capacity.
- Contact 811 before any digging.
- Have the trench inspected before it's backfilled, then the finished work.
What drives the cost
Electrical quotes vary widely by region, so a single national figure would mislead you. The things that move the price are predictable, though:
- Distance and digging: trench length, rocky soil, roots, and whether the run crosses a driveway or paved area.
- Panel capacity: a spare slot is cheap, a panel upgrade isn't.
- Size of the supply: one circuit costs less than a feeder and subpanel.
- Wiring method: conduit, cable and wire size.
- Permit and inspection fees, which your local building department lists.
- Work inside the container: number of lights and outlets, and whether it's surface-mounted or behind finished walls.
Choosing a container you'll wire
For storage with a light and a couple of outlets, a used 20ft container is the common choice. For a workshop or office where you'll add insulation, a framed wall and lighting, the extra foot of height in a new 40ft high cube leaves room for all of it. Our guide to turning a container into a secure workshop covers the rest of the build. When you know the size and the delivery address, get a free quote with delivery included.
Frequently Asked Questions
Can I run an extension cord to my shipping container permanently?
No. Extension cords are meant for temporary use and are not a substitute for permanent wiring. A cord through the container doorway also gets pinched each time the doors close. For permanent power, have a licensed electrician run a buried circuit or feeder.
Do I need a permit to run power to a shipping container?
In most places, yes. A permanent line to a container is electrical work on a separate structure, and building departments usually require a permit and inspections, including one of the open trench. Check with your local building department before work starts.
How deep does the wire to a shipping container need to be buried?
It depends on the wiring method. Under NEC 300.5 as summarized by the City of Boise, minimum cover is 6 inches for rigid or intermediate metal conduit, 18 inches for PVC conduit and 24 inches for direct-burial cable. Local rules can differ, so confirm with your inspector.
Does a shipping container need its own ground rod?
It can. Code summaries such as the City of Boise guide say detached buildings with three or more circuits need their own grounding electrode system, such as ground rods. Because the container is steel, grounding matters more than in a wood shed. Your electrician and inspector will confirm what applies.
Can I power a shipping container with solar panels?
Yes, for light loads. A small solar setup with a battery can run LED lights, a fan, chargers and a camera. Heating, air conditioning and large power tools usually need a grid connection or a much larger system.
Can I run a generator inside a shipping container?
No. The CDC says to run generators outdoors, more than 20 feet from windows, doors and vents, and never inside a home or garage even with the doors open. Treat a container the same way.
