How to Install Firezone UI for WireGuard VPN on Debain 12

Firezone acts as a frontend to both the WireGuard kernel module and netfilter kernel subsystem. It creates a WireGuard interface and firezone netfilter table and adds appropriate routes to the routing table. In this article, we are going to learn how to install Firezone UI for WireGuard VPN on Debian 12. So, let’s get started.

Checkout the Firezone UI for WireGuard VPN Project Here.

Try this wiki on our VPS. Starting at just $5/month with 24x7 In-house customer support.

Pre-requisites :

  • A system with Debian 12 installed and running.

  • root access to the system.

  • Server with minimum of 1vCPU and 1GB of RAM.

  • A domain with DNS records set and pointing to your server's IP Address.

Once you're all set, we'll proceed with Firezone UI for WireGuard VPN installation and configuration.

At the time of writing, Firezone had support upto Debain 12. This is not recommended for production use until a stable version has been released.

Installing Docker

First, update your existing list of packages:

apt update

Next, install a few prerequisite packages which lets apt use packages over HTTPS:

apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Then add the GPG key for the official Docker repository to your system:

apt install curl -y

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Output:

root@server:~# curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Add the Docker repository to APT sources:

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

Next, update the package database with the Docker packages from the newly added repo:

apt update

Make sure you are about to install from the Docker repo instead of the default Debian repo:

apt-cache policy docker-ce

Notice that docker-ce is not installed.

Finally, install Docker:

apt install docker-ce

Output:

root@vps:~# apt install docker-ce
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  containerd.io docker-buildx-plugin docker-ce-cli docker-ce-rootless-extras docker-compose-plugin git git-man
  iptables liberror-perl libip6tc2 libltdl7 libnetfilter-conntrack3 libnfnetlink0 libslirp0 patch pigz slirp4netns
Suggested packages:
  aufs-tools cgroupfs-mount | cgroup-lite git-daemon-run | git-daemon-sysvinit git-doc git-email git-gui gitk
  gitweb git-cvs git-mediawiki git-svn firewalld ed diffutils-doc
The following NEW packages will be installed:

Docker is now installed, the daemon started, and the process enabled to start on boot.

And to check if thats active:

systemctl status docker

Output:

root@vps:~# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; preset: enabled)
     Active: active (running) since Mon 2023-06-19 16:07:52 UTC; 16s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 1958 (dockerd)
      Tasks: 9
     Memory: 30.1M
        CPU: 915ms
     CGroup: /system.slice/docker.service
             └─1958 /usr/sbin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Installing Docker Compose

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration.

Use curl to download the Compose file into the /usr/local/bin directory.

curl -L "curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose" -o /usr/local/bin/docker-compose

Output:

root@vps:~# curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 51.9M  100 51.9M    0     0  31.1M      0  0:00:01  0:00:01 --:--:-- 62.8M

Next, set the correct permissions so that the docker-compose command is executable.

chmod +x /usr/local/bin/docker-compose

To verify that the installation was successful, you can run the following command.

docker-compose --version

Output:

root@vps:~# docker-compose --version
Docker Compose version v2.18.1

Install FireZone UI

Set up secure access and start onboarding users in minutes. Run the install script on a supported host to deploy Firezone with Docker.

Install the Firezone in minutes using below one-liner command,

bash <(curl -fsSL https://github.com/firezone/firezone/raw/master/scripts/install.sh) posthog-blocked

It'll prompt you to update user details as below,

Output:

root@vps:~# bash <(curl -fsSL https://github.com/firezone/firezone/raw/master/scripts/install.sh) posthog-blocked
Enter the administrator email you'd like to use for logging into this Firezone instance: test@test.com
Enter the desired installation directory (/root/.firezone): /root/.firezone
Enter the external URL that will be used to access this instance. (https://vps.server.com): https://fz.domainhere.info
Would you like to enable automatic SSL cert provisioning? Requires a valid DNS record and port 80 to be reachable. (Y/n): y
Could we email you to ask for product feedback? Firezone depends heavily on input from users like you to steer development. (Y/n): N
Firezone collects crash and performance logs to help us improve the product. Would you like to disable this? (N/y): n
Press <ENTER> to install or Ctrl-C to abort.

Replace the bw.domainhere.info with actual Domain name
Replace the test@test.com with actual Email Address

Enter the administrator email you'd like to use for logging into this Firezone instance: test@test.com
Enter the desired installation directory (/root/.firezone): /root/.firezone
Enter the external URL that will be used to access this instance. (https://vps.server.com): https://fz.domainhere.info
Would you like to enable automatic SSL cert provisioning? Requires a valid DNS record and port 80 to be reachable. (Y/n): y
Could we email you to ask for product feedback ? Firezone depends heavily on input from users like you to steer development. (Y/n): N
Firezone collects crash and performance logs to help us improve the product. Would you like to disable this? (N/y): n
Press to install or Ctrl-C to abort.

It'll take some time to complete and once it is completed it'll gave you login details as below,

                                      ::
                                       !!:
                                       .??^
                                        ~J?^
                                        :???.
                                        .??J^
                                        .??J!
                                        .??J!
                                        ^J?J~
                                        !???:
                                       .???? ::
                                       ^J?J! :~:
                                       7???: :~~
                                      .???7  ~~~.
                                      :??J^ :~~^
                                      :???..~~~:
    .............                     .?J7 ^~~~        ....
 ..        ......::....                ~J!.~~~^       ::..
                  ...:::....            !7^~~~^     .^: .
                      ...:::....         ~~~~~~:. .:~^ .
                         ....:::....      .~~~~~~~~~:..
                             ...::::....   .::^^^^:...
                                .....:::.............
                                    .......:::.....

Installation complete!

You should now be able to log into the Web UI at https://fz.domainhere.info with the
following credentials:

DEFAULT_ADMIN_EMAIL=patilpratik37657@gmail.com
DEFAULT_ADMIN_PASSWORD=cb28Zn2oWbPK5ldJ

Access FireZone UI

image

image

image

Done.