Fully-automated services potentially allow for greater flexibility in operations and lower marginal operational costs. The objective of this study is to determine the capacity requirements of an envisaged automated on-demand rail-bound transit system which offers a direct non-stop service. An optimization model is formulated for determining the optimal track and station platform capacities for an on-demand rail transit system so that passenger, infrastructure and operational costs are minimized. The macroscopic model allows for studying the underlying relations between technological, operational and demand parameters, optimal capacity settings and the obtained cost components. The model is applied to a series of numerical experiments followed by its application to part of the Dutch railway network. The performance is benchmarked against the existing service, suggesting that in-vehicle times can be reduced by 10% in the case study network while the optimal link and station capacity allocation is comparable to those currently available in the case study network. While network geometry and demand distribution are always the underlying determinants of both service frequencies and in-vehicle times, line configuration is only a determinant in the conventional system, whereas the automated on-demand rail service better caters for the prevailing demand relations, resulting in greater variations in service provision. A series of sensitivity analyses are performed to test the consequences of a range of network structures, technological capabilities, operational settings, cost functions and demand scenarios for future automated on-demand rail-bound systems.