Learning how to use a generator in Project Zomboid is one of those jobs you’ll be glad you handled before the electricity goes off. Find the machine, learn to connect it, fuel it and place it outdoors. The last point isn’t just a suggestion: generator fumes can kill your survivor, even if the fridge is working perfectly.
You don’t need to electrify an entire town. Usually you’re trying to keep a fridge and a few important appliances running in your safehouse, or power fuel pumps at a petrol station after the grid goes down. That makes placement far more important than it first appears.
How to use a generator in Project Zomboid: where to find one

I’d start in the sorts of places where you’d expect someone to store bulky equipment: garages, tool sheds, warehouses and storage units. Generators can also appear in other industrial or utility-related locations. They’re heavy, so finding one on foot doesn’t mean you should immediately carry it halfway across town.
If possible, bring a car and clear the area before trying to load the generator. Carrying it severely restricts what you can do, and you don’t want to discover a group of zombies between you and the boot. It helps to have your intended base picked out before moving it.
How do you learn to connect and operate one?
The classic route is reading How to Use Generators. Look for that magazine among other instructional literature while looting. In Build 42, getting to Electrical 3 provides another way to acquire the relevant knowledge, and Electrician is an occupation that already knows how to operate generators. Some profession bonuses also cover generator use.
Once you know what you’re doing, place the generator in an outdoor position close enough to the building, use the Connect Generator interaction, then add fuel and start it. If the menu lacks the connect option, don’t assume the game is broken. Make sure your character has the knowledge first.
Why a generator must stay outside

Please don’t run a generator in a living room, basement or sealed garage. It produces toxic fumes, and those can make your survivor seriously ill or kill them. The same caution applies to an enclosed shed you built yourself. Find an outdoor tile close enough to supply the rooms you care about, even if it means walking a few steps farther to refuel it.
The power has a limited range around the machine. On the normal Build 42 settings, it reaches about 20 tiles horizontally and three floors above or below the generator. Those are sandbox settings, so a custom server can behave differently. Before hauling a machine into position, think about the fridge, freezer and any powered appliances you want to keep running.
How much petrol does it need?
Generators burn petrol as they run, and the amount can depend on the appliances being supplied. You can add fuel from a compatible container while the generator is off. Check its information panel to see fuel and condition rather than trying to memorise a fixed number of hours per can. A house full of powered appliances costs more to run than a small, carefully managed setup.
I would keep a spare can for emergencies rather than waiting until the generator stops. Once electricity fails, a fuel station may need its own generator to run the pumps. If you’ve already arranged one for the station, you’ve made the whole long-term fuel situation easier.
Don’t forget condition and repairs
A generator also wears down over time. Running one in poor condition isn’t worth the risk, as a badly damaged generator can catch fire or fail. Switch it off before doing maintenance and use the appropriate electrical scrap to repair it. Check condition regularly, not just when you notice the fridge has stopped working.
A generator is brilliant once the electricity cuts out, but it needs regular attention. Keep spare petrol nearby, check its condition and never run it indoors. I’d rather lose a little freezer space than come home to a house full of fumes.
Official source: The Indie Stone’s Build 42 game features.
