SAN FRANCISCO (AP) _ For $20,000 a night, the Fairmont Hotel atop San Francisco's posh Nob Hill has a holiday special just for you and 19 of your very best friends.

For 24 hours, 20 people can bask in the luxury of eight suites, including the famed Penthouse Suite, and enjoy anything legal, said spokesman Russ Alley.

''It's a package,'' Alley said. ''Anything they want. Full scale.''

The guests get the entire eighth floor of the original Fairmont and seven suites in the adjoining tower - some 15 rooms - along with the fanciest food they can dream up, butlers, maids, live music, a fleet of Rolls Royces and unspecified other services.

The deal is good through Dec. 31, 1987, but reservations must be made by Jan. 1.

So far, the only taker is a retired corporate executive from Los Angeles, whom Alley declined to identify and who bought a $20,000 night for his wife and 18 friends on Jan. 14.

The Penthouse Suite commands a spectacular view of the city. It usually rents for $5,000 a night and undoubtedly will be the party's centerpiece.

Built in 1918 and offered for $1,000 a month, which these days would rent a fair-to-middling two-bedroom apartment in San Francisco, the suite boasts a richly paneled drawing room, three bedrooms, four baths with gold-plated fixtures, a game room, library, kitchen and a secret passageway.

Presidents, royalty and prime ministers have stood at its windows, enjoying spectacular views of the city.

Rich oak adorns the walls. Thick carpets muffle footsteps. The doors are of Philippine mahogany and hearths are inlaid with detailed lapis lazuli, marble and woods. A contemporary art collection covers the walls. The arched, minareted game room is floored in Persian tile.

The library is a small, round room topped by a dome with a representation of the constellations. One shelf of books opens into a passageway leading to the roof.

The $20,000 night begins with guests being transported to the hotel in four Rolls-Royces. Lifted to the suites in a private elevators, the guests will be serenaded by violins and a grand piano.

That evening, there will be a banquet.

''You meet with any of our international chefs and order anything you want, a banquet for 20 people,'' said Alley. ''Whatever you come up with, we'll serve. And the next morning, it's breakfast in bed for all of them.''

If anybody's muscles get a little tired from lifting all those glasses of champagne, the weary guest can go over to the Fairmont's Nob Hill Club for a dip in the Jacuzzi.

Checkout time? Alley says the normal hour is 1 p.m., ''but we'll extend that a bit.''