Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Install Traefik in Ubuntu 24

Table of Contents

  • Traefik is a modern, open-source reverse proxy and load balancer designed specifically for microservices and containerized environments.
  •  It acts as the entry point for your web applications, routing incoming HTTP and TCP requests to the appropriate backend services.

In this tutorial, we will show you how to Install Traefik in ubuntu 24.

Download and install Traefik

wget https://github.com/traefik/traefik/releases/download/v3.5.0/traefik_v3.5.0_linux_amd64.tar.gz -O traefik.tar.gz
tar -xvzf traefik.tar.gz
sudo mv traefik /usr/local/bin/

Check traefik version

traefik version

Create Directory Structure

sudo mkdir -p /etc/traefik/acme
sudo touch /etc/traefik/traefik.yml
sudo touch /etc/traefik/dynamic.yml

Configure traefik.yml

vim /etc/traefik/traefik.yml 
entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"

api:
  dashboard: true

log:
  level: DEBUG

providers:
  file:
    filename: /etc/traefik/dynamic.yml

Configure Route to a Blog Backend

vim  /etc/traefik/dynamic.yml
http:
  routers:
    blog-router:
      rule: "Host(`localhost`)"
      service: test-service
      entryPoints:
        - web

  services:
    test-service:
      loadBalancer:
        servers:
          - url: "http://127.0.0.1:8081"

Create index.html file

mkdir ~/myblog
echo "<h1>Welcome</h1>" > ~/test/index.html
cd ~/myblog
python3 -m http.server 8081

Now your blog will be served on http://localhost:8081 and accessible through Traefik at http://localhost/

Conclusion

Traefik is a powerful and flexible reverse proxy that simplifies routing and load balancing in modern, dynamic environments. With its automatic service discovery, seamless SSL management, and user-friendly dashboard, Traefik helps developers and operators efficiently manage traffic to microservices and containerized applications.

If you encounter any challenges while trying to install Traefik in Ubuntu 24 or need expert assistance with configuration and performance tuning, it’s always best to consult professionals. At Skynats, our server management services are designed to help businesses seamlessly deploy, secure, and manage their infrastructure. Get in touch with us today for 24/7 support and streamlined DevOps solutions tailored to your needs.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Let us know your requirement.

Can't get what you are looking for?

Get Support Right Away!

Thank You

We have received your query and will get back to you soon.