Technically it depends on the weight of the door.
For most interior applications, the door is going to be less than 200 pounds or so.
Usually you can put a 1 by or a 2 by up along the face of the wall, behind the track, on the room side of the wall, in between the wall and the track, where you mount it and that will support it.
If you don’t mind cutting a hole in your drywall, or pulling your drywall out, you can go up and install blocking in between the studs of your wall.
Blocking is essentially a piece of wood that extends between the two studs that are in your wall.
That will hold the weight of the door and the sliding door hardware.
Ceiling mounting is also called soffit mounting.
A soffit is the underside of the ceiling.
Ceiling mounting is fastening the sliding door hardware straight up into the ceiling, above the door.
You need to have some kind of a header or some kind of a support up there, because most of the time your ceiling is just drywall or sheetrock, and that sliding door hardware won’t support the weight of a sliding door.
It’s the same thing.
You’ve got ceiling joists up there and you can have blocking span between them, or run a board across the top that will bear the weight.
There’s got to be sufficient blocking.