I was looking around over the last few days/weeks and couldn't find many resources on how to actually create a true single server farm in SharePoint 2016 which doesn't depend on active directory.
I am using Azure to provision the VM in this excersize so we are skipping the step of actually installing the SharePoint bits since they are available in an Azure VM template.
Before you begin - Gotchas
There are some catches when using this configuration.
- Search service application doesn't work/won't provision. This was actually a deal breaker for me and I ended up running through this exercise again, provisioning a separate & small domain controller VM. If you need search, join your single server farm to a domain before creating the config database. Joining to a domain simplifies these steps some as you can skip the powershell portions, but it requires another server.
Create the Virtual Server
As mentioned there are a few steps we're combining here since a SharePoint 2016 template is available in Azure.
Azure SharePoint 2016 Template
Select the template and run through the wizard. I'm not going to go through every step of the process here, but I recommend specs below. The Azure VM offerings change pretty frequently so just find the cheapest one that somewhat conforms to the specs.
- Around 16 GB of RAM
- 4 Cores
- Premium Storage
- 100 GB of storage
Here is what I came up with
VM Settings in Azure
Create the Farm Account
In Windows, create an additional account for the machine and convert it to an administrator account. A single server SharePoint 2016 environment does not require an Active Directory account (as is consistent with previous SharePoint versions).
Create a farm account and give it a password
Make sure to change the account to an administrator as it will need to perform all sorts of invasive and disturbing things to the server
Install SQL server
Download the SQL server ISO and run through the installation process. I typically recommend researching best practice prior to installing SQL server for a production environment. In this case, since we're prototyping just click through the defaults.
These should be all the features you need for the base install
Make sure to add yourself and the farm account as sysadmins
Hopefully after clicking through you've gotten here
Gotcha - In the past I've had issues installing SQL server directly from the mounted installation ISO. You may want to extract the ISO and run it from disk if you run into problems.
Install SQL Server Management Studio (SSMS)
You will probably need SSMS at some point during this server's lifespan so why not get it out of the way now.
SSMS will take a few minutes to install and require a reboot
Create a SQL Alias
Start > Run > cliconfg.exe. This is a simple step that may save a lot of headache down the road
My SQL Server Alias Configuration
Don't have do to this since we're using Azure and the bits should be installed for us in the template.
If you're not using Azure you will need to download the SharePoint binaries and run through the installation process
Create the SharePoint Configuration Database with PowerShell
SharePoint 2016 will not let you select the Single Server minrole directly from the configuration wizard. You have to first create the confg DB with the SharePoint 2016 Management Shell (PowerShell). Run the terminal as administrator.
New-SPConfigurationDatabase -DatabaseName "single_server_farm" -DatabaseServer "DEMROSP2016" -Passphrase (ConvertTo-SecureString "farm_passphrase" -AsPlainText -force) -FarmCredentials (Get-Credential) -LocalServerRole SingleServerFarm
Important - the PowerShell cmdlet New-SpConfigurationDatabase has two parameters related to minrole, "-LocalServerRole" and "-OptionalServerRole". Using -OptionalServerRole will reportedly provision the farm in Active Directory Account Creation Mode. If this happens you will not be able to create site collections and will see an error in ULS - The page cannot be displayed because your server's current configuration does not support it. To perform this task, use the command line operations in Stsadm.exe. TLDR; Double check you are using -LocalServerRole.
Important - Make sure to use the database server alias you created earlier instead of the actual server name
Important - when PowerShell prompts you for credentials, enter the farm account created above with the machine name in place of the domain. In my case this was demroSp2016-2\spfarm
If you don't enter the farm credentials correctly you're going to get a descriptive "object not set to an instance of an object" error in the logs. If this happens just delete the databases it creates and try the PowerShell command again
If you've done everything correctly, this command will take several minutes to complete.
A Note on New-SpConfigurationDatabase and MinRole
As of writing this article, there is still no SharePoint 2016 documentation on the new-spconfigurationdatabase cmdlet, which includes the MinRole commands (the SharePoint 2013 version is the closest we have).
Ben Stegink has a great writeup on the updates on his blog at https://www.benstegink.com/sharepoint-2016-new-spconfigurationdatabase-missing-documentation/
Run the SharePoint 2016 Products Configuration Wizard
The config wizard will detect that the config database exists and the server is already connected to the farm. After clicking through and letting the wizard do its thing, you should have Central Admin available and the farm is ready!
Save a snapshot of the VM so you never have to do this again
Keep the base VM around, make copies, or do whatever you have to do to pump this out to your dev team without having to go through the motions again. Eventually it will need some service pack attention.
Central Admin, finally
If you're running into trouble, give a shout-out in the comments and I might be able to help. Good luck!
how to create a single server farm SharePoint 2016 on-premise Azure serverroleoptional