Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ekk

ekk

  1. Home
  2. Categories
  3. memes
  4. When webdevs choosing port for their app

When webdevs choosing port for their app

Scheduled Pinned Locked Moved memes
memes
35 Posts 21 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M [email protected]

    Is haproxy okay?

    F This user is from outside of this forum
    F This user is from outside of this forum
    [email protected]
    wrote last edited by
    #13

    haproxy is awesome

    1 Reply Last reply
    1
    • G [email protected]

      We apparently could have been using 8008 this entire time for the same thing and we haven't and I'm a little sour now.

      F This user is from outside of this forum
      F This user is from outside of this forum
      [email protected]
      wrote last edited by
      #14

      Me & the boys serving http on the boob port

      R H 2 Replies Last reply
      8
      • M [email protected]

        As long as it is configurable, ideally via env, I dont care about the port.

        This could be important for restricted Kubernetes clusters (or certain Gluetun configs). Don't be Nextcloud with their default port of 80 in their Apache image with only hacky ways to change that. God, I hate Nextcloud. They are truly becoming the next Wordpress.

        J This user is from outside of this forum
        J This user is from outside of this forum
        [email protected]
        wrote last edited by
        #15

        The docker image you just set the port like any other program.

        M 1 Reply Last reply
        3
        • M [email protected]

          As long as it is configurable, ideally via env, I dont care about the port.

          This could be important for restricted Kubernetes clusters (or certain Gluetun configs). Don't be Nextcloud with their default port of 80 in their Apache image with only hacky ways to change that. God, I hate Nextcloud. They are truly becoming the next Wordpress.

          K This user is from outside of this forum
          K This user is from outside of this forum
          [email protected]
          wrote last edited by
          #16

          Vaulwarden does this and I'm really frustrated that I have to cap_add NET_BIND_SERVICE in my rootless setup just to make my password server run.

          gray@pawb.socialG 1 Reply Last reply
          4
          • J [email protected]

            The docker image you just set the port like any other program.

            M This user is from outside of this forum
            M This user is from outside of this forum
            [email protected]
            wrote last edited by [email protected]
            #17

            Unless I am missing some obvious setting:
            Restricted Kubernetes doesnt work like that. You have to run the container with a non-root UID (usually something upwards of a million). Non-root users however can't reserve ports below 1025. Nextcloud builds on the default php-apache image which comes with the default apache ports.conf (Listen 80).

            So now this has to be overwritten either by making a custom build (which may require creating a custom build pipeline) or by mounting a new config file (e.g. via ConfigMap) else it wont start. Both are an additional update risk which now has to be documented and checked before updating in addition to changes from the normal nextcloud changelog.

            Similiar issues probably appear with rootless docker/podman unless you add extra capabilities, which is not possible in restricted kubernetes settings.

            J 1 Reply Last reply
            1
            • O [email protected]
              This post did not contain any content.
              Link Preview Image
              R This user is from outside of this forum
              R This user is from outside of this forum
              [email protected]
              wrote last edited by
              #18

              I like 6969

              B 1 Reply Last reply
              6
              • F [email protected]

                Me & the boys serving http on the boob port

                R This user is from outside of this forum
                R This user is from outside of this forum
                [email protected]
                wrote last edited by
                #19

                I'd suckle that server

                1 Reply Last reply
                1
                • M [email protected]

                  Unless I am missing some obvious setting:
                  Restricted Kubernetes doesnt work like that. You have to run the container with a non-root UID (usually something upwards of a million). Non-root users however can't reserve ports below 1025. Nextcloud builds on the default php-apache image which comes with the default apache ports.conf (Listen 80).

                  So now this has to be overwritten either by making a custom build (which may require creating a custom build pipeline) or by mounting a new config file (e.g. via ConfigMap) else it wont start. Both are an additional update risk which now has to be documented and checked before updating in addition to changes from the normal nextcloud changelog.

                  Similiar issues probably appear with rootless docker/podman unless you add extra capabilities, which is not possible in restricted kubernetes settings.

                  J This user is from outside of this forum
                  J This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #20

                  I know nothing about k8s, just started with a homelab using primarily docker in an Ubuntu LXC in proxmox and have been using the nextcloud image via docker compose on a different port by simply editing the compose to outwardly point to a different port, inside the docker container my understanding is it all still uses port 80, thereby causing no further issues with the application.

                  M 1 Reply Last reply
                  1
                  • E [email protected]

                    Imagine using 8081 while 8080 is free. Truly criminal

                    L This user is from outside of this forum
                    L This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #21

                    You also see a fair bit of 8001 iirc

                    1 Reply Last reply
                    1
                    • J [email protected]

                      I know nothing about k8s, just started with a homelab using primarily docker in an Ubuntu LXC in proxmox and have been using the nextcloud image via docker compose on a different port by simply editing the compose to outwardly point to a different port, inside the docker container my understanding is it all still uses port 80, thereby causing no further issues with the application.

                      M This user is from outside of this forum
                      M This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #22

                      Welcome to the community then 🙂 For rootful Docker you are correct - the inside port can be 80 and you can expose it on whatever port you want (ideally you expose it only via reverse proxy and not by port - I can recommend Caddy-Docker-Proxy for that)

                      J null@slrpnk.netN 2 Replies Last reply
                      0
                      • M [email protected]

                        Welcome to the community then 🙂 For rootful Docker you are correct - the inside port can be 80 and you can expose it on whatever port you want (ideally you expose it only via reverse proxy and not by port - I can recommend Caddy-Docker-Proxy for that)

                        J This user is from outside of this forum
                        J This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #23

                        I use Traefik already, but thank you! 🙂

                        M 1 Reply Last reply
                        0
                        • J [email protected]

                          I use Traefik already, but thank you! 🙂

                          M This user is from outside of this forum
                          M This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #24

                          Also a great choice 🙂

                          J 1 Reply Last reply
                          0
                          • M [email protected]

                            Also a great choice 🙂

                            J This user is from outside of this forum
                            J This user is from outside of this forum
                            [email protected]
                            wrote last edited by
                            #25

                            Got me curious on rootless vs root docker, there's so much.

                            M 1 Reply Last reply
                            0
                            • M [email protected]

                              Welcome to the community then 🙂 For rootful Docker you are correct - the inside port can be 80 and you can expose it on whatever port you want (ideally you expose it only via reverse proxy and not by port - I can recommend Caddy-Docker-Proxy for that)

                              null@slrpnk.netN This user is from outside of this forum
                              null@slrpnk.netN This user is from outside of this forum
                              [email protected]
                              wrote last edited by
                              #26

                              If you're using a reverse-proxy, why bother mapping ports at all?

                              M 1 Reply Last reply
                              0
                              • null@slrpnk.netN [email protected]

                                If you're using a reverse-proxy, why bother mapping ports at all?

                                M This user is from outside of this forum
                                M This user is from outside of this forum
                                [email protected]
                                wrote last edited by [email protected]
                                #27

                                Absolutely, it is not necessary if the proxy can reach the service in other ways (e.g. a shared network). Some non-http services don't like to be proxied though. Some constellations where the proxy is not on the same host as the containers may also make it necessary. My answer was based on the possibility to not have the same inside/outside port, not necessarily the need though😉

                                1 Reply Last reply
                                1
                                • J [email protected]

                                  Got me curious on rootless vs root docker, there's so much.

                                  M This user is from outside of this forum
                                  M This user is from outside of this forum
                                  [email protected]
                                  wrote last edited by
                                  #28

                                  Since rootless docker is (mostly) a security improvement, here is a interesting list of other Docker realted security tips I like to consult: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html

                                  1 Reply Last reply
                                  1
                                  • O [email protected]
                                    This post did not contain any content.
                                    Link Preview Image
                                    T This user is from outside of this forum
                                    T This user is from outside of this forum
                                    [email protected]
                                    wrote last edited by
                                    #29

                                    Can't use 80 or 8080? Lets use 12380!

                                    1 Reply Last reply
                                    1
                                    • K [email protected]

                                      Vaulwarden does this and I'm really frustrated that I have to cap_add NET_BIND_SERVICE in my rootless setup just to make my password server run.

                                      gray@pawb.socialG This user is from outside of this forum
                                      gray@pawb.socialG This user is from outside of this forum
                                      [email protected]
                                      wrote last edited by
                                      #30

                                      Are you sure you need that? I just added a —user to the docker run and it started just fine on port 80 in the container.

                                      K 1 Reply Last reply
                                      0
                                      • O [email protected]
                                        This post did not contain any content.
                                        Link Preview Image
                                        H This user is from outside of this forum
                                        H This user is from outside of this forum
                                        [email protected]
                                        wrote last edited by [email protected]
                                        #31

                                        That’s because 8080 is the official unprivileged alternative port for 80, the HTTP port. Web developers are usually using HTTP, so this makes perfect sense. If it supports HTTPS, then 8443, though that one isn’t official.

                                        I run a few open source server projects, and they usually default to 8080 for this reason. I have one that uses 8888, and that’s only because it’s meant for temporary ad-hoc servers.

                                        I’m working on an SFTP server, and it will use 2222, because that’s the most common unprivileged alternative port. There is no official alternative for SSH.

                                        1 Reply Last reply
                                        4
                                        • F [email protected]

                                          Me & the boys serving http on the boob port

                                          H This user is from outside of this forum
                                          H This user is from outside of this forum
                                          [email protected]
                                          wrote last edited by
                                          #32

                                          I prefer the secure version, boobs.

                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups