Developers: Please stop using port 8080 for everything reddit / selfhosted ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 01:56 Let me preface by saying I am not a developer, and am just getting into Selfhosting more applications. For years, I've just run Plex and pihole, and am now falling down the rabbit hole. In the last week or two of messing around, I've seen port 8080 be the "absolutely required to use" port for at least 5 different selfhosted web apps that I want to run. This is making me have to spin up multiple VMs because the apps I want to run have a hard-on for this port, and won't let you forward from a different external port to an internal 8080 (as is sometimes possible with docker). This shouldn't be the case. There are other numbers in existence. These apps REQUIRE you to leave 8080 unused by anything else on that IP address, and reference in their code the app being accessed by that port, so you can't use another one. So please, either use a different port, or enable us to choose a different one to run your application. ---------------------------------------------------------------------- faintdeception · 2023-12-26 02:01 8080 is an (almost) default port for web applications, you can get around this problem by using something like apache tomcat to host all of these apps on a single machine and continue to have them all use 8080, or change them to something else. Having them all use a default port like 80, or 8080, or 443 (https) actually makes your life easier because you don't have to open up a new port in your firewall to handle each app. *Update:* Reading the rest of the replies and it looks like OP is trolling, good one. ---------------------------------------------------------------------- BinaryPatrickDev · 2023-12-26 02:05 This is why I use docker honestly, or LXC at least. ---------------------------------------------------------------------- adamshand · 2023-12-26 02:05 This is one of the advantages of using Docker, it doesn't matter what port applications use. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:07 yeah what I'm saying is even with docker, these apps won't let you use another port. it has to say 8080:8080, or else it won't start. I've run into at least 5 of those apps this week ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:09 these are all internal. I'm not exposing them to the internet. ---------------------------------------------------------------------- _iamhamza_ · 2023-12-26 02:11 okay, 8081 it is then! ---------------------------------------------------------------------- Kaapaala · 2023-12-26 02:11 This is why you use a reverse proxy... ---------------------------------------------------------------------- faintdeception · 2023-12-26 02:12 Why does that matter? You can use tomcat to host internal apps without exposing them to the internet. ---------------------------------------------------------------------- revereddesecration · 2023-12-26 02:12 Give me one example. Literally just one ---------------------------------------------------------------------- horus-heresy · 2023-12-26 02:13 Absolutely false. You use different port on your host. why whine? -p 8080:80 Map port 8080 on the Docker host to TCP port 80 in the container for example or use 8081, 8082, 8083… It should not be developer issue to figure out which ports you expose. https://docs.docker.com/network/ what if you want to run 50 instances of mariadb and you only have 1 port 3306 ---------------------------------------------------------------------- losingthefight · 2023-12-26 02:14 This doesn’t make a ton of sense to me. Which apps? Internally, the apps will listen on whatever they are set to, assuming there isn’t an environment variable to override. But at the Docker networking layer, external to the app, the port mapping should be configured and the app itself is none the wiser. ---------------------------------------------------------------------- conamu420 · 2023-12-26 02:14 use docker? ---------------------------------------------------------------------- realdealrd · 2023-12-26 02:18 Yes please - show me one example of these so called apps. Just because you are learning a new piece of technology doesn’t mean the community owes you answers to your poorly formed “recommendations”. ---------------------------------------------------------------------- Cobthecobbler · 2023-12-26 02:18 Host:container Port in the container can't be changed. You can change the host port to whatever you want. Honestly half the reason I use docker in the first place ---------------------------------------------------------------------- realdealrd · 2023-12-26 02:20 I agree, and that would be true IF what OP says is accurate, which is that you can’t change default ports. But most web applications that are built to be distributed allow you to update the port. Reverse proxy notwithstanding. EDIT: now that I think about it, OP are you even aware of how to change ports? What tools are supposedly “locked” to 8080? ---------------------------------------------------------------------- paulmataruso · 2023-12-26 02:20 docker and nginx? ---------------------------------------------------------------------- PurepointDog · 2023-12-26 02:24 What sort of programs. It's nearly always reconfigurable by a CLI arg or config file ---------------------------------------------------------------------- _NetSamurai · 2023-12-26 02:25 Yep This post is a classic case of someone wasting time when they could be copy pasting one conf file. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:26 there was a qbittorrent variant that had built in PIA. I believe SFTPgo gave me the same problem, as well as something else, I think Frigate? I ended up finding a different qbittorrent that worked on port 8888, so that wasn't a big deal. I ended up deleting the others. I'm just finding that 8080 is very widely used. As a novice to self hosting, this is a very frustrating repeat occurrence that I don't believe should exist with the prevalence of other numbers. ---------------------------------------------------------------------- FunkyTown313 · 2023-12-26 02:26 8079 4 life. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:27 exactly my point. The ones I seem to be running into have that requirement, and I don't believe they should. I'm fine with using a different port, and can figure out the syntax in docker. However these apps don't allow you to. ---------------------------------------------------------------------- Old_Bug4395 · 2023-12-26 02:28 >Let me preface by saying I am not a developer Okay... >I've seen port 8080 be the "absolutely required to use" port Can you give us one example? Chances are there's a misunderstanding here, virtually no software that's mature enough for you to be running in your homelab has a hardcoded port requirement. You may need to configure the services you're trying to run, but that doesn't mean that it's hardcoded to use port 8080. ---------------------------------------------------------------------- skmcgowan77 · 2023-12-26 02:28 8077 here 🤘 ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:28 I'm not advanced enough yet for tomcat. I'm still a novice and am noticing this. ---------------------------------------------------------------------- benmargolin · 2023-12-26 02:29 These days apps that don't let you specify a different port, AND have no official support for dockerization, seem rare. And with docker the internal app can't control where you remap it to, and if it tries to override whatever you've specified due to 8080 hard coded in for example, that's just a poorly written app and you probably don't want to host it. But I'd bet that if you read the docs for the apps you'd find there's ways to use different ports and have them be happy. Also when you do and have a bunch of these running, consider setting up a reverse proxy (I like Caddy but there's plenty) so you don't have to remember all the ports :) ---------------------------------------------------------------------- k4zetsukai · 2023-12-26 02:29 My man, you gotta learn what PAT and NAT does lol. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:29 On the same IP address? Using the same port? ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:29 I am ---------------------------------------------------------------------- Sudden_Cheetah7530 · 2023-12-26 02:31 Publishing to a new port from the default would need one line for your configuration and take less than a minute. There is nothing like REQUIRE port. Not being a developer doesn't make you to be qualified to complain about the tech things. Learn it or adapt it. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:31 I agree and understand what you're saying. I'm saying that there are apps that don't allow you to change it. Plus the prevalence of using port 8080 is kind of frustrating, since I have to change these settings in all these applications' docker compose files, and hope they start. ---------------------------------------------------------------------- ericesev · 2023-12-26 02:31 Are you using `--network host`? ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:33 Yes, most are. I'm finding some that aren't ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:34 using both ---------------------------------------------------------------------- Guilty_Serve · 2023-12-26 02:35 Change the environment variables to use a port you want then. ---------------------------------------------------------------------- paulmataruso · 2023-12-26 02:36 So I guess I am confused. Do you just not like having to change the expose port in the YAML every time you spin up a new container? I have yet to run into something that I can not reverse proxy one way or another. ​ You can also just assign a IP from your LAN subnet to each containter if you like, if you a dead set on not changing the ports. Exp below `docker network create -d ipvlan --subnet=172.16.1.0/24 --gateway=172.16.1.1 -o ipvlan_mode=l2 -o parent=eth0 ext-network` `ext-network: #Name of Network that was create via CLI` `ipv4_address: 172.16.1.76 #Set IP Address` `networks:` `ext-network:` `external: true` ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:37 I agree with everything you said. I mentioned in another comment the apps I've seen so far, but I've deleted most of those since then. I have been reading the documentation, and trying to update config files and docker compose files in portainer. I use docker heavily, as well as nginx proxy manager. Reading these other comments I'm still struggling to understand why so many apps, even internally in docker, use port 8080. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:37 on the list ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:41 I believe it was the torrent client docker I tried yesterday that showed in the logs, after trying to start, that it was looking for the app starting in http://localhost:8080, when I changed it to 8081:8080 in the compose file. Others have surfaced as well, I've just deleted them, but mentioned in another comment. ---------------------------------------------------------------------- Anon_8675309 · 2023-12-26 02:41 If the developers aren’t skilled enough to make the port settings configurable, what else are they fucking up? Just don’t use that software. ---------------------------------------------------------------------- schklom · 2023-12-26 02:42 > yeah what I'm saying is even with docker, these apps won't let you use another port. it has to say 8080:8080, or else it won't start. I've run into at least 5 of those apps this week Do you mean the default docker-compose template they show has "8080:8080"? If yes, you know you can customize that, right? If no, please show an example of what you are talking about. Although it is possible, I have never see anything like that. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:43 > I believe it was the torrent client docker I tried yesterday that showed in the logs, after trying to start, that it was looking for the app starting in http://localhost:8080, when I changed it to 8081:8080 in the compose file. That app wouldn't start because of it. Others have surfaced as well, I've just deleted them, but mentioned in another comment. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:44 > I'm still struggling to understand why so many apps, even internally in docker, use port 8080. Again, novice. I've never tried to disallow someone from complaining. Does that usually work for you? ---------------------------------------------------------------------- Old_Bug4395 · 2023-12-26 02:47 This isn't really an example, do you mean transmission? This is the problem, you're vaguely complaining about software not running the way you want it to but you won't give us a specific example of that software or the steps you took to try and configure it to run on a different port, you didn't even post a docker compose. Not trying to be a dick here, but it kind of sounds like you did something like ask chatgpt to set up a homelab for you and then came here when it didn't work the way you wanted it to. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:48 I'm finding your statement to be a good way of looking at it. ---------------------------------------------------------------------- revereddesecration · 2023-12-26 02:50 [And you’ve read this section of the docs and understand how to use it ?](https://docs.docker.com/engine/reference/commandline/run/#publish) ---------------------------------------------------------------------- Old_Bug4395 · 2023-12-26 02:50 Again, really not trying to be rude here, but if you are a novice why are you making claims like this instead of trying to understand what you're doing wrong? ---------------------------------------------------------------------- Veloxy · 2023-12-26 02:51 This or putting everything into a single docker compose files or something. There must be something fishy going on because it shouldn't be a problem with a proper docker setup ---------------------------------------------------------------------- duncan999007 · 2023-12-26 02:55 I think this may be something you’re misunderstanding with the configuration. The container doesn’t know or care what the external port is - if given 8000:8080 (when using the Docker network, not host), and the container’s listening on 8080, it can be reached at 8000 on the host. You could set this to any port you’d like. I number similar services sequentially and use a reverse proxy in front of them so they can be reached by URL. The container can’t do anything to keep you from making that change If you have a specific image you’re seeing this issue on, post it and your config. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:56 I'm sorry I don't meet your high standards for public internet forums. I have since deleted the applications and found alternatives. My question of why 8080 continues to be so widely used, even internally, remains. As I mentioned in another comment, it was a qbittorrent + PIA client, not pia-qbittorrent, but one which I can't find at the moment, that gave me all this frustration until I found pia-qbittorrent. I had another application already running that used 8080, which I had to change the ports on to get the new docker to work, only to find that those stopped working too. I deleted those too. ---------------------------------------------------------------------- pokemonthug · 2023-12-26 02:57 Can I ask why if you aren't connecting outside your network why you are using nginx? I'm not saying it's right or wrong trying to understand more use cases for it. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 02:59 for sure a qbittorrent + PIA client that I deleted once I found an alternative, and can't find at the moment. Logs showed it looking for http://localhost:8080 running the web app, and caused the container to restart continuously. I use portainer, and docker compose whenever possible, and do know how to change the port. Most apps are fine. I'm still wondering why 8080 is so widely used, even internally. ---------------------------------------------------------------------- MoonTimber · 2023-12-26 02:59 Maybe because 80 is for http so people use 8080 for theirs own web application. It used to be used in example all the time too in the past. I personally think it kinda make sense to use 8080 or 8088 for web application. Let’s think it in this way, without DNS it kinda hard to remember which port to access the site. 8080 and 8088 are easier to remember. ---------------------------------------------------------------------- duncan999007 · 2023-12-26 03:00 Can you post the image or compose file for the torrent client “docker” you tried? ---------------------------------------------------------------------- marwanblgddb · 2023-12-26 03:00 I thinkYou got it mixed Try 8081:8080 8081 will be the external entry point, 8080 will be the port used by the app in the docker app I have multiple docker containers on multiple nodes running and they use often port 3000 for example. When I wasn't using Traefik I was just changing the port to 3001:3000 for the containers on the same host. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:02 is that the same as doing the port part of the command or compose file to say 8081:8080, or is this at an even higher level? ---------------------------------------------------------------------- Old_Bug4395 · 2023-12-26 03:02 > I'm sorry I don't meet your high standards for public internet forums. My friend, you didn't provide any information to give us context for your question. I understand being upset about things not working, but you have to give us more information than this if you want help. You'd get a similar response nearly anywhere you asked this exact question. You may want to stay away from the stack sites :P As far as port 8080 being the default, that's because it's what people use most often for testing when developing web applications. A lot of node applications will run by default on port 3000. In pretty much any application that's ready to be hosted be it in a homelab or in a production environment, ports are not forced to a specific value. People are telling you to use nginx or change the external port because of this in combination with your question not really giving us context around what was allegedly forcing these ports. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:03 I'm using portainer. I'm not making one big compose file, at least not intentionally or on my own. ---------------------------------------------------------------------- d-cent · 2023-12-26 03:06 8008... so it's Boob ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:07 I saw someone in a youtube video setting up a reverse proxy, and using a duckdns subdomain to forward to an internal 192.168.x.x address, giving you a user-friendly name for the web address, instead of using an IP address every time. They used nginx proxy manager to do that, and I basically copied that. ---------------------------------------------------------------------- itsmill3rtime · 2023-12-26 03:07 use container and map desired local port to container 8080. they can all have 8080 then. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:10 I mean sure, I understand using these same port numbers when the web was young, but it's been 40 years or so. Shouldn't other ports be tried? Wouldn't other ports have the potential of being even more secure, since they're not easily guessed? I'm still new to the web hosting part so this may be something I don't fully understand. ---------------------------------------------------------------------- ritonlajoie · 2023-12-26 03:11 Yes ---------------------------------------------------------------------- PaulEngineer-89 · 2023-12-26 03:13 A separate VM is a stupid waste. Docker containers can be simply reassigned. But with Cloudflared I do it a much simpler way. I have the containers all join the Cloudflared bridge. Then in the tunnel configuration I just point it to http://application:8080 or whatever the private port number is. No confusion this way. Another alternative is set up a Macvlan. Then you can just join each container to the Macvlan with the LAN IP address of your choice. So for all intents and purposes it’s a separate site using the virtual switch Docker. Downside is it can’t connect to the host so hosting Pihole this way for instance is a nonstarter. ---------------------------------------------------------------------- primalbluewolf · 2023-12-26 03:14 Yup. All my services are accessed on port 443 - standard https. The reverse proxy figures out which service I really want, and connects me to it. From the application's side, its getting a standard connection on port 8080. From my side, Im connecting to [https://somes ervice.my.domain:443](https://someservice.my.domain:443). The reverse proxy is the glue that makes that all stick together neatly. >Clarification: I meant use the same IP address/system and port number for multiple applications. I'm running nginx proxy manager. After the edit: still yes. Thats what the reverse proxy is for. Ive not tried to use NGXPM before, but if its anything like Traefik thats the whole point of using it. You connect to the one system and it acts as an ingress controller, deciding which service to connect you to. In my DNS, [service-a.example.com](https://service-a.example.com) and [service-b.example.com](https://service-b.example.com) both resolve to the reverse proxy, and that system connects me to whichever service - all over port 443, which the application behind thinks is occurring over 8080, or any of a half-dozen other ports. ---------------------------------------------------------------------- PaulEngineer-89 · 2023-12-26 03:15 Ports 80 and 443 are the defaults for web servers, and root only. Almost guaranteed to cause port conflicts, 8080 is sort of a convenient “default http port” but at least won’t conflict with the main server. ---------------------------------------------------------------------- planeturban · 2023-12-26 03:16 If you were running Docker, you were running it the wrong way if you got port collisions. Just saying.. ---------------------------------------------------------------------- primalbluewolf · 2023-12-26 03:19 >Reading these other comments I'm still struggling to understand why so many apps, even internally in docker, use port 8080. So historically 80 was the port for a web application. However, ports below 1000 are "privileged" ports and you need root access on the machine hosting them, to use them. So an easy port to remember which doesnt require root access is 8080. For a naive implementation, everything using port 8080 is a problem, and its one that lots of apps do try to avoid by picking their own random port numbers. Lots of software does this. However, you shouldn't be using the naive implementation unless its for development purposes, so this doesnt really matter. You should be setting this all up in docker, with a reverse proxy in front, so that you can access them all without exposing a million ports to the network. At that point, they are all containerised anyway, so there are no port conflicts. ---------------------------------------------------------------------- primalbluewolf · 2023-12-26 03:21 >However these apps don't allow you to So which app? Its not something the app is even capable of preventing, in docker. From the apps perspective, you are connecting on port 8080. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:28 Also not trolling or looking for downvotes. And I’m not actually looking for help if you read the post. I was ranting. I do appreciate everyone trying to help though. I think I am missing some crucial part of docker that I haven’t come across or skimmed over in my readings. In addition, running a mix of docker and locally hosted apps in Ubuntu ends up causing this issue, since the locally hosted apps are more difficult to change the port. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:31 I am actively trying to find it between comments ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:32 I'm looking for it between comments. My original post was meant as more of a rant than a request for help. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:33 Looking for it between comments ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:34 Yes, most of mine are accessed with friendly addresses too. Getting them set up initially is where I find these problems. Still looking for that docker ---------------------------------------------------------------------- ikbosh · 2023-12-26 03:41 Mate, the fact you keep saying "you believe it was xx" instead of using your browser history to find things you used literally yesterday just goes to show your lack of understanding and unwillingness to actually work with the community to help you understand what is happening. Including the fact that you mention docker container logs complaining about "localhost:8080" but don't realise this is provided within the context of inside the container, where inside the container localhost is talking to itself and not the host and thus it is irrelevant of whatever port mapping in docker you used. The fact the port is used is because it's just become commonly accepted as a suitable alternative to Port 80 or 443. I would say it's two fold, it has likely occurred because of this exact problem you're referring to use to happen prior to docker with the default ports already being taken, and two, it's a beneficial security approach. A variety of people incident already have Port 80 open or something and subsequently having it on 8080 means it won't accidently open to the public, and maybe a third, the idea for most of these is not for the service to be accessed directly but behind say a reverse proxy. To answer your problem on if you did face a subset of applications like this, and had to use 8080. A reverse proxy with different domains/subdomains used per application will work in redirecting to the correct endpoint via the fact http headers include the desired domain and thus subsequently the port can be re-used for several domains. If an application locks into the port, the chance of it also locking domain is slim if not none. I would recommend expanding your knowledge on fundamental networking to better understand why this is all irrelevant and that there are several ways around the problem if it was created by an inexperienced developer. ---------------------------------------------------------------------- faintdeception · 2023-12-26 03:47 > I think I am missing some crucial part of docker You mean the part that almost every reply on this thread has told you about? If this *isn't* `Grade A` trolling then that's too bad. ---------------------------------------------------------------------- _ppaliwal · 2023-12-26 03:47 I think all you miss at the moment is knowledge around these topics. Port 80, 8080, 443 are pretty much standards when it comes to web apps. I would start with learning about docker in detail and port mappings. Then the concept of reverse proxy's. That's all you need. The reason why you are getting downvoted is because is because none of what you are saying is making sense. I can't think of any apps (including qbittorrent) having such requirements, the reason being what port the app exposes inside docker containers has nothing to do with what ports they are available on the docker host. That's the whole point of port mapping. Now, if for some reason, one of your apps was indeed not working with this configuration, then there is something else wrong with it, and since you haven't provided any information like logs, env details, conf examples; none of us can help you out and you continually are defending yourself here and still not giving any other details kinda make this a troll post. ---------------------------------------------------------------------- legz_cfc · 2023-12-26 03:48 I know you already imply this, but another benefit is that 8080 (and everything > 1024) is *not* root so any old user can spin something up for testing ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:49 I believe novices are helpful in pointing out similarities or areas for improvement, that people ingrained may not see or care enough to change. Think of it like releasing an app without any QA by someone that isn't a developer. There's a Silicon Valley episode about that topic. User interaction with something may be easy for the developer that created it, but not easy for someone else trying to use it. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:50 https://old.reddit.com/r/selfhosted/comments/18qwudi/developers_please _stop_using_port_8080_for/key00il/ ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:51 https://old.reddit.com/r/selfhosted/comments/18qwudi/developers_please _stop_using_port_8080_for/key00il/ ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:52 https://old.reddit.com/r/selfhosted/comments/18qwudi/developers_please _stop_using_port_8080_for/key00il/ ---------------------------------------------------------------------- VirtualP1rate · 2023-12-26 03:52 8088:8080 In a compose file the left is the exposed port, this can be any free port on the host. The right side is the internal port in the container. It is basically impossible for a dev to do what you are describing. The external port is controlled by docker not the application. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:54 Yeah in this example, I'm doing everything locally, so not exposed to the internet. However I do want to learn more about the Cloudflared stuff. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:55 https://old.reddit.com/r/selfhosted/comments/18qwudi/developers_please _stop_using_port_8080_for/key00il/ ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 03:57 it could also be something in the apps I'm trying that seems to hardcode port 8080, even if you change it in docker ---------------------------------------------------------------------- MoonTimber · 2023-12-26 03:59 Yes, other port should be tried. For example, many flask app default to 5000 and there are many others. Changing from port 8080 doesn’t increase security at all. Most default to 8080 because it won’t crash with many other applications such as 5432 (database), 8880, 1880 (mqtt). All of these are the defaults that can be changed anyway. ---------------------------------------------------------------------- revereddesecration · 2023-12-26 03:59 Same thing, compose files implements it as the port section. This maps a port inside a container to a port in the docker runtime. Every service you have can run 8080 inside their container and all you need to do is map them to different ports on the host machine and everything works nicely. So based on what you’ve described, either you don’t understand or you’re doing it wrong. But what I’ve described works properly every time. ---------------------------------------------------------------------- Darkextratoasty · 2023-12-26 04:04 In the docker compose file there should be a section called "ports" that has something like this "- 8080:80" in it. Change that to "- 8081:80" and go to "localhost:8081" instead of "localhost:8080". If you're using portainer, under the section "manual network port publishing" change the "host" field from "8080" to "8081", then use "localhost:8081". As long as you leave the container side port alone, you should be able to change the host side port to pretty much anything you want. ---------------------------------------------------------------------- Old_Bug4395 · 2023-12-26 04:08 This is helpful. So I would recommend when seeing projects on github to look at the commit history and see when the last commit was, that should tell you if the project is being actively worked on and updated. You can do the same on docker hub when looking at the project, you can see how long ago the most recent image push was. This is a good indicator for whether a piece of software is going to be functional. Also, you can tell from the docker compose that the images referenced are maintained by the person that's maintaining the repository. By looking at the commit history, you can see that the last update was around 3 years ago, so you can make an educated guess that the images referenced are also not very recently updated. Since you already switched to something new, it sounds like you did the right thing. Another thing to note, looking at the dockerfile for the qbittorrent part of the deployment, it looks like they are specifically installing a testing version of the software. I don't use qb, but chances are between this being a ~3 year old image and the testing version, you'll run into some issues. ~~As far as the error you were seeing, it could be related to the healthcheck that the container attempts to do automatically, though changing the external part of your port bindings shouldn't have an effect on that. Without knowing exactly how docker handles the healthcheck stuff, it's possible that because the image is so old, it conflicted with something in a newer version of docker.~~ Actually it looks like the start script that is in that repository is doing some strange stuff too (https://github.com/sedlund/piaqbittorren t/blob/master/qbittorrent/start.sh), this might be the cause of the error you were seeing after changing the port... in general this repo looks kind of 'unready' for use by anyone other than the maintainer. ---------------------------------------------------------------------- PurepointDog · 2023-12-26 04:10 Like what? ---------------------------------------------------------------------- revereddesecration · 2023-12-26 04:14 Okay, I'm doing some digging. The vpn service in piaqbittorrent is the only one publishing port 8080, and mapping it to internal port 8080. When you access http://localhost:8080 in your web browser, what do you see? If you edit the line to 8081:8080, what happens? ---------------------------------------------------------------------- skmcgowan77 · 2023-12-26 04:17 Or 60065 (boobs) Or 754 (upside down LSD, the code myself and my cohorts used on our beepers, followed by a space and the quantity) ---------------------------------------------------------------------- OkFeed9564 · 2023-12-26 04:17 “It”? You said 5 apps, are you saying this while rant was because a singular app didn’t let you change port? ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:18 I found the app: https://old.reddit.com/r/selfhosted/comments/18qwudi /developers_please_stop_using_port_8080_for/key00il/ There were many links in my history that mentioned pia and qbittorrent that I had to wade through. I am absolutely open to criticism, but everyone here has been referring to the same part of the docker command/compose file that I already know how to change. This particular application is hardcoded for port 8080 and I simply couldn't figure out how to change it in whatever internal config file would make it work, so found another one where I didn't have to. In my searches today, I found yet another application that uses port 8080, which prompted my post. It is true that I am not Cisco certified or Network+ certified nor am I at that level yet. The highest I got as an IT guy was Desktop Support. However, I'm definitely not bad/grandma level at networking. I'd say Level 3 out of 5 or so. There's still much for me to learn, in networking, web apps, and in docker, and I fully and truly realize that. However, that wasn't my argument, or the point of my post anyway. I was simply ranting about port 8080 being so prevalent and requiring all these changes all the time. I can easily see how these types of problems can discourage novices/noobs and prevent them from experiencing the "fun" of self hosting because they run into so many problems just getting started. I know several people who would have given up by now if they knew how many modifications I've had to do to get my server operational. ---------------------------------------------------------------------- pokemonthug · 2023-12-26 04:20 oh okay that makes sense i was using it in the same fashion but also forwarding ports for a couple things before i started playing with cloudflare zero trust tunnels. im not sure if anyone asked you. what error were your apps giving you? i mess up by having blank space where it shouldn't be. also if your containers are starting and you just cant get access there is probably a env variable or config you need to set. for example the qbittorrent openvpn image i am using you can set it in the config file manfully or in the compose. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:21 Thank you for understanding. I also understand, am able to look for answers, and I read lots of documentation. I was just ranting about 8080 in my original post. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:22 yes I understand. ---------------------------------------------------------------------- brunopgoncalves · 2023-12-26 04:23 after all i read in comments, if none works, and the app really need 8080, you can use (dirt?) vmac lan, and give your container a phisical ip on your network ---------------------------------------------------------------------- primalbluewolf · 2023-12-26 04:32 You give it a Web app running on port 8080 - inside the container. Meanwhile on the host, you make that 8181 or 6556 or whatever. ---------------------------------------------------------------------- Pony_Wan · 2023-12-26 04:35 HAHAHAHAHA, I was just thinking the same ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:36 It was yesterday when I tried this so it may be a little fuzzy - I believe I saw the qbittorrent login page only once, and even then the settings were not working. Every other time and for every other port I tried, it did not load at all, and looking at the docker logs for that container showed it was looking for a web app running at http://localhost:8080. This was after I changed it to 8081:8080 in the compose file, as well as while it was still 8080. Obviously the text of the error is not verbatim. Funny enough, I ran into this because I previously used (https://github.com/j4ym0/pia-qbittorrent-docker), but it had stopped working for some reason, possibly was using an old version. I tried this other one, which didn't work either. I ended up having to delete the original docker image (docker image rm xxxxx) for this application and redeploy (https://github.com/j4ym0/pia-qbittorrent-docker) from scratch before a new one would load properly, and now it's working fine, if not better than before. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:38 this whole rant was because I keep seeing port 8080 in various available docker applications, and ran into that problem yesterday. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:40 thank you for your analysis. It's true that I have much to learn. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:41 https://old.reddit.com/r/selfhosted/comments/18qwudi/developers_please _stop_using_port_8080_for/key00il/ ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:43 https://old.reddit.com/r/selfhosted/comments/18qwudi/developers_please _stop_using_port_8080_for/key7uyv/ ---------------------------------------------------------------------- maplenerd22 · 2023-12-26 04:45 The app you posted allows you to change port to whatever port you want. It IS NOT required to be on 8080. ---------------------------------------------------------------------- Thashiznit2003 · 2023-12-26 04:46 you seem to be the only one here that understood the point of my post was a rant! ---------------------------------------------------------------------- nyrangers30 · 2023-12-26 04:47 I still don’t think you understand the concept of port mappings. When you see the mapping 8080:8080, for example, the port 8080 on your host maps to 8080 within the container. 8081:8080 means “map the host port of 8081 to the container’s 8080. All the traffic sent into the host’s port of 8081 into what the container will see as 8080. This will work. Maybe you’re trying to do 8080:8081 instead of 8081:8080. This is my guess. ---------------------------------------------------------------------- Pony_Wan · 2023-12-26 04:51 Don’t take it to serious man. Memes here, serious topics Lemmy. ---------------------------------------------------------------------- maplenerd22 · 2023-12-26 04:51 I saw the post you had for the PIA and Qbittorent app. It absolutely allowed you to change ports for the docker host. You just failed to understand how to change it. ---------------------------------------------------------------------- _ppaliwal · 2023-12-26 04:52 I do get the frustration/confusion for a person who is new to all this; however, in your case it seems that you understand docker and have hosted multiple apps already, it is sort of assumed at this point that you are comfortable with some of these techniques and terminologies and you know these ports are kinda defaults and it really does not matter which port the app wants to use; thus making this rant unjustified. ---------------------------------------------------------------------- boidbreath · 2023-12-26 05:08 Because 8080 is https, so things that are supposed to be accessed via web browser use port 8080 ---------------------------------------------------------------------- thesearenot_my_pants · 2023-12-26 05:13 Yes, the app can assume port 8080. Even if it’s hard-coded (which is bad practice, but irrelevant here and not really a big deal now in the age of docker) you can map whatever external port you want to 8080, e.g. 8081:8080. ---------------------------------------------------------------------- primalbluewolf · 2023-12-26 05:42 > It's somewhere in the code of the application You need to be a lot more specific. Which application? This is entirely solvable with docker networks. ---------------------------------------------------------------------- [deleted] · 2023-12-26 05:46 [deleted] ---------------------------------------------------------------------- nibbl0r · 2023-12-26 05:55 http is 80, https is 443. my /etc/services lists 8080 as http-alt webcache web-caching service. ---------------------------------------------------------------------- mrmclabber · 2023-12-26 06:02 Port 8080 is the default port for tomcat, the developer doesn’t care which port an app runs on. Change the tomcat config if you don’t like it running on 8080, or use containers. This is an end user (you) problem, not a developer problem. ---------------------------------------------------------------------- mrmclabber · 2023-12-26 06:03 Because these apps run in tomcat. Tomcat’s default port is 8080. ---------------------------------------------------------------------- mrmclabber · 2023-12-26 06:05 I would highly doubt the developers are hard coding port numbers. This is an end user issue and not knowing how the apps work or how to configure containers/web agents. ---------------------------------------------------------------------- mrmclabber · 2023-12-26 06:06 This just proves you don’t know how to use docker. The apps would have no idea you are using a non-standard port. Lol ---------------------------------------------------------------------- zaidgs · 2023-12-26 06:15 I think your attitude has been unhealthy through out this thread for the most part. As mentioned elsewhere, you really should approach the situation as someone acquiring information, rather than making bold and outlandish statements out of sheer ignorance under the guise of being a 'novice'. Being a novice does not make your feedback a golden trove of wisdom. I agree that it can be helpful sometimes to see where novices trip up. However, outlandish statements do not help anyone, and only causes people to dismiss you with haste. ---------------------------------------------------------------------- AK1174 · 2023-12-26 06:21 It’s 2023 (almost 2024…), this post is blinding to anyone that has even glanced at this subreddit. Developers use 8080 (and other common ports) for many reasons, and generally if there’s no simple way to change it in the configs, that simple way is through a docker port mapping. There’s very few instances where a new VM is required. there’s a reason why everyone with a brain uses docker, and a reason why every (almost every) software project has deployment options using docker. its to avoid conflicts like this enabling seamless integration into any environment for both the user and the developer. I’m a software engineer, and in my opinion, in the next few years a lot of host-oriented deployment options will be deprecated in most projects in favour of container/package-based solutions. I have a few open source projects of my own, and i don’t provide anything except for a docker-compose file. other solutions are difficult to maintain and have a lot of unpredictability. You’re better off slowly migrating to a docker-oriented server now, than waiting for your entire server stack to be unsupported in the latest versions of your deployments. ---------------------------------------------------------------------- vermyx · 2023-12-26 06:44 8080 is chosen for historical reasons. Each docker container is treated effectively as a separate machine so it doesn’t matter that you have multiple containers having the same port as each container has its own internal ip address so each container is effectively its own machine. You redirect that port to another port externally to the host. Read up on port address translation and you will get a better idea on why you are being downvoted. Your rant is being seen as a “shaking fist at the sky” because of the lack of understanding on the whys and history. ---------------------------------------------------------------------- keyNONE · 2023-12-26 06:57 You have no idea what you are ranting about. Those apps still run on 8080 within the container. Unless you somehow tell them, they have no idea what port is mapped on the host nor do they have a way to find out. Any app that has any sort of hardcoded port requirement is not worth anyone’s effort. ---------------------------------------------------------------------- keyNONE · 2023-12-26 07:00 You cannot be serious. This is so wrong it is ridiculous. ---------------------------------------------------------------------- FunkyTown313 · 2023-12-26 09:42 You win ---------------------------------------------------------------------- boidbreath · 2023-12-26 13:13 Woops, look at me being confidently incorrect, thank you