CaramelFur / Picsur

An easy to use, selfhostable image sharing service like Imgur with built in converting

Home Page:https://picsur.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change of port number (left side) not working

bigbeka opened this issue · comments

I have tried to change port (left side) from 8080 to say 95 redirects to about:black page.

I have also tried to change right side to 95 and the env port from 8080 to 95, didn't work.

Only port 8080 on all sides works.

I am not sure if it is a bug or what.

Here is my yml:

`version: '3'
services:
picsur:
image: ghcr.io/rubikscraft/picsur:latest
container_name: picsur
ports:
- '95:8080'
environment:
#PICSUR_HOST: '0.0.0.0'
PICSUR_PORT: 8080
PICSUR_DB_HOST: picsur_postgres
PICSUR_DB_PORT: 5432
PICSUR_DB_USERNAME: picsur
PICSUR_DB_PASSWORD: picsur
PICSUR_DB_DATABASE: picsur

  PICSUR_ADMIN_PASSWORD: picsur

  ## Optional, random secret will be generated if not set
  PICSUR_JWT_SECRET: long_string
  PICSUR_JWT_EXPIRY: 1d
  ## Maximum accepted size for uploads in bytes
  PICSUR_MAX_FILE_SIZE: 128000000
  ## No need to touch this, unless you use a custom frontend
  PICSUR_STATIC_FRONTEND_ROOT: "/picsur/frontend/dist"

  ## Warning: Verbose mode might log sensitive data
  # PICSUR_VERBOSE: "true"
restart: unless-stopped

picsur_postgres:
image: postgres:14-alpine
container_name: picsur_postgres
environment:
POSTGRES_DB: picsur
POSTGRES_PASSWORD: picsur
POSTGRES_USER: picsur
restart: unless-stopped
volumes:
- /home/config/picsur:/var/lib/postgresql/data
`

the yml you posted should just work fine. If it doesnt there is probably something wrong with your docker setup. Have you tried changing it to for example 8095? Because a low port number requires extra permissions to be used.

Thats right, 8095 works.

I will have to do some reading on Docker's below 1024 ports and required permissions.

For some reason, other 20 or so containers are working fine on the same docker instance with ports ranging from 80 - 9x.

Any readup suggestion on the low number port permissions on Docker would be appreciated.

Many thanks for your hard work, it is very helpful! As is I could deploy it to my production env for the website picture hosting. 👍

If the others are working, are you sure there isnt something else bound to port 95? You could always just dig up the docker logs for more info.
Might I also ask what your reasoning is for wanting to use port 80-9x? And not just port 8080-809x.

No, nothing else is taking up port 95 as I am trying to use ports 80 and onwards (one port at a time for a service).
😅
List of ports PXDocker (Used):
80:NGINX
81:NGINX Manager WebUI
82:Filebrowser
83:Recipes
84:Audiobookshelf
85:jellyfin
86:Syncthing
87:metube
88:changedetection
89:vimflow
90:tubesync
91:Paperless
92:filestash
93:handbrake
94:immich
95: #Not in use
96:watchyourlan
97:PhotoPrism
98:invoiceninja

8080:picsur

All the ports from 80 - 98 are working fine.

Now that you mention it, having removed picsur from 95 to 8080, port 95 on the same IP is spitting out "ERR_UNSAFE_PORT".

Not sure what that is about.

That probably means something else is running on that port, a quick google on "how to find out what program is using which port linux" should probably help you track it down.

Unrelated but this is the reason: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Port 95 is assigned for something else.
Yes I thought I could just run 80 and onwards ports as a list.