ChaOConnor Posted August 16, 2017 Share Posted August 16, 2017 Good Day! I'm hoping the LinuxServer.io Team can port the Treafik reverse proxy docker to a docker of their base for use in unRaid. The URL is https://traefik.io/ and there is a docker available at https://hub.docker.com/r/_/traefik/ Appreciate your consideration on this, thanks! Quote Link to comment
JonathanM Posted August 16, 2017 Share Posted August 16, 2017 Genuinely curious, why don't you want to use their official docker? Quote Link to comment
ChaOConnor Posted August 17, 2017 Author Share Posted August 17, 2017 I guess I don't have any good reason other than I hold the LinuxServer.io team's work in high regard and they're base is very stable. I use all their apps almost exclusively. I should try Treafik's, good point. Thanks. Quote Link to comment
ChaOConnor Posted August 17, 2017 Author Share Posted August 17, 2017 I realized I have no idea how to install a docker that doesn't have a template. Should I create a template for it? (How do I do that?) Thanks! Quote Link to comment
JonathanM Posted August 17, 2017 Share Posted August 17, 2017 37 minutes ago, ChaOConnor said: I realized I have no idea how to install a docker that doesn't have a template. Should I create a template for it? (How do I do that?) Thanks! Enable docker hub searching in community applications, then search for and install it using the apps tab as normal. You may have to adjust some settings, but with an app this simple it'll probably work with little to no tweaking. 1 Quote Link to comment
airbillion Posted August 17, 2017 Share Posted August 17, 2017 (edited) 17 hours ago, ChaOConnor said: I guess I don't have any good reason other than I hold the LinuxServer.io team's work in high regard and they're base is very stable. I use all their apps almost exclusively. I should try Treafik's, good point. Thanks. I am trying to set this up too, but I am having a little difficulty also... Not sure what I need to do to get the letsencrypt going or what to set for the front/backends... If you have any success please post... Edited August 17, 2017 by airbillion Quote Link to comment
brando56894 Posted August 19, 2017 Share Posted August 19, 2017 (edited) Very interesting...this may replace Nginx for me. Edit: I just tried to set it up and I can't really seem to get it to work either. It starts, but I can't connect to it. Edited August 19, 2017 by brando56894 Quote Link to comment
airbillion Posted August 19, 2017 Share Posted August 19, 2017 Very interesting...this may replace Nginx for me. Edit: I just tried to set it up and I can't really seem to get it to work either. It starts, but I can't connect to it.That is the same issue I had...I couldn't connect to it either...Sent from my ONEPLUS A3000 using Tapatalk Quote Link to comment
brando56894 Posted August 20, 2017 Share Posted August 20, 2017 Looking at the config file (I also tried to set it up in Arch, but couldn't connect to the management UI, but it was serving on port 80) it looks like additional configuration needs to be done so it's not as easy as some of the other containers. Bummer. Quote Link to comment
brando56894 Posted August 21, 2017 Share Posted August 21, 2017 (edited) I managed to get the management GUI to work. I can't figure out how to get it to connect to the Docker daemon so that it will list and watch the containers. I had to drop the default config file in /mnt/user/appdata/traefik/traefik.toml and enable a few things. I added a port mapping for 8080:8080 and a folder mapping for /mnt/usr/share/appdata/traefik:/etc/traefik/ Here's the default one that's about 1000 lines: https://raw.githubusercontent.com/containous/traefik/master/traefik.sample.toml /etc/traefik/traefik.toml debug = false traefikLogsFile = "/etc/traefik/traefik.log" logLevel = "INFO" [web] address = ":8080" [docker] endpoint = "unix:///var/run/docker.sock" domain = "docker.localhost" watch = true exposedbydefault = true Edited August 21, 2017 by brando56894 Quote Link to comment
hernandito Posted August 22, 2017 Share Posted August 22, 2017 Most info I found for this is in French. Does this allow you to setup reverse proxies for all Dockers like nzbget, plex, couch, etc? Can you do all the proxy configuration in a GUI? That would be nice. Quote Link to comment
brando56894 Posted August 23, 2017 Share Posted August 23, 2017 (edited) On 8/22/2017 at 4:26 PM, hernandito said: Does this allow you to setup reverse proxies for all Dockers like nzbget, plex, couch, etc? Yep, apparently it will dynamically create reverse proxies for you or you can set them up yourself. On 8/22/2017 at 4:26 PM, hernandito said: Can you do all the proxy configuration in a GUI? It appears that way, but I can't get Traefik to connect to the Docker socket, so it doesn't show anything. Edit: I forgot to map /var/run/docker.sock inside the container, so that's why it won't connect! D'oh! I'll give it another try when I get home and it should work as expected. Edit 2: yep just map /var/run/docker.sock to the same inside the container and it works as expected. Edited August 24, 2017 by brando56894 Quote Link to comment
airbillion Posted August 25, 2017 Share Posted August 25, 2017 On 8/23/2017 at 0:33 AM, brando56894 said: Yep, apparently it will dynamically create reverse proxies for you or you can set them up yourself. It appears that way, but I can't get Traefik to connect to the Docker socket, so it doesn't show anything. Edit: I forgot to map /var/run/docker.sock inside the container, so that's why it won't connect! D'oh! I'll give it another try when I get home and it should work as expected. Edit 2: yep just map /var/run/docker.sock to the same inside the container and it works as expected. Is this working well for you? Are all the reverse proxies working correctly.....and have you tried it with letsencrypt yet? This looks like a good all in one solution, but I just want to know how it compares to the nginx letsencrypt... Thanks! Quote Link to comment
brando56894 Posted August 26, 2017 Share Posted August 26, 2017 It was too confusing for me, I couldn't get any of the proxies to work for me so I just stuck with my Arch VM that has Nginx running. Quote Link to comment
twok Posted March 13, 2018 Share Posted March 13, 2018 (edited) after spending another few hours I managed to get it to run - however when using "exposedbydefault = false" and in the responding docker containers the variables: traefik.frontend.rule traefik.backend traefik.enable traefik.port no container can be viewed. any hints? I think the issue that I'm supposed to set the traefik container as well as the other responding docker containers on to the same network - could this be the issue? anyways when using "bridge" mode I would assume they are already on the same network so there shouldn't be the need for it. there is a blog post available by Linuxserver.io at: https://www.linuxserver.io/2018/02/03/using-traefik-as-a-reverse-proxy-with-docker/ following that my certificates are generated. however using the exposedbydefault flag I still can't manage to view the assigned docker apps. and with it set to true I receive 404 on all pages. anyone figured it out how to set it correctly? Edited March 16, 2018 by twok progress2 Quote Link to comment
ufo56 Posted April 6, 2018 Share Posted April 6, 2018 Quote anyone figured it out how to set it correctly? Same question Quote Link to comment
hernandito Posted April 7, 2018 Share Posted April 7, 2018 On 4/6/2018 at 4:09 AM, ufo56 said: Same question Same Question as well. Quote Link to comment
ninthwalker Posted April 15, 2018 Share Posted April 15, 2018 I decided to mess around with this tonight a bit, and was able to get basic proxying working fine after skimming their docs. Didn't try the letsencrypt yet as I would have to mess with my current running nginx server and ports. Hope this helps those that had issues: For reference, here is the toml config i threw together. on my test dockers I added this to the extra parameters field: -l=traefik.enable=true ### Globals ### debug = false logLevel = "INFO" ### Entrypoints ### defaultEntryPoints = ["http", "https"] [entryPoints] [entryPoints.http] address = ":80" [entryPoints.http.redirect] entryPoint = "https" [entryPoints.https] address = ":443" [entryPoints.https.tls] [entryPoints.webui] address=":8080" [entryPoints.webui.auth] [entryPoints.webui.auth.basic] users = ["admin:$apr1$0DIFsecrethashU6aJdI2XG1"] ### Logging ### [traefikLog] filepath = "/etc/traefik/traefik.log" ### Web Dashboard ### [api] entrypoint = "webui" ### Backends ### [docker] endpoint = "unix:///var/run/docker.sock" domain = "my.domain.com" watch = true exposedbydefault = false Docker settings were simple with just the ports and required paths: Ports: 443 80 8080 Paths: /var/run/docker.sock:/var/run/docker.sock /etc/traefik/:/mnt/cache/.Programs/traefik/ Quote Link to comment
Stupifier Posted April 16, 2018 Share Posted April 16, 2018 (edited) @ninthwalker Could you also explain what you did about the Traefik Labels on the Dockers you got Proxy to work? Are the labels just added as extra parameters? Also, what about the Network parameter.....can we just use "bridge" for both Traefik and other containers? Or do we need to actually create a new network? --label traefik.enable=true --label traefik.port=8080 --label traefik.docker.network=bridge --label traefik.frontend.rule=Host:traefik.example.com traefik looks like next-gen nginx........I Just wish there was a more user-friendly setup for it Edited April 16, 2018 by Stupifier Quote Link to comment
hernandito Posted April 17, 2018 Share Posted April 17, 2018 On 4/15/2018 at 9:02 PM, Stupifier said: @ninthwalker traefik looks like next-gen nginx........I Just wish there was a more user-friendly setup for it I wish the same... Would this docker also handle the duties of serving web pages as well? PHP, html, JS. Quote Link to comment
ninthwalker Posted April 18, 2018 Share Posted April 18, 2018 (edited) @Stupifier i left the dockers I tested with in the bridge network. Only thing i added to existng dockers for them to be picked up by traefik was add the one label to extra parameters. -l=‘traefik.enable=true’ @hernandito traefik is a proxy only. Not a webserver. For that you still need nginx/Apache or check out caddy. Edited April 18, 2018 by ninthwalker Quote Link to comment
Stupifier Posted April 18, 2018 Share Posted April 18, 2018 [mention=79664]Stupifier[/mention] i left the dockers I tested with in the bridge network. Only thing i added to existng dockers for them to be picked up by traefik was add the one label to extra parameters. -l=‘traefik.enable=true’ [mention=6274]hernandito[/mention] traefik is a proxy only. Not a webserver. For that you still need nginx/Apache or check out caddy. If you get this all figured out including the LetsEncrypt certs, hopefully we'll see an UnRAID Template for all us noobs Quote Link to comment
ninthwalker Posted April 19, 2018 Share Posted April 19, 2018 Not sure if i’ll be doing anything more to be honest. My nginx setup is on a seperate Server and runs pretty good/automated already for everything. Fooled around with Traefik, and while the auto-proxy for each docker is cool, I don’t know if it would benefit me much. good luck! Quote Link to comment
GreenEyedMonster Posted April 21, 2018 Share Posted April 21, 2018 This would be awesome!!! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.