Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8405719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:54:31+00:00 2026-06-09T22:54:31+00:00

May not be possible but thought I’d ask. I have a script starting my

  • 0

May not be possible but thought I’d ask.

I have a script starting my minecraft server with this command

java -jar minecraft_server.jar

No memory settings or anything else are passed in. Is it possible to declare the port the server should run on at this level?
IE

java -jar minecraft_server.jar -p MINECRAFT_PORT

If this is not possible, then what about this. In the server.properties file, the post var is declared. Is there any way to point it at a ENV variable? Namely MINECRAFT_PORT?

Thanks to any who know this one.

P.s This one is more technical than gaming related so thats why its here and not in Arqade. Its nothing to do with the actual game and more to do with environment variables and server configuration.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:54:31+00:00Added an answer on June 9, 2026 at 10:54 pm

    All the evidence I’ve seen points to the answer – No you can’t do that.

    • The only documented way to configure a Minecraft server port and IP is via the “server.properties” file.
    • The location of the properties file is “fixed”. There is no documented way to override it via Java command arguments.
    • Since the file is clearly just a regular Java Properties file, there won’t be any interpolation of environment variables (like your hypothetical MINECRAFT_PORT) into the properties … unless the Minecraft code is doing this explicitly. (And if it was, you would expect that that the documentation would mention this.)

    Reading between the lines, I’m guessing that you are trying to run multiple servers using a properties file that is “almost the same” across all instances. You could achieve pretty much the same thing by creating a “template” property file containing all of the shared property settings and placeholders for the non-shared values. Then use a simple preprocessor to expand the placeholders for each of the variant.

    Or just use different properties files and keep them in step by hand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may not be possible, but I thought I'd throw it out here: Given
This may not be possible for the carousel but is there a way to
I fear this just may not be possible, but I'm trying to create a
It is quite possible that I may not have got the point, but I
This may not be a programming question, but I don't know where to ask
This may not be the kind of question one should ask on StackOverflow, but
This maybe not possible but I thought I might just give it a try.
This may seem like a weird question but thought I would ask here before
Okay, This may be really simple or it may not even be possible, or
There may not be any real world use for this but i was wondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.