As gyms close their doors, people are buying up dumbbells like toilet paper.

After Spain announced a nationwide lockdown over the coronavirus outbreak on Saturday, a man in Seville put on workout clothes, climbed to a rooftop in his apartment complex, and started doing jumping jacks and squats. All around him, people watched from their balconies and followed along as he encouraged them to keep moving. The government had ordered everyone to stay home for two weeks in an attempt to slow the explosive spread of COVID-19, the disease caused by the virus, allowing people to venture out only for?essential reasons. Going to the gym wasn?t one of them. What else was a quarantined fitness instructor to do?

This scene was a surreal harbinger of what?s to come, not just in Europe, but here in the U.S, where the virus has now spread to all 50 states. Only a few days ago, as people adjusted to?social-distancing measures, they wondered, Is it safe to go to the gym? Now their gym might not even be open; at least 15 states have ordered gyms and fitness centers to close, and popular chains across the country are choosing to close on their own.

With every day that passes, it becomes clearer that the measures put in place now to keep the virus from spreading could last not weeks, but months. In this unpredictable moment, maintaining a grip on normalcy suddenly seems like one of the most important tasks. How do we do the basics of life?eat,?socialize, keep our bodies from atrophying because of disuse?

Like so many mundane experiences in a global pandemic, the way many Americans work out is about to change. Exercise is that rare private activity that often unfolds out in the open, on the gym floor and in studio classes and on sidewalks, where people can find community while staying comfortably anonymous. Even in these past few days, fitness instructors and studios have been coming up with new ways to stream classes and bring people together, but ultimately exercise is going to be that much more of an individual activity. We’re each going to have to sweat this one out on our own.

Even more than usual, we have a very good reason to exercise: Working out contributes to good health, which in turn helps us maintain sturdy immune systems. Making moves seems especially beneficial now, as people spend more time at home, far from the friends and family?they usually see, and probably glued to the news. Exercise is well known for its?mood-boosting abilities, and many of us could use a lift. ?Right now, everybody?s living on Twitter and Facebook and CNN and Fox News, and they?re dwelling on the end of the world,? Joshua Kozak, a trainer who runs the YouTube channel?HASfit, told me. ?It?s really hard not to feel that.?

Karen Glanz, an epidemiology and nursing professor at the University of Pennsylvania, recommends taking walks, running, hiking, and biking. Even San Francisco, which has ordered people to shelter in place, carved out an exception for solo outdoor activities, though everyone still needs to give one another a wide berth. ?Being outdoors is best if the weather is agreeable, and if the place where people live is safe to be outdoors,? Glanz told me.

But all of these activities come with the same caveat: If the destination?the park, the playground, the trail?is crowded, don?t go. This guidance might become trickier to follow in the coming days, especially as winter turns to spring and adults and children, growing stir-crazy from so much time at home, flock outside to relieve some of the restlessness. Some national parks have already been?overrun with visitors, and while the trails may feel isolated enough, visitor centers and other park facilities are getting a dangerous amount of traffic.

Glanz recommends that people watch out for passing runners?and that runners keep their distance around pedestrians?because huffing and puffing could spread droplets like coughing does. (It should go without saying: Runners, however tempting it is, don?t spit, please.) ?Veering out of the way or staying to the side of the path when there are lots of runners out is a good idea,? she said.

The other option: working out at home. This setup has its advantages (convenience, relative privacy) and its disadvantages (your roommates or partner will see your weird workout faces). Fitness classes and gyms are popular for a reason?leaving the house to exercise can provide an extra boost of motivation and mental space, without which workouts sometimes just don’t happen. But people are preparing for a home-gym renaissance?as gyms around the country closed, dumbbells seemed to become the new toilet paper, and?retail stores?and?Amazon?have started selling out of the equipment. (As a former colleague of mine recently?joked, the petrified woman in?last year?s viral Peloton commercial?must be glad she got that bike for Christmas.)

But household items also make perfectly adequate workout gear. Yoga doesn?t actually require a yoga mat, or fancy leggings. Towels make good resistance bands. Those emergency soup cans you stockpiled? Perfect for bicep curls. ?You could just tape a line of masking tape on the ground and hop back and forth over it?one minute on, one minute off?and do that for 20 minutes and you?d get a great cardiovascular workout,? says Brad Stulberg, an executive coach in Oakland and the author of two books on performance and well-being.

Kozak suggests parents use their babies or toddlers?very carefully?as weights during workouts. ?The child thinks you are just playing and spending time together, while you?re sneakily getting your workout in,? he said. Or let young kids join you: ?They can safely do all the same body-weight moves as you. Maybe add their favorite music or have them put on their favorite costume before beginning.?

The trickier part might be finding the motivation. ?If you?re just relying on getting a sudden spark of inspiration throughout the day to exercise, it?s probably not going to happen,? Kozak said. Remote workers have fewer prompts to get up and move, in order to walk to a meeting or grab coffee in the break room. Home arrangements are unlikely to be exact replicas of their office setups, with their ergonomic chairs and monitors lined up just so. (When I asked Kozak whether he thought my neck hurt because I did one of his HASfit videos or because I?ve been slouching all day, he said it?s probably because I?ve been slouching all day.)

If you have the space, work out in a different room than the one you sleep or work in. Setting the mood can help. ?Turn off that overhead light if you can, light a candle if you have one or some incense,? says Adriene Mishler, the yoga instructor behind?Yoga With Adriene. ?Things that kind of say, ?I?m doing this, I?m doing this, I?m doing this,? even if you?re like, ?I?m probably gonna not do this.??

Depending on your living situation, working out at home might mean going easy on hitting the floor. ?I used to live in an apartment and I was on the bottom floor, and anytime my neighbors would just walk, it would sound like an earthquake,? says Cassey Ho, the fitness instructor of the YouTube channel?Blogilates. For apartment dwellers who want to be mindful of their neighbors, Ho?suggests?low-impact cardio moves that don?t involve a lot of jumping and stomping.

Without the fear of cancellation fees or the guilt of bailing on a workout buddy, it might be easier to get away with skipping workouts. Stulberg, the Oakland-based health coach, suggests texting friends to say you?re starting a workout so you?re less likely to back out, or videochatting during exercise.

One of Stulberg?s friends, an emergency-room doctor, has Stulberg FaceTime him while he exercises during short breaks. ?If he wasn?t an emergency-room doctor, I?d be like, ?Get over yourself,?? Stulberg says. ?But right now, he?s a hero, so I?m like, ?All right Justin, I will watch you do push-ups.??

Click here for full podcast playlist.