Back

Change traefik port

  • 0
  • Self Hosted
Bohda Řehák
8 Mar, 2024, 14:27

Hi, I currently have Appwrite running on the default port 443. However, now I want to expose NPM on port 443, which will forward traffic to the Appwrite Traefik. Is it okay to change the port in the Appwrite docker-compose file from port 443 to another port, or will the upgrade script change the Traefik port back to 443? Or do I need to reinstall Appwrite entirely and define the port on which I want to have Appwrite currently during the installation?

TL;DR
Developers are discussing changing the port for Traefik in an Appwrite docker-compose file. One developer mentions that changing ports should be fine, but another warns that an upgrade using docker pull may override the tweaks. They suggest checking the docker-compose.yml and using environment variables to define the port. Additionally, a guide for running Appwrite behind Nginx is shared. Ultimately, it seems changing the port is possible, but developers should be cautious of upgrades potentially undoing their changes.
D5
8 Mar, 2024, 14:32

I think changing the env var should do the job

Bohda Řehák
8 Mar, 2024, 14:37

Uh, i looked and tried to find it in .env, but haven't find any variable which defines port 443

darShan
8 Mar, 2024, 14:38

check docker-compose.yml

Iron
8 Mar, 2024, 14:38
Bohda Řehák
8 Mar, 2024, 14:39

Yeah I'm following this guide, but right in the first step Steven mentions installing appwrite using non-standard ports.

Bohda Řehák
8 Mar, 2024, 14:41

Yes, i can edit ports in docker-compose.yml, but according to my knowledge, the upgrade script would remove the tewaks i did.

darShan
8 Mar, 2024, 14:47

Upgrade doesn't change your ports though. Infact, any upgrade using docker pull will override your misc. tweaks in appwrite if I am not wrong.

Bohda Řehák
8 Mar, 2024, 14:54

So i can change this piece of configuration:

TypeScript
services:
  traefik:
    some_configuration
    command:
      some_configuration
      - --entrypoints.appwrite_web.address=:80
      - --entrypoints.appwrite_websecure.address=:443
    ports:
      - 80:80
      - 443:443

To this configuration?

TypeScript
services:
  traefik:
    some_configuration
    command:
      some_configuration
      - --entrypoints.appwrite_web.address=:80
      - --entrypoints.appwrite_websecure.address=:443
    ports:
      - 8080:80
      - 8443:443
darShan
8 Mar, 2024, 14:57

that should work. if there's nginx involved, there might be additional steps for forwarding. Its been a while since I've touched any nginx conf. so the memory is hazzy.

Bohda Řehák
8 Mar, 2024, 14:59

Ok, thank you for your help! Could you also elaborate a bit more on what does appwrite upgrade script change/remove or is there a link i could read about this topic?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more