The fire broke out around 2:15 a.m. at the historic building on Main Street. It began on the second floor, spread to the third, before reaching the roof.
"There's flames everywhere. They tore the whole building up in there. That building will not... nobody will live in there again," said Ernest Pierce, who lived in the building.
No injuries were reported.
Lodi only has around a dozen firefighters, so some outside agencies were called in to help.
Lodi's interim fire chief Gene Stoddard said eight people staying at the hotel were there through general relief housing.
Many of the residents are "one step away from homelessness," Stoddard said.
Pierce says he didn't hear any smoke alarms when the fire broke out. The building was built in the 1900s and does not have a sprinkler system. Pierce added many of the residents had to wake each other up.
"They were just in here last month fixing the darn things. I don't know why they're not on," he said.
The cause of the fire was not immediately known.
THIS MORNING: Nearly 40 people have been displaced after a 3-alarm fire ripped through the old Star Hotel on Main St. in #Lodi early this morning. The fire chief tells us many of the people who live here are one step away from homelessness. Details on @FOX40 at 5:00 am pic.twitter.com/0pFSIqWbbD
— Olivia DeGennaro (@OliviaDeGennaro) February 19, 2018