The Hammers will be keen to bounce back at the first attempt and Cardiff have been in the promotion mix themselves in recent seasons so there should be a full house at Upton Park for what is likely to be a lively start to the campaign.
Allardyce will then take his men to Doncaster and Watford after the opener, before Leeds come calling on August 20.
There is not much love lost between West Ham and Millwall fans and the Hammers will travel to the Den to face their local rivals on September 17, before hosting the return match on February 4.
Hammers fans can also look forward to a pair of local derbies against Crystal Palace and they will head to Selhurst Park on October 1 before playing host to the Eagles on February 25.
Over Christmas, West Ham will visit Birmingham on Boxing Day and Derby on New Year's Eve, and they will finish the season at home to Hull on April 28.
Hammers co-chairman David Gold says the opening game against Cardiff will show how well equipped the club are to battle for promotion.
Allardyce faces a tough start with a home clash with the Bluebirds, who were beaten in the play-off semi-finals last term.
"We have to face the fact we are in the Championship and we have got a fantastic challenge to get out of this division and back to the Premier League," Gold told Sky Sports News.
"Cardiff are one of the big sides in the division and we'll get a good idea of how we are going to do
"I'm glad to have avoided one of the promoted clubs, like Barry Fry and Peterborough, because they tend to overperform at the start of the season."