When Harry Dean Stanton died in September at age 91, he’d had a good run. He was a character actor for more than 60 years, doing solid, no-gimmicks work. He was a performer who made you feel, “This is going to be interesting” every time he showed up on the screen.

He receives the finest Viking funeral that could be arranged in “Lucky.” This small, indie comic drama was created by co-writers Logan Sparks and Drago Sumonja, friends of his who built it from his personal stories and beliefs. It has depth, suspense, excitement and emotional resonance. The film feels like a funny-sad home video left behind by your dear grandpa. You can’t watch it without thinking, “Man, he was a character, that one.”

Stanton stars as the title character. Lucky is 90, one year older than Stanton as he filmed it. He’s a loner and an unapologetic atheist who insists that when you die, you’re dead and that’s that.

We meet him early in the morning as he pulls his skinny carcass out of bed, does his daily five yoga exercises and has his morning caffeine. The old coffeemaker has a red digital clock on its face. One day, transfixed by its blinking 12:00 over and over, he keels over like a falling tree.

That spill gets the taciturn Lucky thinking things over. He walks from his home in the desert to the frayed little town nearby where he meets up with longtime acquaintances. This time, however, their conversation seems a bit deeper. Lucky is dealing with his own mortality, and the cast of idiosyncratic locals in his inner circle each offer their own brand of uncommon sense. Though Lucky has no time for religion, he finds himself on a spiritual journey with a group of eccentric guides.

Ed Begley Jr. plays his doctor, who finds Lucky’s ability to smoke for most of a century without developing cancer something of a miracle. David Lynch is a bar regular confounded by the sluggish departure of his 100-year-old tortoise, which wandered away. Lucky talks about the end of things with a practical-minded life insurance salesman (Ron Livingston) and the preciousness of life with a reflective Marine veteran (Tom Skerritt).

Lucky, who presented himself as the outcast he believed he was, begins to recognize that others value him. The woman at the bodega where he buys cigarettes invites him to her son’s birthday party. The coffee shop waitress goes out of her way to check on him when he’s AWOL for a while. The essential human need to love and be loved in return quietly moves from being Lucky’s overdue discovery to become his core.

In his feature directing debut, Guthrie alum John Carroll Lynch has made a charming little jewel. He guides his actors to understated, human performances. Stanton gives this warmhearted semi-self-portrait a sense of no-nonsense realism. It’s the best send-off he could have hoped for.