In the early decades of Buddhism the wandering monks of the Sangha had no fixed abode, but during the rainy season (cf. vassa) they stayed in temporary shelters. These dwellings were simple wooden constructions or thatched bamboo huts. However, as it was considered an act of merit not only to feed a monk but also to shelter him, sumptuous monasteries were created by rich lay devotees (Mitra 1971). They were located near settlements, close enough for begging alms from the population but with enough seclusion to not disturb meditation.
Trade-routes were therefore ideal locations for a vihara and donations from wealthy traders increased their economic strength. From the first century CE onwards viharas also developed into educational institutions, due to the increasing demands for teaching in Mahayana Buddhism (Chakrabarti 1995).
In the second century BCE a standard plan for a vihara was established. It could be either structural, which was more common in the south of India, or rock-cut like the chaitya-grihas of the Deccan. It consisted of a walled quadrangular court, flanked by small cells. The front wall was pierced by a door, the side facing it in later periods often incorporated a shrine for the image of the Buddha. The cells were fitted with rock-cut platforms for beds and pillows (Mitra 1971). This basic layout was still similar to that of the communal space of an ashrama ringed with huts in the early decades of Buddhism (Tadgell 1990).
As permanent monasteries became established, the name "Vihara" was kept. Some Viharas became extremely important institutions, some of them evolving into major Buddhist Universities with thousands of students, such as Nalanda.
The northern Indian state of Bihar derives its name from the word "Vihara", probably due to the abundance of Buddhist monasteries in that area. The Uzbek city of Bukhara also probably takes it name from "Vihara".
Buddhist Vihara or monastery is an important form of institution associated with Buddhism. It may be defined as a residence for monks, a centre for religious work and meditation and a centre of Buddhist learning. Reference to five kinds of dwellings (Pancha Lenani) namely, Vihara, Addayoga, Pasada, Hammiya and Guha is found in the Buddhist canonical texts as fit for monks. Of these only the Vihara (monastery) and Guha (Cave) have survived.
An idea of the plan and structure of some of the flourishing monasteries may be found from the account of Hsuan-Tsang, who referred to the grand monastery of po-si-po, situated about 6.5 km west of the capital city of Pundravardhana (Mahasthan). The monastery was famous for its spacious halls and tall chambers. General Cunningham identified this vihara with bhasu vihara. Huen-tsang also noticed the famous Lo-to-mo-chi vihara (Raktamrittika Mahavihara) near Karnasuvarna (Rangamati, Murshidabad, West Bengal). The site of the monastery has been identified at Rangamati (modern Chiruti, Murshidabad, West Bengal). A number of smaller monastic blocks arranged on a regular plan, with other adjuncts, like shrines, stupas, pavilions etc have been excavated from the site.
One of the earliest viharas in Bengal was located at Biharail (Rajshahi district, Bangladesh). The plan of the monastery was designed on an ancient pattern, i.e. rows of cells round a central courtyard. The date of the monastery may be ascribed to the Gupta period.
A number of monasteries grew up during the Pala period in ancient Bengal. One of them was Somapura Mahavihara at Paharpur, 46.5 km to the northwest of Mahasthana. The available data suggests that the Pala ruler Dharmapala founded the vihara. It followed the traditional cruciform plan for the central shrine. There were 177 individual cells around the central courtyard. There were central blocks in the middle of the eastern, southern and western sides. These might have been subsidiary chapels. It was the premier vihara of its kind and its fame lingered till the 11th century AD.
The famous Nalanda Mahavihara was founded a few centuries earlier; Huen-tsang speaks about its magnificence and grandeur. Reference to this monastery is found in Tibetan and Chinese sources. The fame of this monastery lingered even after the Pala period.
Reference to a monastery known as Vikramashila is found in Tibetan records. The Pala ruler Dharmapala was its founder. The exact site of this vihara is at Antichak, a small village in Bhagalpur district (Bihar). The monastery had 107 temples and 50 other institutions providing room for 108 monks. It attracted scholars from neighboring countries.
The name of the Odantapuri monastery is traceable in Pagsam jon zang (a Tibetan text), but no full-length description is available in the Tibetan source. Gopala I (?) built it near Nalanda. This was the monastery invaded by Bakhtiyar Khalji.
Very interesting and important structural complexes have been discovered at Mainamati (Comilla district, Bangladesh). Remains of quite a few viharas have been unearthed here and the most elaborate is the Shalvan Vihara. The complex consists of a fairly large vihara of the usual plan of four ranges of monastic cells round a central court, with a temple in cruciform plan situated in the centre. According to a legend on a seal (discovered at the site) the founder of the monastery was Bhavadeva, a ruler of the Deva dynasty.
Other notable monasteries of Pala period were Traikuta, Devikota (identified with ancient kotivarsa, 'modern Bangarh'), Pandita vihara and Jagaddala (situated near Ramavati). Excavations conducted in 1972 to 1974 yielded a Buddhist monastic complex at Bharatpur in the Burdwan district of West Bengal. The date of the monastery may be ascribed to the early medieval period. Recent excavations at Jagjivanpur (Malda district, West Bengal) revealed another Buddhist monastery of the ninth century AD. Unfortunately, nothing of the superstructure has survived. However, a number of monastic cells facing a rectangular courtyard have been found. An interesting feature is the presence of circular corner cells. It is believed that the general layout of the monastic complex at Jagjivanpur is by and large similar to that of Nalanda.
Beside these, scattered references to some monasteries are found in epigraphic and other sources. They were no less important. Among them Pullahari (in western Magadha), Halud vihara (45 km south of Paharpur), Parikramana vihara and Yashovarmapura vihara (in Bihar) deserve mention.