You might think of networking as a necessary career-boosting tool, but it’s just as important in retirement.

Many retirees quickly realize how closely their identities were attached to their jobs. They are unprepared for a post-career life that may not include their colleagues and “work family.”

“Some people have very robust volunteer networks and personal networks, but lots of people don’t, so when they leave their jobs, it all disappears,” says Nancy Collamer, an author and career coach. “A lot of people complain about work, but the fact is, work provides us with many positive things – community, routine and people you can talk to.”

When their jobs end, some retirees experience a sense of loss. “If we are not actively engaged, we can become bored, stressed and depressed,” says Janet Taylor, a psychiatrist in Sarasota, Florida. “If we are involved in activities, especially ones that engage our senses, we can improve our mindset.”

But by continuing to network, retirees can tackle some of the biggest problems they face when they leave a job: boredom and loneliness. Here’s how to keep your network in place or create a new one when you retire:

Don’t retire. George Fraser, a networking expert, speaker and author says he is 73 years old and “still going” because it keeps him connected to the world. “I think any person who is healthy and vibrant should not retire,” Fraser says. “They can retire from whatever that office job was, and then move to a place that is more comfortable.”

Stay connected. Some people retire and never lose contact with their former colleagues. They plan weekly lunches or dinners, golf outings or field trips. Colleagues from long-gone companies still get together for reunions decades later.

Create new networks. Joining a volunteer organization gives you an opportunity to help others and meet new people. “Volunteering is always a way to give yourself a sense of purpose,” Collamer says. “It’s also a way to start new friendships.” Mentoring can be a way to network with younger people who are energetic and engaged.

You can join new professional organizations or attend conferences you have an interest in, even if they have nothing to do with your previous career. “Get out and meet people,” Fraser says. “You never know what is going to come out of those meetings.” You can also find groups geared toward retirees, both national and local.

Learn new things. Some universities offer reduced tuition classes for seniors, while others let you audit classes for free. Online courses, including free classes, are also available. “Just because you stop working at your job does not mean you or your brain doesn’t require the stimulation that we all need as we age in terms of learning new things, engaging in different opportunities to learn new skill sets,” Taylor says.

Consider taking a class to improve your technology skills. “One of the biggest things I see retirees gain from networking is their expanded use of technology,” says Dana Anspach, an author and founder and CEO at Sensible Money in Scottsdale, Arizona. “They learn how to video chat, manage finances and monitor workouts, all from their phones.”

You don’t have to pick one thing. Retirement doesn’t always mean a life of leisure. “I know a lot of people who are fully retired and living that leisurely life in retirement,” Collamer says. “Increasingly, people are doing a combination – some work, some travel and some volunteering. There are people who retire from one career and go to another.” Some retirees cycle between periods of work and leisure.

Change your environment. A house that was close to your job with enough space for a few kids might no longer be ideal for you in retirement. “When you’re stuck in the same environment and your regular network has gone away, you’re accepting a fate that doesn’t have to be,” says Justine Vogel, president and CEO of The RiverWoods Group, which operates three continuing care retirement communities in New Hampshire. “You don’t realize how small your world is until you open yourself up to the possibilities.” A move to a new location gives you an opportunity to start over in a place that matches your current interests.

Nurturing friendships is particularly important for retirees, who suddenly have a surplus of free time. A social network can also help with the challenges of aging. “If you think back to some of the best advice you’ve ever received, it probably came from a friend or colleague,” Anspach says. “In casual conversation, we find new hobbies, fun places to visit, tips on saving money, health and fitness info, referrals to doctors, your next favorite restaurant and much more.” Networking isn’t just about your next career move. It’s about exploring life and learning about options that you didn’t know were out there.