Now, he has a family, a home and a job - helping homeless veterans get off the streets, like he did.
Dyer is part of a team of veterans, some formerly homeless themselves, that the state of Massachusetts has hired to get veterans off the streets in the Boston area. Typically, they spend one day a week roaming the city's storefronts, alleys and shelters, which is what he was doing one recent morning outside Boston's South Station. "I guess you could call this my home for about a month," he reminisced.
The rest of the week is spent making sure those who have found housing are staying the course. The Veterans Affairs Department, which funds the effort, is considering doubling the size of the team in the coming year.
President Barack Obama's administration has pledged to eliminate homelessness among veterans by the end of 2015. And while the rate has been dropping, time is running short.
So communities such as Boston are aggressively hitting the streets with offers of housing, treatment and hope. Using formerly homeless veterans such as Dyer and team leader Christopher Doyle helps them make inroads with a community that often is distrustful of people who haven't experienced what they've been through.
"When they say, 'Oh, you don't know what I'm talking about,' I can say, 'Yeah, I do, because I was there myself,'" said Doyle, who at one point lived in a VA homeless shelter with about 180 other veterans before landing a job with the state.
James Harrington appears to be one of the program's success stories.
Harrington estimates that he was homeless for nearly a dozen years. At first, he said, he lived in vacant apartment complexes that were under construction. Then he spent most of his nights at Logan International Airport.
He arrived at his new one-bedroom apartment in February with nothing but his door keys and a backpack.
It took him about a month to get used to the feeling that he could stay - if he wanted to.
"You're so used to living so many years in someone else's domain," said Harrington, 66, an Army veteran who served stateside during the Vietnam War. "There was this expectation that someone's going to be coming through the door because they really own the place that you're in."
Harrington takes great pride in turning his new apartment into a home. He found a couple of Ethan Allan end tables that neighbors were going to throw away. Carly Brown, a VA social worker, drove him to a local furniture bank where he picked out a sofa and a bed. And Doyle chipped in as well, giving him an RCA television. Now just look at the place, Harrington beams.
"Where are you going to find something better than this?" said Harrington. "You're not."
A voucher from the federal government pays $981 of the veteran's monthly rent. He uses his Social Security and a VA pension to pay another $221 himself.
Doyle checks on him weekly to make sure he's OK. "I sometimes just talk to him about the last movie he watched," Doyle said. "It's to show I have an interest in his life."
Doyle said he believes that regular visits from a fellow veteran make it harder for his clients to give up and go back to their old life.
"It's easy to put someone into an apartment, but it's not as easy to keep them in one," Doyle said. "A lot of these guys do have mental health issues or substances abuse issues. Sometimes, that's the reason they do the right thing because they know I'm going to come see them."
The federal government estimates that the homeless rate among veterans has dropped by about 25 percent in the past three years, but nearly 58,000 veterans remain on the streets or in temporary shelters on any given night.
"I have said from the beginning, the climb will get steeper the closer we get to the summit," Veterans Affairs Secretary Eric Shinseki said earlier this year in Washington. "All the easy cases will have been housed. In the end, we will have the toughest, most difficult cases to solve - some prior failures, some behavioral problems, even some serious mental health issues."
VA officials point to Boston as a model for what can be done when local and federal organizations work together. Their focus is to get chronically homeless veterans into a house or apartment as soon as possible instead of putting them into temporary or emergency shelters for months at a time. Then, once the vet gets into a house, officials arrange the support services the veteran will need to stay there, such as substance abuse counseling and job training. Typically, the federal government pays most of the cost for the home through a voucher. Local officials and nonprofits also help coordinate the support services that are, again, mostly paid for through the VA.
"When you put housing as the priority, the treatment and everything else comes along in a much more effective way because they're getting their most basic needs met first," said Vincent Kane, director of the National Center on Homelessness Among Veterans, which conducts policy analysis and research. "They're not worried where their next meal is coming from or what roof will be over their head that night."
To estimate the number of homeless veterans, the federal government relies on an annual count that takes place in January. Thousands of volunteers, government employees and nonprofit workers search their local streets, parks and shelters in an effort to count the number of homeless people. The latest count in Boston estimated 458 homeless vets on any given night in 2013, a drop of 15 percent over the past three years. That's not as steep as the national drop, but VA officials in Massachusetts said that's partly because their outreach efforts have helped them find homeless people who previously would have gone uncounted.
Kane said veterans are key members of its homeless outreach teams in communities such as Philadelphia, Los Angeles, Detroit and Denver.
Doyle and Dyer met each other at an Alcoholics Anonymous meeting. Doyle, who served in the Army during the first Gulf War, overheard Dyer speaking about his experiences in Afghanistan and decided to approach him and offer a friendly ear.
Dyer had drug problems before he entered the Army. After his discharge, Dyer said, his drug use intensified.
"It's just so much easier to use, you think, because you've totally given up on yourself," he said. "You've given up on life. You're pretty much pissed that you woke up."
His health went downhill and he eventually was hospitalized with kidney failure. He woke up to find his father sitting next to his bed. Dyer said he saw how badly he was hurting his family and resolved that his spiral was over.
Doyle, meanwhile, kept tabs on Dyer's progress and eventually asked him to join the veterans' homeless team. Dyer said the job helps him stick with his recovery.
"If you're not out there helping somebody, the chances of staying in recovery and staying clean, really, aren't that good," he said. "I found that out personally."
Most of the team's clients have drug and alcohol issues that require counseling and treatment. Harrington said he's never had a problem with drugs or alcohol and said his problems were financial. He said in recent years he spent most of his nights at the airport. At dawn, he'd head over to the Boston Public Library.
One night, an airport worker brought in a social worker from the VA to talk to him. The VA helped him get a pension to supplement his Social Security. It also helped him land a government voucher. He marveled at the support he's received.
"They had a whole team of support people, like, if you need furniture, they get you furniture. If you need food, they'll bring food to you," Harrington said.
But other cases are much tougher - the chronic homeless that Shinseki referred to.
At Boston's Emmanuel Church, Bryant Draycott says he's been told he is No. 5 on the list to get a government voucher that would let him live in an apartment. The Navy veteran said he'll take help, but only on his terms.
"I'm the vet. They're not," he said. "You want to give me a room? You want to give me an apartment? OK, I'll stay there for at least a couple of days. I'll give it a try for a week. If I don't like it, I'll tell you what you can do with it."
And another thing, don't use the word homeless in his presence.
"To me, personally, I hate that word. I refuse to use the term homeless. With me, I'm on vacation."
Draycott estimates that he's been on vacation for about eight years.
"And loving every minute of it," he said.
Then there's Thomas Moore, 79, who has no interest in getting a government-subsidized apartment. He said he was willing to accept a blanket from the social workers who visit him, but when they broach the idea of housing, "I try in a kind way to back off."
He demonstrates just how difficult it will be for the Obama administration to reach its goal, despite all the assurances that it's on track. Sitting on the sidewalk a block from Boston's most luxurious shopping boutiques, Moore described having a "nervous breakdown" as a 17-year-old serving on the front lines in Korea. He said he feels responsible for the death of his best friend during one firefight and spent months afterward at Walter Reed Army Medical Center in Washington. He said he underwent numerous shock treatments.
When he gets tired of living on the street, he said, he'll rent a cheap hotel room for a month.
"There's something about the rough edge of living out here that distracts me from my inner life," Moore said.
Despite Moore's insistence that he doesn't want their help, the veterans' homeless team doesn't plan to quit asking him if he's changed his mind.
"You don't know when it's going to be that day when somebody says I'm done living like this and accepts the help," Dyer said.