The pancreas is a complex organ with exocrine and endocrine components. Many pathologies impair exocrine function, including chronic pancreatitis, cystic fibrosis and pancreatic ductal adenocarcinoma. Conversely, when the endocrine pancreas fails to secrete sufficient insulin, patients develop diabetes mellitus. Pathology in either the endocrine or exocrine pancreas results in devastating economic and personal consequences. The current standard therapy for treating patients with type 1 diabetes mellitus is daily exogenous insulin injections, but cell sources of insulin provide superior glycaemic regulation and research is now focused on the goal of regenerating or replacing β cells. Stem-cell-based models might be useful to study exocrine pancreatic disorders, and mesenchymal stem cells or secreted factors might delay disease progression. Although the standards that bioengineered cells must meet before being considered as a viable therapy are not yet established, any potential therapy must be acceptably safe and functionally superior to current therapies. Here, we describe progress and challenges in cell-based methods to restore pancreatic function, with a focus on optimizing the site for cell delivery and decreasing requirements for immunosuppression through encapsulation. We also discuss the tools and strategies being used to generate exocrine pancreas and insulin-producing β-cell surrogates in situ and highlight obstacles to clinical application.