You absolutely do not need a gym to gain strength. This book is full of exercise ideas that only require your own body weight.
You Are Your Own Gym: The Bible of Bodyweight Exercises by Mark Lauren does a good job illustrating many different exercises one can do one your own without expensive gym equipment. The book is selling right now for $11. Even if you got bored with bodyweight exercises after a month, you’ll be hard-pressed to find a gym with a monthly fee that low.
The book lists 125 exercises starting on page 53. The text prior to this section is not essential to get started. Not every exercise is equal. Some are heavy hitters, like the push-up and some of the squat variations. I like how he mentions slowing down the movements can increase the intensity. However, I wouldn’t take his advice to use unstable platforms to increase difficulty, as I think the risk of injury would increase without a corresponding increased reward. If you get this book and start experimenting with the exercises, use your best judgment on the safety of the movement. Doing a push-up is safe. Jumping up onto a pile of boxes is only safe if the boxes remain stable as you successfully land on them (p110).
If you are just looking for a no-nonsense safe workout with minimal exercises, then I would recommend the plan in the book HillFit by Chris Highcock or my less detailed outdoor HIT workout. If you want more ideas, especially if you are designing a Tabata or another strength interval workout, pick up a copy of You Are Your Own Gym. Just use your best judgment when selecting exercises. Pick the ones that don’t increase safety risk as fatigue sets in.