Being stuck at home can be challenging. When I lived on the International Space Station for nearly a year, it wasn’t easy. When I went to sleep, I was at work. When I woke up, I was still at work. Flying in space is probably the only job you absolutely cannot quit.

But I learned some things during my time up there that I’d like to share — because they are about to come in handy again, as we all confine ourselves at home to help stop the spread of the coronavirus. Here are a few tips on living in isolation, from someone who has been there.

Follow a schedule

On the space station, my time was scheduled tightly, from the moment I woke up to when I went to sleep. Sometimes this involved a spacewalk that could last up to eight hours; other times, it involved a five-minute task, like checking on the experimental flowers I was growing in space. You will find maintaining a plan will help you and your family adjust to a different work and home life environment. When I returned to Earth, I missed the structure it provided and found it hard to live without.

But pace yourself

When you are living and working in the same place for days on end, work can have a way of taking over everything if you let it. Living in space, I deliberately paced myself because I knew I was in it for the long haul — just like we all are today. Take time for fun activities: I met up with crewmates for movie nights, complete with snacks, and binge-watched all of “Game of Thrones”— twice.

And don’t forget to include in your schedule a consistent bedtime. NASA scientists closely study astronauts’ sleep when we are in space, and they have found that quality of sleep relates to cognition, mood, and interpersonal relations — all essential to getting through a mission in space or a quarantine at home.

Go outside

One of the things I missed most while living in space was being able to go outside and experience nature. After being confined to a small space for months, I actually started to crave nature — the color green, the smell of fresh dirt, and the feel of warm sun on my face. That flower experiment became more important to me than I could have ever imagined. My colleagues liked to play a recording of Earth sounds, like birds and rustling trees, and even mosquitoes, over and over. It brought me back to earth. (Although occasionally I found myself swatting my ears at the mosquitoes. )

For an astronaut, going outside is a dangerous undertaking that requires days of preparation, so I appreciate that in our current predicament, I can step outside any time I want for a walk or a hike — no spacesuit needed. Research has shown that spending time in nature is beneficial for our mental and physical health, as is exercise. You don’t need to work out two and a half hours a day, as astronauts on the space station do, but getting moving once a day should be part of your quarantine schedule (just stay at least six feet away from others).

You need a hobby

When you are confined in a small space you need an outlet that isn’t work or maintaining your environment.

Some people are surprised to learn I brought books with me to space. The quiet and absorption you can find in a physical book — one that doesn’t ping you with notifications or tempt you to open a new tab — is priceless. Many small bookstores are currently offering curbside pickup or home delivery service, which means you can support a local business while also cultivating some much-needed unplugged time.

You can also practice an instrument (I just bought a digital guitar trainer online), try a craft, or make some art. Astronauts take time for all of these while in space. (Remember Canadian astronaut Chris Hadfield’s famous cover of David Bowie’s Space Oddity?)

Keep a journal

NASA has been studying the effects of isolation on humans for decades, and one surprising finding they have made is the value of keeping a journal. Throughout my yearlong mission, I took the time to write about my experiences almost every day. If you find yourself just chronicling the days’ events (which, under the circumstances, might get repetitive) instead try describing what you are experiencing through your five senses or write about memories. Even if you don’t wind up writing a book based on your journal like I did, writing about your days will help put your experiences in perspective and let you look back later on what this unique time in history has meant.

Take time to connect

Even with all the responsibilities of serving as commander of a space station, I never missed the chance to have a videoconference with family and friends. Scientists have found that isolation is damaging not only to our mental health, but to our physical health as well, especially our immune systems. Technology makes it easier than ever to keep in touch, so it’s worth making time to connect with someone every day — it might actually help you fight off viruses.

Listen to experts

I’ve found that most problems aren’t rocket science, but when they are rocket science, you should ask a rocket scientist. Living in space taught me a lot about the importance of trusting the advice of people who knew more than I did about their subjects, whether it was science, engineering, medicine, or the design of the incredibly complex space station that was keeping me alive.

Especially in a challenging moment like the one we are living through now, we have to seek out knowledge from those who know the most about it and listen to them. Social media and other poorly vetted sources can be transmitters of misinformation just as handshakes transmit viruses, so we have to make a point of seeking out reputable sources of facts, like the World Health Organization and the Johns Hopkins Coronavirus Resource Center.

We are all connected

Seen from space, the Earth has no borders. The spread of the coronavirus is showing us that what we share is much more powerful than what keeps us apart, for better or for worse. All people are inescapably interconnected, and the more we can come together to solve our problems, the better off we will all be.

One of the side effects of seeing Earth from the perspective of space, at least for me, is feeling more compassion for others. As helpless as we may feel stuck inside our homes, there are always things we can do — I’ve seen people reading to children via videoconference, donating their time and dollars to charities online, and running errands for elderly or immuno-compromised neighbors. The benefits for the volunteer are just as great as for those helped.

I’ve seen humans work together to prevail over some of the toughest challenges imaginable, and I know we can prevail over this one if we all do our part and work together as a team.

Oh, and wash your hands — often.

Scott Kelly is a retired NASA astronaut who spent nearly a year on the International Space Station.