Installing Envoy Proxy on Ubuntu 20.04 in a Snap‑Free Way
If you’re still wrestling with that “I can’t get Envoy to start after the upgrade” problem, read on. You’ll walk through the exact commands that get Envoy up and running without any of the usual package‑manager headaches.
1. Prerequisites: A Fresh Server (or at least a clean terminal)
Open a terminal, drop into root mode, and make sure you have an updated system:
sudo apt update && sudo apt upgrade -y
An outdated apt cache can point you to old packages that won’t play nicely with the latest Envoy build.
2. Add the Official Envoy Repository
Envoy ships a dedicated APT repo that keeps things tidy. Grab the key and add the source:
curl -sL https://repo.solo.io/solo-apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/envoy-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/envoy-archive-keyring.gpg] http://repo.solo.io/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/envoy.list
Using the official repo means you’ll get the latest stable builds and security patches without waiting for Ubuntu’s backports.
3. Install Envoy
sudo apt update sudo apt install envoy -y
Once installed, envoy will register as a systemd service automatically.
4. Verify the Service is Working
Start it (if not already running) and check status:
sudo systemctl start envoy sudo systemctl status envoy
You should see a line like:
Loaded: loaded (/lib/systemd/system/envoy.service; enabled; vendor preset: enabled) Active: active (running) since …
If the service shows inactive or failed, you’ve probably got a port conflict. I’ve seen folks run into that when their default Envoy config binds to 80 and Apache is still alive on the same port.
5. Test With a Simple Echo Service
Create a tiny HTTP server for traffic to hit:
python3 -m http.server 8080 &
Now point Envoy at it by editing /etc/envoy/envoy.yaml (or wherever your config lives). A minimal snippet:
static_resources:
listeners:
- name: listener_80
address:
socket_address: { address: 0.0.0.0, port_value: 80 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: backend
domains: ["*"]
routes:
- match: { prefix: "/" }
route: { cluster: echo_service }
http_filters:
- name: envoy.router
typed_config: {}
clusters:
- name: echo_service
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
load_assignment:
cluster_name: echo_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address: { address: 127.0.0.1, port_value: 8080 }
Restart Envoy:
sudo systemctl restart envoy
Then hit http://localhost in a browser or use curl:
curl http://localhost
You should see the directory listing from the Python server.
6. Tweak Envoy (Optional)
If you need TLS, rate limiting, or more advanced routing, dive into the official docs. But for most folks just having a reverse proxy in front of their services is enough.
That’s all there is to it. You now have a production‑ready Envoy instance on Ubuntu 20.04, ready to route traffic, load‑balance, and make your microservices talk nicely. If you hit snags, remember: check the logs (sudo journalctl -u envoy) and keep an eye out for port clashes.