If you didn't use the web adaptor recipe, then my guess is that the issue is in the federation recipe - like you mentioned, the web context URL portion. The failing parameter is supplied when manually federating.
Curious to see what happens if you change that parm to "web_context_url": https://domain.com:6443/arcgis,
{
"arcgis": {
"server": {
"domain_name": "domain.com",
"private_url": "https://domain.com:6443/arcgis",
"web_context_url": "https://domain.com/server",
"admin_username": "admin",
"admin_password": "changeit",
"is_hosting": true
},
"portal": {
"domain_name": "domain.com",
"wa_url": "https://domain.com/portal",
"admin_username": "admin",
"admin_password": "changeit"
}
},
"run_list": [
"recipe[arcgis-enterprise::federation]"
]
}