diff --git a/src/BizHawk.Client.EmuHawk/Api/Libraries/CommApi.cs b/src/BizHawk.Client.EmuHawk/Api/Libraries/CommApi.cs
index 7602c5222f..2135bfa5dd 100644
--- a/src/BizHawk.Client.EmuHawk/Api/Libraries/CommApi.cs
+++ b/src/BizHawk.Client.EmuHawk/Api/Libraries/CommApi.cs
@@ -1,16 +1,25 @@
 #nullable enable
 
+using System;
+
 using BizHawk.Client.Common;
 
 namespace BizHawk.Client.EmuHawk
 {
 	public sealed class CommApi : ICommApi
 	{
-		public HttpCommunication? HTTP => GlobalWin.httpCommunication;
+		private readonly (HttpCommunication HTTP, MemoryMappedFiles MMF, SocketServer Sockets) _networkingHelpers;
 
-		public MemoryMappedFiles? MMF => GlobalWin.memoryMappedFiles;
+		public HttpCommunication? HTTP => _networkingHelpers.HTTP;
 
-		public SocketServer? Sockets => GlobalWin.socketServer;
+		public MemoryMappedFiles? MMF => _networkingHelpers.MMF;
+
+		public SocketServer? Sockets => _networkingHelpers.Sockets;
+
+		public CommApi(Action<string> logCallback, DisplayManager displayManager, InputManager inputManager, IMainFormForApi mainForm)
+		{
+			_networkingHelpers = mainForm.NetworkingHelpers;
+		}
 
 		public string? HttpTest() => HTTP == null ? null : string.Join("\n", HttpTestGet(), HTTP.SendScreenshot(), "done testing");
 
diff --git a/src/BizHawk.Client.EmuHawk/ArgParser.cs b/src/BizHawk.Client.EmuHawk/ArgParser.cs
index 629427ecc1..8ba9094328 100644
--- a/src/BizHawk.Client.EmuHawk/ArgParser.cs
+++ b/src/BizHawk.Client.EmuHawk/ArgParser.cs
@@ -36,6 +36,9 @@ namespace BizHawk.Client.EmuHawk
 		public string URL_get = null;
 		public string URL_post = null;
 		public bool? audiosync = null;
+		public HttpCommunication httpCommunication = null;
+		public SocketServer socketServer = null;
+		public MemoryMappedFiles memoryMappedFiles = null;
 
 		/// <exception cref="ArgParserException"><c>--socket_ip</c> passed without specifying <c>--socket_port</c> or vice-versa</exception>
 		public void ParseArguments(string[] args, Func<byte[]> takeScreenshotCallback)
@@ -149,15 +152,15 @@ namespace BizHawk.Client.EmuHawk
 				}
 			}
 
-			GlobalWin.httpCommunication = URL_get == null && URL_post == null
+			httpCommunication = URL_get == null && URL_post == null
 				? null // don't bother
 				: new HttpCommunication(takeScreenshotCallback, URL_get, URL_post);
-			GlobalWin.memoryMappedFiles = mmf_filename == null
+			memoryMappedFiles = mmf_filename == null
 				? null // don't bother
 				: new MemoryMappedFiles(takeScreenshotCallback, mmf_filename);
 			if (socket_ip == null && socket_port <= 0)
 			{
-				GlobalWin.socketServer = null; // don't bother
+				socketServer = null; // don't bother
 			}
 			else if (socket_ip == null || socket_port <= 0)
 			{
@@ -165,7 +168,7 @@ namespace BizHawk.Client.EmuHawk
 			}
 			else
 			{
-				GlobalWin.socketServer = new SocketServer(takeScreenshotCallback, socket_ip, socket_port);
+				socketServer = new SocketServer(takeScreenshotCallback, socket_ip, socket_port);
 			}
 		}
 
diff --git a/src/BizHawk.Client.EmuHawk/GlobalWin.cs b/src/BizHawk.Client.EmuHawk/GlobalWin.cs
index 237b6bdaeb..dc7d2c0b12 100644
--- a/src/BizHawk.Client.EmuHawk/GlobalWin.cs
+++ b/src/BizHawk.Client.EmuHawk/GlobalWin.cs
@@ -28,9 +28,6 @@ namespace BizHawk.Client.EmuHawk
 		public static GLManager GLManager;
 
 		public static int ExitCode;
-		public static HttpCommunication httpCommunication = null;
-		public static SocketServer socketServer = null;
-		public static MemoryMappedFiles memoryMappedFiles = null;
 
 		/// <summary>
 		/// Used to disable secondary throttling (e.g. vsync, audio) for unthrottled modes or when the primary (clock) throttle is taking over (e.g. during fast forward/rewind).
diff --git a/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToApi.cs b/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToApi.cs
index ad3033c83d..bac10d81de 100644
--- a/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToApi.cs
+++ b/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToApi.cs
@@ -30,6 +30,9 @@ namespace BizHawk.Client.EmuHawk
 		/// <remarks>only referenced from <see cref="InputApi"/></remarks>
 		long MouseWheelTracker { get; }
 
+		/// <remarks>only referenced from <see cref="CommApi"/></remarks>
+		(HttpCommunication HTTP, MemoryMappedFiles MMF, SocketServer Sockets) NetworkingHelpers { get; }
+
 		/// <remarks>only referenced from <see cref="EmuClientApi"/></remarks>
 		bool PauseAvi { set; }
 
diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs
index 3083ea3902..a90bf5e5f6 100644
--- a/src/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/src/BizHawk.Client.EmuHawk/MainForm.cs
@@ -568,6 +568,9 @@ namespace BizHawk.Client.EmuHawk
 				}
 			}
 
+			// set up networking before Lua
+			NetworkingHelpers = (_argParser.httpCommunication, _argParser.memoryMappedFiles, _argParser.socketServer);
+
 			//start Lua Console if requested in the command line arguments
 			if (_argParser.luaConsole)
 			{
@@ -878,6 +881,8 @@ namespace BizHawk.Client.EmuHawk
 		private Sound Sound => GlobalWin.Sound;
 		public CheatCollection CheatList { get; }
 
+		public (HttpCommunication HTTP, MemoryMappedFiles MMF, SocketServer Sockets) NetworkingHelpers { get; }
+
 		public IRewinder Rewinder { get; private set; }
 
 		public void CreateRewinder()