How to install Envoy Proxy server on Ubuntu 20.04

In this tutorial, I will show you how to install the Envoy proxy server on Ubuntu 20.04.

Envoy is an L7 proxy and communication bus designed for large modern service-oriented architecture. The project was born out of the belief that the network should be transparent to applications. When network and applications problems occur, it should be easy to determine the source of the problem.

Envoy is an open-source edge and service proxy, designed for cloud-native applications.

High Level Envoy features

  • Its known for its advanced load balancing technique. It implements load balancing in a single place and have them accessible to any application.
  • It has front/edge proxy support.
  • It has best in class observability
  • It has gRPC support.
  • Has support for HTTP L7 routing
  • It supports HTTP/2
  • L3/L4 filter architecture. Envoy acts as a L3/L4 proxy
  • It support use of API for configuration management

Installing Envoy proxy server on Ubuntu 20.04

1. Run system update

Running system updates will make your system repositories up to date. Open your terminal and run the following command;

$ sudo apt update && apt upgrade -y

Next, you need to envoy dependencies

2. Install Envoy proxy server dependencies

Envoy requires some dependencies to run effectively. Install the following dependencies

$ sudo apt install apt-transport-https gnupg2 curl lsb-release

Sample output

output
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu2).
lsb-release set to manually installed.
curl is already the newest version (7.68.0-1ubuntu2.7).
curl set to manually installed.
apt-transport-https is already the newest version (2.0.6).
gnupg2 is already the newest version (2.2.19-3ubuntu2.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

From the following output, you can see nothing was installed because Ubuntu 20.04 comes as a default.

3. Import GPG key

In order to sign Envoy, we need to import the GPG key with the following command.

$ curl -sL 'https://deb.dl.getenvoy.io/public/gpg.8115BA8E629CC074.key' | sudo gpg --dearmor -o /usr/share/keyrings/getenvoy-keyring.gpg

Now you can verify if the key is signed with the echo command. If it returns ok you know it is signed.

$ echo a077cb587a1b622e03aa4bf2f3689de14658a9497a9af2c427bba5f4cc3c4723 /usr/share/keyrings/getenvoy-keyring.gpg | sha256sum --check

This command should return ok as the output.

Run system updates again for changes to take effect.

Now we need to add the key to the system with the following command.

$ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/getenvoy-keyring.gpg] https://deb.dl.getenvoy.io/public/deb/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/getenvoy.list

4. Install Envoy proxy server on Ubuntu 20.04

Lastly, let’s install Envoy with the following command;

$ sudo apt install getenvoy-envoy

Now you can check the Envoy version with the following command;

$ envoy --version
envoy  version: d362e791eb9e4efa8d87f6d878740e72dc8330ac/1.18.2/clean-getenvoy-76c310e-envoy/RELEASE/BoringSSL

Run Envoy

To check Envoy commands use the help command

$ envoy --help

Let’s run Envoy with a demo configuration file

Create a demo.yaml file and run with the following command

$ envoy -c envoy-demo.yaml

-c tells envoy the path to its initial configuration

To know if Envoy is proxying, use the following

$ curl -v localhost:10000

Conclusion

We have learned how to install Envoy proxy on Ubuntu 20.04. To enjoy more of these tutorials keep checking this blog for more.

About Mason Kipward

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Mason Kipward →

Leave a Reply

Your email address will not be published.