# Migration to Traefik with Nextcloud/LinuxServer image: need help!

**URL:** <https://help.nextcloud.com/t/migration-to-traefik-with-nextcloud-linuxserver-image-need-help/104099>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** docker\
**Created:** [January 12, 2021, 8:40pm UTC](https://help.nextcloud.com/t/migration-to-traefik-with-nextcloud-linuxserver-image-need-help/104099 "2021-01-12T20:40:55Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![kromsam](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kromsam/32/14632_2.png) [@kromsam](https://help.nextcloud.com/u/kromsam)\
**Post date:** [January 14, 2021, 11:43pm UTC](https://help.nextcloud.com/t/migration-to-traefik-with-nextcloud-linuxserver-image-need-help/104099/15 "2021-01-14T23:43:46Z")

</div>

> [@kromsam](#):
>
> NB: I am using the LinuxServerIO maintained image.

This seemed to be the key. I found some topics concerning this:

[https://www.reddit.com/r/selfhosted/comments/f7mytc/linuxserverionextcloud\_with\_traefik\_20/fict7m4/](https://www.reddit.com/r/selfhosted/comments/f7mytc/linuxserverionextcloud_with_traefik_20/fict7m4/)

> **[Nextcloud / Traefik uncooperative (redirecting to https://\_/)](https://discourse.linuxserver.io/t/nextcloud-traefik-uncooperative-redirecting-to-https/919/4)**
>
> you guys are better off asking the traefik people about this. The LSIO team all uses the letsencrypt container, which works fine with nextcloud.

> **[Nextcloud / Traefik uncooperative (redirecting to https://\_/)](https://community.traefik.io/t/nextcloud-traefik-uncooperative-redirecting-to-https/5340)**
>
> I’m running a whole suite of linuxserver containers using docker-compose and Ironic Badger’s awesome Debian server guide. While I began using dynamic DNS (ddns.info) in the first instance, I’ve since gotten a proper domain name and a static IP...

Which eventually led me here:

> [@Nextcloud migration to traefik failing, looking for help troubleshooting](https://help.nextcloud.com/t/nextcloud-migration-to-traefik-failing-looking-for-help-troubleshooting/79129):
>
> I have a fully working install of nextcloud 18.0.3 hosted using docker-compose on a debian linux homeserver (versions etc. below), which I’m trying to migrate from a setup that uses an nginx self-signed certificate to lets-encrypt certificates served by traefik 1.7 (also running in a docker container) as [wildcard domains](https://docs.traefik.io/v1.7/configuration/acme/#wildcard-domains). Traefik is working for a dozen or so other services on this server. I’ve worked through forums here, on [https://community.containo.us](https://community.containo.us) and on [discourse.linuxserver.io](http://discourse.linuxserver.io) and am fa…

Where you already solved this issue!

I removed these lines: [https://github.com/linuxserver/docker-nextcloud/blob/master/root/defaults/default#L6-L12](https://github.com/linuxserver/docker-nextcloud/blob/master/root/defaults/default#L6-L12)

Do I need to do more than this?

I also tried another option: to change port `80` port `443` and leave the `default` file as is. Because I would prefer to change as little as possible in my docker container config files.

```
  - "traefik.http.services.nextcloud-secure.loadbalancer.server.port=443"

```

but that gave me this error:

```
400 Bad Request
The plain HTTP request was sent to HTTPS port

```

Do you think a solution like this would be possible?

---

_[View the full topic](https://help.nextcloud.com/t/migration-to-traefik-with-nextcloud-linuxserver-image-need-help/104099)._
