This guide covers how to set up your Midnight Ghost Hunt dedicated server on Legion Hosting, configure startup variables, edit Engine.ini and Game.ini settings, set up map rotation, and connect to your server. For admin commands and player management, see Midnight Ghost Hunt Admin Commands.
1. First Start
- Log in to GPanel and select your Midnight Ghost Hunt server.
- Go to the Startup tab and review the available variables (see the table below).
- Set a GAME_NAME to identify your server in the browser.
- Optionally set a PASSWORD to restrict access.
- Return to the Console tab and click Start.
- Wait for the console to confirm the server is ready. The first start generates default configuration files.
2. GPanel Startup Variables
The following variables are available in the GPanel Startup tab. These are passed to the server executable on each start.
| Variable | Required | Description |
|---|---|---|
GAME_NAME |
No | The name displayed in the server browser. Default is Dedicated_Server_01. |
PASSWORD |
No | Optional password required to join the server. Leave blank for a public server. |
MAP |
No | The starting map. Options: Mansion, Asylum, Theatre, Museum, Ghost Ship, Carnival, School, Graveyard, Doll Factory, Mall. Default is Asylum. |
GAME_MODE |
No | Game mode. Options: 4v4 Hunt, 6v6 Hunt, Darkness. Default is 4v4 Hunt. |
REGION |
No | Server region. Options: North America, South America, Western Europe, Northern Europe, Eastern Europe, Middle East, Asia, Africa, Oceania. |
B_DIFFICULTY |
No | Bot difficulty. Options: Easy, Normal, Hard, Auto. Default is Auto. |
ADDITIONAL_ARGS |
No | Extra launch arguments (e.g. -NoBots -NoAutobalance). |
BEACON_PORT |
No | Beacon port. Default is 7787. Managed by GPanel. |
3. Server Configuration (INI Files)
Midnight Ghost Hunt uses Unreal Engine 4 INI files for detailed server configuration. Stop your server before editing these files.
File Locations
MidnightGhostHunt/Saved/Config/LinuxServer/Engine.ini
MidnightGhostHunt/Saved/Config/LinuxServer/Game.ini
Open these files using the Files tab in GPanel or connect via SFTP. If the files do not exist, start and stop the server once to generate them.
Engine.ini -- Key Settings
| Section | Setting | Description |
|---|---|---|
[OnlineSubsystemSteam] |
GameServerQueryPort |
Query port for the Steam server browser. GPanel sets this automatically. |
[/Script/Engine.GameSession] |
MaxPlayers |
Maximum number of players. Default is 8. |
Game.ini -- Key Settings
| Section | Setting | Description |
|---|---|---|
[/Script/MGH.MGHGameMode] |
RoundTimeLimit |
Duration of each round in seconds before midnight triggers. Default is 300 (5 minutes). |
[/Script/MGH.MGHGameMode] |
MidnightDuration |
Duration of the midnight phase in seconds. Default is 120 (2 minutes). |
[/Script/MGH.MGHGameMode] |
WarmupTime |
Time before the round begins in seconds. Default is 15. |
[/Script/MGH.MGHGameMode] |
bAutoBalanceTeams |
Automatically balance teams between rounds. Default is True. |
[/Script/MGH.MGHGameMode] |
NumRounds |
Number of rounds per match. Default is 4. |
Example Game.ini
[/Script/MGH.MGHGameMode]
RoundTimeLimit=300
MidnightDuration=120
WarmupTime=15
bAutoBalanceTeams=True
NumRounds=4
4. Map Rotation
Midnight Ghost Hunt supports configuring which maps are included in the rotation. The map list is defined in Game.ini:
[/Script/MGH.MGHGameMode]
+GameMapRotation=/Game/Maps/Museum
+GameMapRotation=/Game/Maps/Mansion
+GameMapRotation=/Game/Maps/School
+GameMapRotation=/Game/Maps/GhostShip
+GameMapRotation=/Game/Maps/Cabin
+GameMapRotation=/Game/Maps/Asylum
+GameMapRotation=/Game/Maps/Diner
Remove or comment out maps you do not want in the rotation. The server cycles through the listed maps in order after each match.
5. Round and Game Settings
Fine-tune the gameplay experience by adjusting these round settings in Game.ini:
| Setting | Default | Description |
|---|---|---|
RoundTimeLimit |
300 |
Pre-midnight phase duration (seconds). Shorter times pressure hunters; longer times favour ghosts. |
MidnightDuration |
120 |
Post-midnight phase where ghosts hunt the hunters (seconds). |
NumRounds |
4 |
Rounds per match. Teams swap sides each round. |
WarmupTime |
15 |
Countdown before each round starts (seconds). |
bFriendlyFire |
False |
Allow team damage. Enabling this adds an extra layer of caution for hunters. |
6. How to Connect
Option A -- In-Game Server Browser
- Launch Midnight Ghost Hunt via Steam.
- From the main menu, select Play and then Server Browser.
- Search for your server by name or browse the list.
- Select your server and click Join. Enter the password if prompted.
Option B -- Direct Connect via Steam
- Open the Steam client.
- Click View in the top menu, then Game Servers.
- Click Favourites, then Add a server.
- Enter your server IP and port from GPanel's Network tab:
<your-server-ip>:<port> - Click Add this address to favourites, then select the server and click Connect.
Troubleshooting
- Server not appearing in browser: Verify the server is fully started in GPanel. The Steam server browser may take 2-3 minutes to index a new server.
- Cannot connect: Check your server IP and port in GPanel's Network tab. Ensure no password mismatch.
- Crashes on startup: Delete the INI files in
MidnightGhostHunt/Saved/Config/LinuxServer/and restart the server to regenerate defaults. - Map rotation not working: Verify the map paths in
Game.iniare correct. Invalid paths will cause the server to skip those entries. - Performance issues: Reduce
MAX_PLAYERSif the server is lagging with a full lobby.
Related Articles
- Midnight Ghost Hunt Admin Commands
- How to Find Your Server IP and Port
- How to Upload Files via SFTP
- Server Startup Guide
Need Help?
If you run into issues not covered here, open a support ticket and include your server IP, a description of the problem, and any error messages from the GPanel console.