The new OPC Unified Architecture has been introduced as a replacement for the existing COM-based specifications. The article describes a generalized algorithm for the automatic generation of the address space structure for an UA server. First, we present the general startup procedure of an OPC UA server, focusing on the address space generation step. Afterwards we introduce specialized algorithms for the generation of the type nodes, of object, variable, method and view nodes. Finally the additional references are added to the fully meshed address space. The basic ideas of the algorithms are: the splitting of the nodes into groups and the sequential addition of the groups to the address space, and the naming of a main reference for every target node. The algorithms have been applied for an aggregating UA server which models the devices of an assembly line. The main advantages are: shorter development time, easier maintenance and the possibility to add nodes to the address space in both online and offline mode. Copyright © 2011 John Wiley & Sons, Ltd.