Starting a Server via Command Line doesn't seem to work

Been working on this for a couple of days and can’t seem to find any other posts on it.

I’m working on getting a headless build for my game. I’ve added the following code to start a server with the command line arg of -server-only

    private void Awake()
    {
        Application.targetFrameRate = 60;

        string[] args = System.Environment.GetCommandLineArgs();
        for (int i = 0; i < args.Length; i++)
        {
            if (args[i] == "-server-only")
            {
                NetworkManager.Singleton.StartServer();
                Debug.Log("Server Started");
            }

        }
    }

When I start the game this way I get a NullReferenceException on the NetworkManager.Singleton.StartServer(); call. Any ideas?

Solved it. Solution was in the GoldenPath documentation under Command Line Helper.
https://docs-multiplayer.unity3d.com/docs/tutorials/goldenpath_series/goldenpath_foundation_module/index.html