You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何将Micro-Payara实例仅绑定到localhost接口运行?

Running Micro-Payara Exclusively on Localhost Interface

I get that you're trying to run your Micro-Payara instance only on the localhost interface and couldn't find a dedicated command line option for it. No worries—even though there's no explicit flag for this in the official docs, you can easily achieve this using JVM system properties, which are fully supported by Payara Micro:

  • Force all services to bind to localhost
    Use the --system-property parameter to set a global network address that applies to all Payara services (HTTP, admin ports, etc.):

    java -jar payara-micro.jar --system-property 'glassfish.network.address=127.0.0.1'
    

    This ensures every network-facing component of your Micro-Payara instance only listens on the localhost interface, making it inaccessible from external machines.

  • Fine-grained control for HTTP service only
    If you just need to restrict the HTTP port to localhost (while leaving other services like admin ports bound to all interfaces), use this property instead:

    java -jar payara-micro.jar --system-property 'glassfish.http.host=127.0.0.1' --port 8080
    

These system properties are officially supported ways to configure Payara's network bindings, even if they aren't listed as standalone command line options. They align with the same network configuration logic used in full Payara Server instances.

内容的提问来源于stack exchange,提问作者sealor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:10:02