[GH-ISSUE #999] Change Default Ports 80 and 443 #2552

Closed
opened 2026-03-14 04:30:39 +03:00 by kerem · 23 comments
Owner

Originally created by @daygle on GitHub (Mar 8, 2022).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/999

Version:- Current
Type:- Docker

Would someone have instructions on how to change the default ports 443 and 80 in the docker install? I have attempted to do this by changing the ports in the docker-compose.yml file.

ports:

  • "8080:80"
  • "4430:443"

After changing the ports the TacticalRMM webpage loads correctly. Unfortunately when attempting to login with my credentials I am unable to login (after the auth code is entered) - I think it shows a 'Bad login' message. Changing back to port 443 and 80 I am once again able to login.

It appears that I may be missing something.

Any help would be much appreciated.

Originally created by @daygle on GitHub (Mar 8, 2022). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/999 Version:- Current Type:- Docker Would someone have instructions on how to change the default ports 443 and 80 in the docker install? I have attempted to do this by changing the ports in the docker-compose.yml file. ports: - "8080:80" - "4430:443" After changing the ports the TacticalRMM webpage loads correctly. Unfortunately when attempting to login with my credentials I am unable to login (after the auth code is entered) - I think it shows a 'Bad login' message. Changing back to port 443 and 80 I am once again able to login. It appears that I may be missing something. Any help would be much appreciated.
kerem closed this issue 2026-03-14 04:30:45 +03:00
Author
Owner

@dinger1986 commented on GitHub (Mar 8, 2022):

You can't, this isn't a tactical restriction but mesh. It needs to communicate on 443.

<!-- gh-comment-id:1062195505 --> @dinger1986 commented on GitHub (Mar 8, 2022): You can't, this isn't a tactical restriction but mesh. It needs to communicate on 443.
Author
Owner

@AddoSolutions commented on GitHub (Nov 29, 2023):

This is either incorrect, or no longer the case. I can use Mesh on a different port without a problem

<!-- gh-comment-id:1832687945 --> @AddoSolutions commented on GitHub (Nov 29, 2023): This is either incorrect, or no longer the case. I can use Mesh on a different port without a problem
Author
Owner

@silversword411 commented on GitHub (Nov 29, 2023):

Tactical doesn't support changing the port to anything other than 443 because of all the places it's hardcoded into.

You're on your own if you want to try and go thru the code, customize everything necessary and get it to work.

<!-- gh-comment-id:1832726645 --> @silversword411 commented on GitHub (Nov 29, 2023): Tactical doesn't support changing the port to anything other than 443 because of all the places it's hardcoded into. You're on your own if you want to try and go thru the code, customize everything necessary and get it to work.
Author
Owner

@wh1te909 commented on GitHub (Nov 29, 2023):

support was added recently in https://github.com/amidaware/tacticalrmm/pull/1643 (docker only of course)

<!-- gh-comment-id:1832763505 --> @wh1te909 commented on GitHub (Nov 29, 2023): support was added recently in https://github.com/amidaware/tacticalrmm/pull/1643 (docker only of course)
Author
Owner

@AddoSolutions commented on GitHub (Nov 29, 2023):

I guess that’s why I’m saying this. That is the point of an issue, to point out that it’s not supported, and is a pretty standard function.

I believe this issue should at least be left open, even if not resolved

Get Outlook for iOShttps://aka.ms/o0ukef


From: Dan @.>
Sent: Wednesday, November 29, 2023 4:56:30 PM
To: amidaware/tacticalrmm @.
>
Cc: Nick Artman @.>; Comment @.>
Subject: Re: [amidaware/tacticalrmm] Change Default Ports 80 and 443 (Issue #999)

support was added recently in #1643https://github.com/amidaware/tacticalrmm/pull/1643 (docker only of course)


Reply to this email directly, view it on GitHubhttps://github.com/amidaware/tacticalrmm/issues/999#issuecomment-1832763505, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA5OGCLGMZXZHU3LEORDDY3YG6VQ5AVCNFSM5QHOOWN2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBTGI3TMMZVGA2Q.
You are receiving this because you commented.Message ID: @.***>

<!-- gh-comment-id:1832787741 --> @AddoSolutions commented on GitHub (Nov 29, 2023): I guess that’s why I’m saying this. That is the point of an issue, to point out that it’s not supported, and is a pretty standard function. I believe this issue should at least be left open, even if not resolved Get Outlook for iOS<https://aka.ms/o0ukef> ________________________________ From: Dan ***@***.***> Sent: Wednesday, November 29, 2023 4:56:30 PM To: amidaware/tacticalrmm ***@***.***> Cc: Nick Artman ***@***.***>; Comment ***@***.***> Subject: Re: [amidaware/tacticalrmm] Change Default Ports 80 and 443 (Issue #999) support was added recently in #1643<https://github.com/amidaware/tacticalrmm/pull/1643> (docker only of course) — Reply to this email directly, view it on GitHub<https://github.com/amidaware/tacticalrmm/issues/999#issuecomment-1832763505>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA5OGCLGMZXZHU3LEORDDY3YG6VQ5AVCNFSM5QHOOWN2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBTGI3TMMZVGA2Q>. You are receiving this because you commented.Message ID: ***@***.***>
Author
Owner

@AddoSolutions commented on GitHub (Mar 14, 2024):

@dinger1986 Can we re-open this issue? The request remains open, is possible, and being able to change default ports is a pretty standard function of most software. It is also one of the main reasons I am not using this platform

<!-- gh-comment-id:1998288564 --> @AddoSolutions commented on GitHub (Mar 14, 2024): @dinger1986 Can we re-open this issue? The request remains open, is possible, and being able to change default ports is a pretty standard function of most software. It is also one of the main reasons I am not using this platform
Author
Owner

@wh1te909 commented on GitHub (Mar 14, 2024):

i've re-opened it, but will require some significant rework as everything communicates thru https and secure websockets, 443 also standard across the industry for https (when's the last time you had to type in a port number when going to a website xD)

<!-- gh-comment-id:1998313806 --> @wh1te909 commented on GitHub (Mar 14, 2024): i've re-opened it, but will require some significant rework as everything communicates thru https and secure websockets, 443 also standard across the industry for https (when's the last time you had to type in a port number when going to a website xD)
Author
Owner

@AddoSolutions commented on GitHub (Mar 14, 2024):

That is correct, but there are applications where using non-standard ports is preferable. I will review and see what it'd take to get there.

<!-- gh-comment-id:1998320751 --> @AddoSolutions commented on GitHub (Mar 14, 2024): That is correct, but there are applications where using non-standard ports is preferable. I will review and see what it'd take to get there.
Author
Owner

@aNostalgicTrooper commented on GitHub (Mar 20, 2024):

I understand port 443 is standard for HTTPS, but for IP re-usage changing the port number would be an incredibly useful feature.

For hosted services its nice to be able not have to use a new IP every time I need to host a new application, where if I could change the port number I have much more flexibility with IP usage.

I very much appreciate how baked into the code the port numbers are, some other applications bake it in at the point of install after you chose what port you want to use.

I am very serious about becoming a sponsor but this is a slight issue.

<!-- gh-comment-id:2010792748 --> @aNostalgicTrooper commented on GitHub (Mar 20, 2024): I understand port 443 is standard for HTTPS, but for IP re-usage changing the port number would be an incredibly useful feature. For hosted services its nice to be able not have to use a new IP every time I need to host a new application, where if I could change the port number I have much more flexibility with IP usage. I very much appreciate how baked into the code the port numbers are, some other applications bake it in at the point of install after you chose what port you want to use. I am very serious about becoming a sponsor but this is a slight issue.
Author
Owner

@dinger1986 commented on GitHub (Mar 20, 2024):

By hosted services you mean on servers running other services? Which is a problem because you might have conflicting services on a hosted server which then will prevent install

<!-- gh-comment-id:2010808514 --> @dinger1986 commented on GitHub (Mar 20, 2024): By hosted services you mean on servers running other services? Which is a problem because you might have conflicting services on a hosted server which then will prevent install
Author
Owner

@AddoSolutions commented on GitHub (Mar 20, 2024):

Not if you are dockerized  – That is one of the anchor tennants of containerization, you can have as many pieces of software running on one box, without conflict, so long as you have enough resources to support it.

<!-- gh-comment-id:2010932963 --> @AddoSolutions commented on GitHub (Mar 20, 2024): Not if you are dockerized  – That is one of the anchor tennants of containerization, you can have as many pieces of software running on one box, without conflict, so long as you have enough resources to support it.
Author
Owner

@aNostalgicTrooper commented on GitHub (Mar 21, 2024):

I tend to host many VM’s on a cluster and then use NAT to fort forward in from the outside world. Though we do have a number of IP’s coming into the firewall and can use Port Address Translation (PAT) the clients will always expect to be coming back in on 443 in this case so have to use an IP that does not have 443 NAT’d though it already.

Unless I am totally overlooking something in this case.

<!-- gh-comment-id:2011111783 --> @aNostalgicTrooper commented on GitHub (Mar 21, 2024): I tend to host many VM’s on a cluster and then use NAT to fort forward in from the outside world. Though we do have a number of IP’s coming into the firewall and can use Port Address Translation (PAT) the clients will always expect to be coming back in on 443 in this case so have to use an IP that does not have 443 NAT’d though it already. Unless I am totally overlooking something in this case.
Author
Owner

@AddoSolutions commented on GitHub (Mar 21, 2024):

Correct, which is what I am looking for – I need to be able to have the clients talk on a different port.

Code-wise, there shouldn't be too much in the way to get this moving. I am still trying to get some time to dig into the codebase, but there should only be two different components that need updating:

  1. The client needs to be configured to recognize the different port number
  2. Any URL's that the software generates needs to be able to recognize the forwarded port.

Easiest route:

In most other packages, there is a separate environment variable that is provided (ex. PUBLIC_URL) that is what is used for any published URLs. That URL can include a :1234at the end, and since the software is just plopping in the exact URL provided in the env, the only code change is to use the env variable everywhere instead of something generated.

<!-- gh-comment-id:2012242210 --> @AddoSolutions commented on GitHub (Mar 21, 2024): Correct, which is what I am looking for – I need to be able to have the clients talk on a different port. Code-wise, there shouldn't be too much in the way to get this moving. I am still trying to get some time to dig into the codebase, but there should only be two different components that need updating: 1. The client needs to be configured to recognize the different port number 2. Any URL's that the software generates needs to be able to recognize the forwarded port. **Easiest route:** In most other packages, there is a separate environment variable that is provided (ex. `PUBLIC_URL`) that is what is used for any published URLs. That URL can include a `:1234`at the end, and since the software is just plopping in the exact URL provided in the env, the only code change is to use the env variable everywhere instead of something generated.
Author
Owner

@dinger1986 commented on GitHub (Mar 21, 2024):

Why not use nginx or another proxy? There's plenty of guides on our docs.

Especially if you are running docker seems fairly standard practice

<!-- gh-comment-id:2014065348 --> @dinger1986 commented on GitHub (Mar 21, 2024): Why not use nginx or another proxy? There's plenty of guides on our docs. Especially if you are running docker seems fairly standard practice
Author
Owner

@ssteeltm commented on GitHub (Mar 22, 2024):

If dont want proxy, why not just use the old nats port. Guess its waste of time.

<!-- gh-comment-id:2014073762 --> @ssteeltm commented on GitHub (Mar 22, 2024): If dont want proxy, why not just use the old nats port. Guess its waste of time.
Author
Owner

@wh1te909 commented on GitHub (Mar 22, 2024):

Even if using the old nats port, the agent still sends http requests back to the server. The agent does support custom urls/ports but this is not currently documented. On the server side should just be a matter of changing nginx to listen on another port other than 443 and then yes going through the code to find everywhere URLs are generated etc.

<!-- gh-comment-id:2014097313 --> @wh1te909 commented on GitHub (Mar 22, 2024): Even if using the old nats port, the agent still sends http requests back to the server. The agent does support custom urls/ports but this is not currently documented. On the server side should just be a matter of changing nginx to listen on another port other than 443 and then yes going through the code to find everywhere URLs are generated etc.
Author
Owner

@AddoSolutions commented on GitHub (Mar 22, 2024):

Even if using the old nats port, the agent still sends http requests back to the server. The agent does support custom urls/ports but this is not currently documented. On the server side should just be a matter of changing nginx to listen on another port other than 443 and then yes going through the code to find everywhere URLs are generated etc.

This – to be clear, it makes no difference to me what port the application server listens on (although it should really be configurable) that is outside of the scope of this issue,

I specifically am requesting that I can do a NAT from port X to 443 on the application server, and the client will still be able to communicate correctly as long as the application server has been told what that port is. As long as I can do that, that will close this issue

Based on your comment, this may just be a docs thing, although I was expressly told this was NOT possible earlier

<!-- gh-comment-id:2014109144 --> @AddoSolutions commented on GitHub (Mar 22, 2024): > Even if using the old nats port, the agent still sends http requests back to the server. The agent does support custom urls/ports but this is not currently documented. On the server side should just be a matter of changing nginx to listen on another port other than 443 and then yes going through the code to find everywhere URLs are generated etc. This – to be clear, it makes no difference to me what port the application server listens on (although it should really be configurable) that is outside of the scope of this issue, I specifically am requesting that I can do a NAT from port X to 443 on the application server, and the client will still be able to communicate correctly as long as the application server has been told what that port is. As long as I can do that, that will close this issue Based on your comment, this may just be a docs thing, although I was expressly told this was NOT possible earlier
Author
Owner

@wh1te909 commented on GitHub (Mar 22, 2024):

there are still places inside the code where 443/https is hardcoded so no it won't work until we find all those

<!-- gh-comment-id:2014120076 --> @wh1te909 commented on GitHub (Mar 22, 2024): there are still places inside the code where 443/https is hardcoded so no it won't work until we find all those
Author
Owner

@aNostalgicTrooper commented on GitHub (Mar 22, 2024):

From my understanding there was a lot of hard coded places that could not be addressed by simple PAT or Proxy usage as the clients will be talking back to 443 and the PAT rule or Proxy just wont be listening.

Sadly all these hardcoded places need to be written on installation of an instance or on a configuration page that runs a script to go and change all known ports things live on to answer back from all the clients out there.

This is not just a simple task though as if an application is written with hardcoding these in mind its not so easy to make them changes later on. I fully accept that.

People short on IP addresses who self host in their own owned infrastructure would very much appreciate this being a feature though.

I am going to have to try and free up an IP address for testing as I do very much like the look of TRMM

<!-- gh-comment-id:2015680526 --> @aNostalgicTrooper commented on GitHub (Mar 22, 2024): From my understanding there was a lot of hard coded places that could not be addressed by simple PAT or Proxy usage as the clients will be talking back to 443 and the PAT rule or Proxy just wont be listening. Sadly all these hardcoded places need to be written on installation of an instance or on a configuration page that runs a script to go and change all known ports things live on to answer back from all the clients out there. This is not just a simple task though as if an application is written with hardcoding these in mind its not so easy to make them changes later on. I fully accept that. People short on IP addresses who self host in their own owned infrastructure would very much appreciate this being a feature though. I am going to have to try and free up an IP address for testing as I do very much like the look of TRMM
Author
Owner
<!-- gh-comment-id:2016502488 --> @AddoSolutions commented on GitHub (Mar 23, 2024): So looking through the code here, I see a few spots that would likely need addressed, but there aren't a ton: Client: https://github.com/amidaware/rmmagent/blob/51f6e93a35274fa0002f199c8c070904446866c8/agent/agent.go#L220 Server: https://github.com/amidaware/rmmagent/blob/51f6e93a35274fa0002f199c8c070904446866c8/agent/agent.go#L220 https://github.com/amidaware/tacticalrmm/blob/89aceda65a1c54fea7b18250ca63614f091eac6e/api/tacticalrmm/core/management/commands/get_mesh_exe_url.py#L33 https://github.com/amidaware/tacticalrmm/blob/89aceda65a1c54fea7b18250ca63614f091eac6e/api/tacticalrmm/clients/views.py#L378
Author
Owner

@Timtams23 commented on GitHub (Aug 21, 2024):

Is it in the future plans to allow these codes to be variable so that users that want to use ports other than 80 or 443 can simply specify the port and the code will allow it?

I appreciate the teams work on this amazing service.

<!-- gh-comment-id:2301147213 --> @Timtams23 commented on GitHub (Aug 21, 2024): Is it in the future plans to allow these codes to be variable so that users that want to use ports other than 80 or 443 can simply specify the port and the code will allow it? I appreciate the teams work on this amazing service.
Author
Owner

@wh1te909 commented on GitHub (Aug 21, 2024):

yes it's planned i'm actually working on it now

<!-- gh-comment-id:2301207788 --> @wh1te909 commented on GitHub (Aug 21, 2024): yes it's planned i'm actually working on it now
Author
Owner

@ScubaCaribe commented on GitHub (Dec 2, 2025):

Do we happen to have any updates on if/when this will be addressed?

<!-- gh-comment-id:3600217865 --> @ScubaCaribe commented on GitHub (Dec 2, 2025): Do we happen to have any updates on if/when this will be addressed?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2552
No description provided.