If you're just starting out in Valheim (opens in new tab), one of the first things you'll want to do is construct a campfire and build a bed. Every Viking soul needs a place to lay their head and a way to keep warm, and early on you're basically wearing rags that won't protect you from the harsh environment.
Valheim's campfire provides you with warmth on cold nights (and a way to cook raw meat once you've added a spit), and a bed gives you a respawn point if you die—super important once you've started exploring the world, because otherwise you'll respawn way back where you started, possibly miles from all the gear you were carrying when you perished. Beds also give you a place to sleep, which provides a 'Rested' buff for a short time after you wake.
Here's the thing. For the bed to work, it needs to be built indoors—with a floor under it and a roof over it. But it also needs a roaring campfire close by, and campfires can't be built on a floor, only on dirt.
You can cheat it a bit to start out, by simply building the campfire directly outside your door and the bed right next to the doorway so they're still very close together. But that's not going to help you during a thunderstorm—the rain will douse your fire and you won't be able to use your bed to sleep. The other issue I had with this placement is I kept running out the door, brushing against the campfire, and catching myself on fire, losing a bunch of health in the process.
So you'll actually want to build your campfire inside your house. At first it seems like it's not that tricky. Just remove a floor tile and build the campfire on the dirt under it. Simple:
If the ground isn't level below the floor tile you removed, you can raise it using your garden hoe. But you're not done yet. If you've got a campfire going indoors and a roof over your whole house, you're going to notice something alarming.
Your home is filling with smoke!
And it's not just a visual effect. Players have reported that smoke inhalation can actually kill your character. So, you'll need to vent the smoke through the roof to avoid dying (and so you can actually see what you're doing while you're inside your house). Just making a gap in the roof will help a little, but there will still be a lot of smoke in your house.
It's a pretty crude solution, but you can snap walls on three sides around the square your fire occupies, almost like you're building another room inside your house just for your campfire. Leave the side facing you open so you can still see the fire, and stack those walls up through the gap in your roof. They'll form a boxy chimney. Add on a little half-wall in front, and it'll even wind up looking like a proper fireplace:
When you're done, you'll still be able to access your fire to keep it fueled, but the smoke will harmlessly escape through the chimney. Throw a triangular roof piece on top of the chimney, and it'll protect the fire from rain but still allow the smoke to vent. Now you can stay cozy and warm while sleeping, just like every Viking should.