# DM\_SERVICE\_PORT is ignored

**URL:** <https://forum.defold.com/t/dm-service-port-is-ignored/81748>\
**Category:** Questions\
**Created:** [October 11, 2025, 1:23pm UTC](https://forum.defold.com/t/dm-service-port-is-ignored/81748 "2025-10-11T13:23:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wind](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/wind/32/34710_2.png) [@wind](https://forum.defold.com/u/wind)\
**Post date:** [October 11, 2025, 1:23pm UTC](https://forum.defold.com/t/dm-service-port-is-ignored/81748/1 "2025-10-11T13:23:55Z")

</div>

Hi

I’m running defold on Linux, the problem is variable DM\_SERVICE\_PORT is ignored when opening the editor

I’ve set `export DM_SERVICE_PORT=8001`. But when running the editor, the editor still runs on random port

```lua
util.http-server - {:line 376, :msg "Http server running", :local-url "http://localhost:44085"}

```

Because of firewall i need the editor to keep using the same port.

Is there any other way to set the http port?

Thank you

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [October 12, 2025, 9:05pm UTC](https://forum.defold.com/t/dm-service-port-is-ignored/81748/2 "2025-10-12T21:05:47Z")

</div>

> [@wind](#):
>
> I’ve set `export DM_SERVICE_PORT=8001`. But when running the editor, the editor still runs on random port
> 
> ```lua
> util.http-server - {:line 376, :msg "Http server running", :local-url "http://localhost:44085"}
> 
> ```
> 
> Because of firewall i need the editor to keep using the same port.
> 
> Is there any other way to set the http port?

That’s correct, DM\_SERVICE\_PORT is ignored in that case ([defold/engine/docs/DEBUG\_PORTS\_AND\_SERVICES.md at dev · defold/defold · GitHub](https://github.com/defold/defold/blob/dev/engine/docs/DEBUG_PORTS_AND_SERVICES.md)). It’s a bit silly to be honest and I think it’s something we should change. Can you please open a feature request on GitHub?

---

<div class="post-metadata">

**Author:** ![Apetzu](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/apetzu/32/21262_2.png) [@Apetzu](https://forum.defold.com/u/Apetzu)\
**Post date:** [May 22, 2026, 9:22pm UTC](https://forum.defold.com/t/dm-service-port-is-ignored/81748/3 "2026-05-22T21:22:50Z")

</div>

Hi!

I currently have the same problem with Defold [v1.12.4](https://github.com/defold/defold/releases/tag/1.12.4). I’m using Kubuntu 24.04. When I try to run Defold (standalone executable) from terminal with `DM_SERVICE_PORT=8001 ./Defold` or with `export DM_SERVICE_PORT=8001` + `./Defold`, the editor still runs in random port:

```lua
util.http-server - {:line 380, :msg "Http server running", :local-url "http://localhost:41785"}

```

Is there still something that I’m missing? Or should I create a new issue ticket? I saw that the previous issue was fixed by [Check ENV and validate DM\_SERVICE\_PORT by JosephFerano · Pull Request #11407 · defold/defold · GitHub](https://github.com/defold/defold/pull/11407). But I have still the issue in v1.12.4. I also tested [v1.11.2](https://github.com/defold/defold/releases/tag/1.11.2) and [v1.12.0](https://github.com/defold/defold/releases/tag/1.12.0) but the issue reproduces also in these.

---

<div class="post-metadata">

**Author:** ![Apetzu](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/apetzu/32/21262_2.png) [@Apetzu](https://forum.defold.com/u/Apetzu)\
**Post date:** [October 14, 2026, 7:44pm UTC](https://forum.defold.com/t/dm-service-port-is-ignored/81748/4 "2026-10-14T19:44:05Z")

</div>

For the record if someone has the same issue I had: `--port` argument seems to work and changes the port of the HTTP server (documented in here: [Automating the Defold editor with HTTP](https://defold.com/manuals/editor-http-api/#starting-the-editor-from-an-external-tool)). For example, running `./Defold --port 7777` works for me and the port is changed to 7777. Maybe `DM_SERVICE_PORT` is not correct parameter in my use case.
