Utilities for running and updating a Minecraft Bedrock Dedicated Server on Windows. After initial setup, schedule the PowerShell script with Windows Task Scheduler to automatically check for the latest official server release, install updates when needed, preserve your world and configuration, and start the server again without user interaction.
This repository contains a small Windows automation setup:
MinecraftBedrockServerUpdateScript.ps1checks for updates, backs up local server state, installs the latest Bedrock server files, restores your world/configuration, and startsbedrock_server.exe.get-bedrock-url.jsuses Playwright/Chrome to find the latest official Bedrock Dedicated Server ZIP URL from minecraft.net.package.json/package-lock.jsondefine the Node dependency onplaywright.
The script resolves paths relative to its own location, so the repository folder is treated as the server root.
- Windows
- PowerShell, included with Windows
- Node.js and npm
- Google Chrome, because the helper script launches Playwright with
channel: 'chrome'
The bedrock-server folder does not need to exist before the first run. The script creates it when installing the server.
There are two common setup options.
-
Install the required tools:
- Node.js so the
nodeandnpmcommands are available. - Google Chrome so the helper script can find the latest Bedrock download.
- Node.js so the
-
Download this repository from GitHub:
- Open the repository page in your browser.
- Select Code.
- Select Download ZIP.
-
Extract the ZIP somewhere permanent, for example:
C:\MinecraftServerAvoid temporary folders like
Downloadsif you plan to run the server long term. -
Open PowerShell in the extracted folder:
- Open the folder in File Explorer.
- Right-click empty space in the folder.
- Select Open in Terminal or Open PowerShell window here.
-
Install dependencies and run the script:
npm install .\MinecraftBedrockServerUpdateScript.ps1
If PowerShell blocks the script, run:
powershell.exe -ExecutionPolicy Bypass -File .\MinecraftBedrockServerUpdateScript.ps1git clone https://github.com/redwheeler3/minecraft-server.git
cd minecraft-server
npm install
.\MinecraftBedrockServerUpdateScript.ps1On first run, the script downloads the latest official Bedrock Dedicated Server ZIP, creates bedrock-server/, extracts the server files, and starts bedrock_server.exe.
The script uses these paths under the repository/script folder:
$rootDir = $PSScriptRoot
$gameDir = "$rootDir\bedrock-server"
$backupDir = "$rootDir\BACKUP"
$scriptLogFile = "$rootDir\MinecraftScriptLog.log"
$serverLogFlle = "$rootDir\MinecraftServerLog.log"During an install or update, the script:
- Finds the latest official Bedrock Dedicated Server ZIP.
- Skips the update if that ZIP was already downloaded.
- Backs up local server state when present:
server.propertiesallowlist.jsonpermissions.jsonvalid_known_packs.jsonworlds/
- Removes older downloaded server ZIPs from
BACKUP/. - Downloads the latest ZIP.
- Stops any running
bedrock_serverprocess. - Recreates
bedrock-server/for a clean install. - Extracts the ZIP, restores the backed-up state, and starts the server.
Generated runtime files are intentionally ignored by Git:
node_modules/
BACKUP/
*.log
bedrock-server/
If you already have an existing bedrock-server folder, place it beside MinecraftBedrockServerUpdateScript.ps1 before running the script.
After manually testing the script, schedule it with Windows Task Scheduler.
Important general settings:
- Select Run whether user is logged on or not so the server can start after reboots or while no one is signed in.
- Check Run with highest privileges so the script has the permissions it needs to stop/start the server process and update files.
Suggested action:
Program/script: powershell.exe
Arguments: -ExecutionPolicy Bypass -File "C:\path\to\minecraft-server\MinecraftBedrockServerUpdateScript.ps1"
Start in: C:\path\to\minecraft-server
Suggested triggers:
- At system startup, so the server starts after a reboot.
- On a recurring schedule at a low-traffic time, so updates are checked when players are less likely to be connected.
- Optionally, when the computer resumes from sleep:
- Begin the task: On an event
- Log:
System - Source:
Microsoft-Windows-Power-Troubleshooter - Event ID:
1
The script uses $PSScriptRoot, but setting Start in is still recommended because it makes scheduled task behavior easier to reason about.
| Problem | Fix |
|---|---|
| PowerShell blocks the script | Run it with powershell.exe -ExecutionPolicy Bypass -File .\MinecraftBedrockServerUpdateScript.ps1. |
node or npm is not found |
Install Node.js, then confirm with node --version and npm --version. |
| Playwright dependencies are missing | Run npm install from the repository folder. |
| Chrome is not installed | Install Google Chrome, or update get-bedrock-url.js to use a different installed browser/channel. |
| Download URL cannot be found | Microsoft may have changed the Bedrock download page; get-bedrock-url.js may need its selector updated. |
| Startup, download, extraction, or update issues | Check MinecraftScriptLog.log and MinecraftServerLog.log. |
Source: Shockbyte - How to Connect to your Minecraft Bedrock Server on Nintendo Switch
-
Press the house button to go to the home screen.
-
Open System Settings.
-
Select Internet from the left sidebar.
-
Select Internet Settings.
-
If prompted for a parental control password, the code is
0710. -
Select your current network under Registered Networks. If no network is connected, choose one under Networks Found, enter the password, then return to Internet Settings.
-
Select Change Settings.
-
Set DNS Settings to Manual.
-
Set Primary DNS to:
104.238.130.180 -
Set Secondary DNS to:
008.008.008.008 -
Select Save.
-
Select Connect to This Network.
-
Select Play from the main menu.
-
Open the Servers tab and select any featured server.
-
On the server list, select your saved server name if it appears. Otherwise, continue.
-
Select Connect to a Server.
-
Enter your server address, for example:
your-server.example.com -
Turn on Add to Server List.
-
Select Submit.
This project is licensed under the MIT License. See LICENSE for details.