# Change Kopia port with Docker compose

**URL:** <https://kopia.discourse.group/t/change-kopia-port-with-docker-compose/3206>\
**Category:** General Topics\
**Created:** [August 19, 2024, 9:14am UTC](https://kopia.discourse.group/t/change-kopia-port-with-docker-compose/3206 "2024-08-19T09:14:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tugdualenligne](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/tugdualenligne/32/469_2.png) [@tugdualenligne](https://kopia.discourse.group/u/tugdualenligne)\
**Post date:** [August 19, 2024, 9:14am UTC](https://kopia.discourse.group/t/change-kopia-port-with-docker-compose/3206/1 "2024-08-19T09:14:44Z")

</div>

Hi there, long time user of Kopia here. Great program, very reliable I must say. Used against S3 (Backblaze then B2) and testing with Google Cloud.

During some time, my docker compose running 3 different Kopia instances at once was running fine, all Kopia UI were accessible with unique URL (I use Traefik). I realised a few days ago that it is no longer the case, only one of the 3 UI is available. there is apparently a conflict between them, and I’m trying to investigate/fix this. At the end of this post is the docker compose I use with Traefik, simplified to one Kopia instance.

2 ask/question from me:  
1/ Can anyone provide a working exemple of Docker compose with several Kopia instances, please?  
2/ Key question: if I want to change the port to access the webui, for example to 51516, is the following the right way to do it in docker compose:  
ports:  
-51516:51515  
=\> **do I need also to change this command** “–address=0.0.0.0:51515” **to port 51516**?

My current docker compose:

```auto
services:
  kopia3: # backup vers Storj
    image: kopia/kopia:latest
    container_name: backup_kopia3
    hostname: kopia3
    restart: unless-stopped
    ports:
      - 51516:51515
# expose:
# - 51516
    networks:
      - traefik_proxy
    environment:
      - TZ=Europe/Paris
      - UID=1000
      - GID=100
      - memory="3096m"
      - cpus="2.5"
      - KOPIA_PASSWORD=MYSECRETPWD
      - USER=MYUSER
    user: "0:0"
    volumes:
# - /srv/Docker/kopia:/tmp:shared
      - kopia3_config3:/app/config
      - /srv/Tech/kopia/cache3:/app/cache
      - kopia3_logs3:/app/logs
      - ./logs3/cli-logs:/app/logs/cli-logs
      - ./logs3/content-logs:/app/logs/content-logs
      - /srv/Tech/kopia/data3:/app/data
      - /srv/Users:/app/Users:ro
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_proxy"
      - "traefik.http.routers.kopia3.rule=Host(`kopia3.DOMAIN.fr`)"
      - "traefik.http.routers.kopia3.entrypoints=https"
      - "traefik.http.routers.kopia3.tls=true"
      - "traefik.http.routers.kopia3.tls.certresolver=ACME"
      - "traefik.http.services.kopia3.loadbalancer.server.port=51516"
## Authentik middleware
      - "traefik.http.routers.kopia3.middlewares=authentik-mdware@file"
      - "diun.enable=true"
    command:
      - server
      - start
      - --insecure
      - --disable-csrf-token-checks
      - --address=0.0.0.0:51515
      - --override-username=MYUSER@kopia3
      - --server-username=MYUSER@kopia3
      - --server-password=MYSECRETPASSWORD
      - --override-hostname=kopia3-server

volumes:
  kopia3_config3:
    external: true
  kopia3_logs3:
    external: true

networks:
  traefik_proxy:
    external: true
    name: traefik_proxy

```
