[BETA] Traefik Tunnel

Announcement Blog

Announcing Traefik Hub | Traefik Labs
Traefik Labs: Makes Networking Boring

Traefik Hub Page

Traefik Hub, the Cloud Native Networking Platform
Traefik Labs: Makes Networking Boring

Acknowledgments

A big shout-out to the Traefik Labs team for allowing us early access to this BETA program to allow us to try it out for ourselves and also create this guide for you guys!
Big thanks also go to Beaussan (now a Traefik ambassador, congratulations!) for setting up the early access for us and also helping to write this guide.
PLEASE NOTE:
This is an early BETA; functions are currently limited but expect more to come soon!
As part of the BETA program, Traefik Labs would appreciate any feedback on bugs you may find so that they can squash them. You can do this by clicking on the "Feedback" button in the bottom left of your Traefik hub dashboard and then clicking "Issue".
Traefik Hub also allows for users to provide any ideas they may have for the service, using the same user feedback section.

Future Features

  • Use your own domain.
  • More authorization techniques
  • More to come!
Important Notes
  • Free tier limited bandwidth (1gb per month)
  • Free tier limited published service (10 apps)
  • Pricing for increased limits (Price unknown)

Installing your Traefik Hub agent

First, create your account.
Next, click “Install my first Traefik Hub Agent”.
Pick the platform that suits you; for this guide, we will be using Docker as it creates the network for you.
Here we will follow the simple commands by copying and pasting each one into the terminal.
Note:
This will already have your token in, ready for you to use. Make sure to keep this token secure as it is what is used to access your account.
docker network create traefik-hub
docker run -d \
--name traefik \
--network traefik-hub \
traefik:v2.7 \
--experimental.hub=true \
--hub.tls.insecure=true \
--metrics.prometheus.addrouterslabels=true
# Launch the Hub Agent for Traefik
docker run -d --volume /var/run/docker.sock:/var/run/docker.sock \
--restart="on-failure” \
--network traefik-hub \
--name=hub-agent ghcr.io/traefik/hub-agent-traefik:v0.3.0 run \
--auth-server.advertise-url=http://hub-agent \
--hub.token=YOUR-SECURE-TOKEN-HERE \
--traefik.host=traefik \
--traefik.tls.insecure=true
Now go back to the Hub website, copy the token and click “finish configuration”. You can now rename your Agent.
Currently, it only allows lower case and dashes, and numbers but not at the start.

Adding a service to your Traefik Hub account

You can now click “Go to the Agent Details” to view your new dashboard.
Now, to test Traefik Hub, we are going to use a basic web server docker container.
docker run -d --network traefik-hub tutum/hello-world
As soon as the container starts up, it shows up in the Traefik Hub dashboard.
Now we want to publish our app, so let's click on the running app to open the configuration.
Now click “Publish the service”.
Now simply click “Save and Publish” and your application will be published.
Your app will now be deployed through the Traefik hub service.
Your application is now deployed on the URL provided
Let's click the link and check that the app is working!
Like magic, without opening any ports, your application is available publicly!
If you open your service in the Traefik Hub, you will now be able to monitor the stats.

Access Control

If you like to add a layer of security, you can now edit the service to add basic auth.
Click the “Edit” button on your service and then click “Create new ACP”.
We can now give our new access control policy a username and password.
Click “save”, then click “save and publish”. Now, when you try to go to the app, it will require basic auth.
It will now apply the update for you.
Fill in your username and password, and it will now allow you access!

Removing a service

Click on your published service and then click the “Edit” button.
At the bottom of the window, you will find a dialogue box called “Danger Zone”, this will be where you can now remove your published service.
Copy and paste the confirmation phrase into the text field, and then click on the “Unpublish” button. Your app will no longer be public or accessible.