---
title: "Learn How to Proxy Applications With Envoy Proxy Server"
description: "Learn how to set up Envoy Proxy Server to proxy applications for increased privacy in this step-by-step tutorial!"
canonical: "https://adamtheautomator.com/envoy-proxy/"
---

# Learn How to Proxy Applications With Envoy Proxy Server

> Learn how to set up Envoy Proxy Server to proxy applications for increased privacy in this step-by-step tutorial!

Source: https://adamtheautomator.com/envoy-proxy/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Learn How to Proxy Applications With Envoy Proxy Server](https://adamtheautomator.com/wp-content/uploads/2022/02/Learn-How-to-Proxy-Applications-With-Envoy-Proxy-Server.jpg)

# Learn How to Proxy Applications With Envoy Proxy Server

[![](https://secure.gravatar.com/avatar/2788bb1a3f735603f81eca51d68daec56a9d97e805a10268fb2c20afcc76b81b?s=192&d=mm&r=g)Nicholas Xuan Nguyen](https://adamtheautomator.com/author/nicholas-xuan-nguyen/)15 February 20225 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Envoy Proxy](/tag/envoy-proxy/)[Linux](/tag/linux/)[Security](/tag/security/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Installing Envoy Proxy](#installing-envoy-proxy)
*   [Running the Envoy Proxy Server](#running-the-envoy-proxy-server)
*   [Conclusion](#conclusion)

Ever wanted to set up a proxy application? Proxy applications are an effective way to increase your privacy online. [Envoy Proxy](https://www.envoyproxy.io/) is one of the best applications to set up an HTTP proxy server. And the best part of it? It’s completely free!

In this tutorial, you’ll learn how to use Envoy as an HTTP reverse proxy server or even a TCP relay server. Configure your own custom security policies with just a few clicks!

Read on and let Envoy Proxy Server help increase your privacy!

## Prerequisites

This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have the following:

*   A Linux machine – This demo uses [Ubuntu 20.04](https://adamtheautomator.com/install-ubuntu/) LTS, but any Linux distribution will work.

Related:[How to Install Ubuntu 20.04 \[Step-by-Step\]](https://adamtheautomator.com/install-ubuntu/)

*   A [non-root user with sudo privileges](https://www.liquidweb.com/kb/how-to-set-up-and-manage-sudo-permissions/).

## Installing Envoy Proxy

Before proxying applications, you’ll first install the application on your machine, similar to how you do so with other packages. But you’ll also install required dependencies before installing it from a third-party repository.

1\. Run the [`apt update`](https://linuxize.com/post/how-to-use-apt-command/#updating-package-index-apt-update) command below to `update` your machine’s repository index.

```bash
sudo apt update -y
```

![Updating your Machine's Repository Index](https://adamtheautomator.com/wp-content/uploads/2022/02/image-148.png)

Updating your Machine’s Repository Index

2\. Next, run the [`apt install`](https://linuxize.com/post/how-to-use-apt-command/#installing-packages-apt-install) command below to fetch packages from repositories over the HTTP Secure protocol (HTTPS) (`apt-transport-https`). The command then installs the required dependencies `([gnupg2)](https://gnupg.org/)`

The command fetches packages from repositories over the FTP protocol (`curl`) and displays [LSB](https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/lsbrelease.html) (Linux Standard Base) information about the machine (`lsb-release`). The LSB information lets it know what LSB version your machine is compatible with.

```bash
sudo apt install apt-transport-https gnupg2 curl lsb-release -y
```

![Installing Dependencies for Envoy Proxy](https://adamtheautomator.com/wp-content/uploads/2022/02/image-149.png)

Installing Dependencies for Envoy Proxy

3\. Run the below `curl` command to import the GPG key from the server’s developer (`gpg.8115BA8E629CC074.key`) to your APT keyring (`getenvoy-keyring.gpg`). This GPG key ensures that you get the official version of the server rather than a man-in-the-middle attack.

> _The APT keyring uses GPG to check the signature of the Envoy Proxy Server’s repository before installing or upgrading it._

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

The command has no output if the GPG key is imported correctly, like the one below.

![Importing GPG key to your APT keyring](https://adamtheautomator.com/wp-content/uploads/2022/02/image-163.png)

Importing GPG key to your APT keyring

4\. Now, run the `echo` command below to verify that the GPG key is valid and trusted (`sha256sum --check`). Replace `key_ring` with the developer’s public keyring.

```bash
echo key_ring /usr/share/keyrings/getenvoy-keyring.gpg | sha256sum --check
```

As you can see below, the key is valid and OK to use.

![Verifying the GPG key](https://adamtheautomator.com/wp-content/uploads/2022/02/image-164.png)

Verifying the GPG key

5\. Run the below `echo` command to add the Envoy Proxy Server’s official repository (`https://deb.dl.getenvoy.io/public/deb/ubuntu $(lsb_release -cs) main`) to your machine. This command tells APT where to download and install packages.

```bash
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
```

You’ll see the **dl.getenvoy.io/public/deb/ubuntu** string in the output shown below, which is where your server is hosted, and that it’s in the **focal release** channel. This output confirms that the server’s repository is added to your machine.

![Adding the server's Official Repository](https://adamtheautomator.com/wp-content/uploads/2022/02/image-165.png)

Adding the server’s Official Repository

6\. Next, rerun the `apt update` command to get the latest package information from repositories on your machine.

```bash
sudo apt update -y
```

![Getting the latest package information](https://adamtheautomator.com/wp-content/uploads/2022/02/image-166.png)

Getting the latest package information

7\. Run the [`apt-cache policy`](https://itsfoss.com/apt-cache-command) command below to confirm that the server is available for installation from the repository on your machine.

```bash
sudo apt-cache policy
```

Below, you can see that the server is available for installation in your ubuntu machine from its release channel (**focal channel**).

![Verifying the Envoy Proxy Server is Available for Installation](https://adamtheautomator.com/wp-content/uploads/2022/02/image-167.png)

Verifying the Envoy Proxy Server is Available for Installation

8\. Finally, run the `apt install` command below to install the server (`getenvoy-envoy`).

```bash
sudo apt install getenvoy-envoy -y
```

![Installing the Envoy Proxy Server](https://adamtheautomator.com/wp-content/uploads/2022/02/image-168.png)

Installing the Envoy Proxy Server

## **Running the Envoy Proxy Server**

You have installed the Envoy Proxy Server, but how do you know it works? You’ll run a demo instance from your terminal.

1\. Run the [`envoy --version`](https://www.envoyproxy.io/docs/envoy/latest/operations/cli#cmdoption-version) command to check the server version running on your machine.

```bash
envoy --version
```

If you’ve installed the server correctly, you’ll see the version printed on your terminal. In this demo, the version is 1.18.2, but yours may be different.

![Checking Envoy Proxy Version](https://adamtheautomator.com/wp-content/uploads/2022/02/image-169.png)

Checking Envoy Proxy Version

2\. Next, run the [`envoy --help`](https://www.envoyproxy.io/docs/envoy/latest/start/quick-start/run-envoy#view-the-envoy-command-line-options) command to list all the options you can use when running the Envoy Proxy Server.

```bash
envoy --help
```

You can use [most of the options](https://www.envoyproxy.io/docs) listed in the output below to view or change the behavior of the server.

![Showing all options for Envoy Proxy](https://adamtheautomator.com/wp-content/uploads/2022/02/image-170.png)

Showing all options for Envoy Proxy

3\. Run the `wget` command below to download the demo configuration named `envoy-demo.yaml` file from the server’s website. You will use this file to start a demo.

```bash
wget https://www.envoyproxy.io/docs/envoy/latest/_downloads/92dcb9714fb6bc288d042029b34c0de4/envoy-demo.yaml
```

![downloading the demo configuration ](https://adamtheautomator.com/wp-content/uploads/2022/02/image-171.png)

downloading the demo configuration

The _envoy-demo.yaml_ file’s content looks like the one below. This file tells the server to listen for incoming connections (0.0.0.0) to process HTTP requests in port 10000.

![Viewing the envoy-demo.yaml file’s content](https://adamtheautomator.com/wp-content/uploads/2022/02/image-172.png)

Viewing the _envoy-demo.yaml_ file’s content

4\. Now, run the below command to tell the server to read the configuration (`-c envoy-demo.yaml`) file, which starts an instance.

```bash
envoy -c envoy-demo.yaml
```

![Starting a Demo Instance of Envoy Proxy Server](https://adamtheautomator.com/wp-content/uploads/2022/02/image-173.png)

Starting a Demo Instance of Envoy Proxy Server

5\. Next, run the below command to check all running processes in your system (`ps -ef`) and verify that Envoy Proxy Server is running (`grep envoy`).

```bash
ps -ef | grep envoy
```

You’ll see the Envoy Proxy Server process listed in the output below. At this point, your Envoy Proxy Server listens for requests and proxying on port 10000.

![Verifying the Demo Envoy Proxy Server is Running](https://adamtheautomator.com/wp-content/uploads/2022/02/image-174.png)

Verifying the Demo Envoy Proxy Server is Running

6\. Run the [`netstat`](https://www.tecmint.com/install-netstat-in-linux) command below to check if the Envoy Proxy Server listens to port `10000`.

```bash
sudo netstat -tulpn | grep :10000
```

Below, you can see the port number (10000) you used to configure Envoy Proxy Server.

![Checking Port 10000](https://adamtheautomator.com/wp-content/uploads/2022/02/image-175.png)

Checking Port 10000

7\. Now, run the `ufw` command below to open port `10000` on your firewall. If you use a third-party firewall, you might need to adjust the command to open the corresponding port for your proxy server.

The below command adds a firewall rule to secure your server since it only listens to incoming connections from port 10000.

```bash
sudo ufw allow 10000/tcp
```

![Opening Port 10000 on your Firewall ](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/0c185a20-a5cc-40a9-bd70-a487f79dff63/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220213%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220213T142908Z&X-Amz-Expires=86400&X-Amz-Signature=d8306be32c855caad4cb85f0ff8726345e89588d555a49aa562feb91030ef757&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22&x-id=GetObject)

Opening Port 10000 on your Firewall

Related:[How To Set Up the UFW Firewall on Linux](https://adamtheautomator.com/ufw-firewall/)

8\. Run the `ufw status` command to check your firewall status and confirm that your Envoy Proxy Server port is open.

```bash
sudo ufw status verbose
```

The output below confirms that the Envoy Proxy Server’s port (10000) is open on your firewall.

![Confirming Port 10000 is Open](https://adamtheautomator.com/wp-content/uploads/2022/02/image-176.png)

Confirming Port 10000 is Open

9\. Finally, run the `curl` command below to know if your Envoy Proxy Server is proxying/working as intended.

```bash
curl -v localhost:10000
```

As expected, the curl command is proxied by Envoy Proxy Server, as you can see the default welcome page from Envoy Proxy below.

![Testing your Proxy Server](https://adamtheautomator.com/wp-content/uploads/2022/02/image-177.png)

Testing your Proxy Server

## Conclusion

In this tutorial, you’ve learned how to install and run Envoy Proxy Server on your Ubuntu machine. You’ve also touched on adding a firewall rule to open Envoy Proxy Server’s port (**10000**) and verified your Envoy Proxy Server works perfectly.

At this point, you have a fully-functional proxy server, and you can now use it to proxy your application’s traffic.

Now, why not [set up a scalable and highly available proxy infrastructure](https://levelup.gitconnected.com/scaling-microservices-with-grpc-and-envoy-72a64fc5bbb6) with Envoy Proxy Server with this newfound knowledge?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fenvoy-proxy%2F&text=Learn%20How%20to%20Proxy%20Applications%20With%20Envoy%20Proxy%20Server)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fenvoy-proxy%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fenvoy-proxy%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2022/01/How-to-Take-Control-of-Your-MongoDB-Security.jpg)

### [How to Take Control of Your MongoDB Security](/mongodb-security/)

Learn how to take control of your MongoDB security by creating an administrative user and enabling authentication in this step-by-step tutorial!

![](https://adamtheautomator.com/wp-content/uploads/2022/01/How-to-Provision-a-Website-With-aaPanel-and-LetsEncrypt.jpg)

### [How to Provision a Website With aaPanel and LetsEncrypt](/aapanel/)

Learn how to install aaPanel, provision a website, and secure the website with SSL using Let’s Encrypt in this step-by-step tutorial!

![](https://adamtheautomator.com/wp-content/uploads/2022/01/How-To-Set-Up-WireGuard-VPN-on-Linux.jpg)

### [How To Set Up WireGuard VPN on Linux](/wireguard-vpn/)

Learn how to set up WireGuard VPN on Linux to securely connect and access your network, in this step-by-step tutorial!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
