PaperMC / PaperMC/Paper

faulty WARN about running as an Administrator on Windows

Open
#13,286 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: low status: input wanted version: 1.21.10
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

When running from a non-elevated service, a Paper server will not output a running-as-administrator warning.

Observed/Actual behavior

When running from a non-elevated service, the server outputs the following log

****************************
YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.
YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.
FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/
****************************
Steps/models to reproduce
  1. Using Powershell, create a local user on Windows 11 with no administrator permissions
  2. Create a batch file that starts a paper server with GUI
  3. Create and start a service from the service manager on Windows that starts that server (from that local user)
  4. Watch the logs for the warning
Plugin and Datapack List

None

Paper version
Checking version, please wait...
[17:21:46 INFO]: This server is running Paper version 1.21.10-105-main@1f31ee5 (2025-11-04T19:32:20Z) (Implementing API version 1.21.10-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.10-100-e8c6ba5 (MC: 1.21.10)
Other

Services on Windows that run from a user instead start with an elevated integrity level so they can run while the user is not "signed in". This does not mean that the service has actually elevated permissions.
Paper checks the integrity level, which is usually 1:1 to the actual permission elevation, but not in this case.
I first encountered this issue starting the server through Crafty Controller. Their support team directed me here.

Privileges granted to the service user-- via Process Explorer
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with paper-server/src/main/java/io/papermc/paper/util/ServerEnvironment.java, which the report identifies as the permission check behind the warning. Reproduce the check under a non-elevated Windows service and compare it with an actually elevated process. Done means the warning appears for administrative or root execution but not for a service whose user lacks elevated permissions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.