From the myth of Osiris we know that the gods where the nighttime stars, but during the hours of daytime, the gods had to be housed in Temples.
The hubs of every major town or city in ancient Egypt were the temples. Each major town/city had its own temple dedicated to its local deity. The origins of these temples date back to pre-dynastic times when originally the early nomadic Egyptians roamed local areas forgeging, hunting and gathering food. To represent each group or clan they had an ensign who was adopted from their local surroundings such as, crocodiles, falcons, harpoons, hippotomi, snake, cat etc. Eventually when these early Egyptians invested in farming these ensigns became their deities, worshiped on a local basis. During the civil wars prior to 3100 B.C. and union under Narmer, local towns with Nomarchs would dominate weaker towns for control of resources, even when a town was dominated or defeated in battle great tolerance was given to the defeated towns local deity, this is one of the qualities which makes the ancient Egyptians so special. Unlike modern religions today the Egyptians did not crush an oppositions idea of worship in fact all of these deities were eventually included within creation myths, securing the Egyptians idea of order (maat) within the cosmos.
An Egyptian temple had many roles. Firstly it was a place of worship and devotion to a local deity who protected the local population and took its place within the great cosmos of (maat).
Its second role was as a library of learning, where junior scribes/priests were taught the art of the ancient Egyptian language of reading and writing. We call the ancient Egyptian language today, Hieroglyphs.
The third role of a temple was the House of Life, were the local population could obtain the very best in magical medicine or herbal remedies. If an Egyptian was inflicted with an illness, he or she could make a model of the inflicted area of there body and present this effigy together with an offering for the local deity to heal the inflicted part of the body concerned. Herbal remedies were also available, which were primary the first option in weal being.
The fourth role in the temples life was the structure itself at was it represented to the Egyptians. The sphinxes ally way were the guardians of the temple, driving away the elements of chaos. The pylons represented a fortress gateway again guarding the temple and retaining maat. The open courtyard is where most Egyptians would congregate hoping for the deity, who travelled inside the temple within a wooden enclosure, on a barque carried by priests, to make a procumation on an individuals future. Once a procumation was made by a deity it became law, not even a king could overturn a decision made by a fellow deity. The hypostyle Hall represented the papyrus of Lower Egypt and the belief in the creation myth of Lower Egypt. Temples were located on the banks on the Nile and were designed to flood during the great flood. The reason for this was due to one of the creation myths which said out of the waters of chaos came the primeval mound of creation, once the mound appeared a mythical bird from the East laid an egg on the mound and from the egg, burst forth the sun god Ra, bringing life to all within the land of Egypt. The flood was also connected to Osiris who re-fertilised the land of Egypt with the fertile soil, for the Egyptians to grow their crops, a promise of re-birth in the life to come.
As Egyptians entered deeper into the temple the floor became raised and the ceiling became lower, producing a mystic ambiance within the holy of holy where the statue of the god was housed. Only the king and the high priest of the temple could enter the sacred sanctuary of the deity. The hierarchy system of status determined how far an Egyptian could penetrate within the temple walls. Some temples did not allow access to common Egyptians who were provided a small access point at the rear of the temple, for offering called the temple of the hearing ear. Once the king and high priest entered the deities sanctuary, the deity has to be washed, feed and appeased with music and other diversions. The Egyptians did not worship idols, they believed that if they maintained an image of the deity, then the spirit of the deity could enter the image and converse with the living, thus making the gods themselves, within the land of Egypt as well as in the heavens were they appeared and watched over the people from the afterlife.
From the Middle Kingdom onwards, the kings of Egypt were responsible for the maintenance of the temples through out Egypt, obviously the king himself could not be present in the 40+ major temples of Egypt, so it was up to the high priest and his deputy to perform these daily rituals on behalf of the king. To appease the gods of Egyptian brought order maat through out the land, remembering that before people lived in the land of Egypt, the gods once lived in the land themselves. Temples were always built in stone, which represented eternity, the outside of these walls were usually decorated with scenes of the kings defeating Egypt enemies. The scenes show kings fighting a disorganised enemy, defeating them and the impact of this defeat, showing the orderly line of prisoners, demonstrating order out of chaos, bringing maat.
Other elements of the temple were the sacred lakes where the priests had to be clean-shaven and purified daily before conducting tasks within the temples. Also the offerings that were made to the deities were cleaned within these lakes prior to the sacrifice and consumption by the deity. The outer walls of temples were usually made of mud bricks, with a wavy pattern within the brick design, suggesting the floodwaters during the flood. Priests served within the temples for certain periods of time with a hierarchy structure existing within the group. At the allotted time priests returned to their families and estates until it was time to return for temple service.
Temples also employed a vast workforce to support their activities, such as beakers, potters, carpenters, brewers, herdsman to look after the temple estate and farmers to farm the temple lands. In theory the king owned all the temples and lands which supported the temples, the kings also made vast contributions towards temples revenues of cattle and other precious commodities to appease various deities. In fact quite a large number of these temples became powerful in there own right, controlling vast estates and herds of cattle, such as Karnak in Thebes/Waset. Throughout the Egyptian history various kings tried to reform the clergy and confiscate lands from temple control.