# Installing From Source on Ubuntu 22.04 on ARM64

**URL:** https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645
**Category:** Pritunl
**Tags:** pritunl
**Created:** [December 29, 2022, 4:52pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645 "2022-12-29T16:52:51Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![bulgaru](https://forum.pritunl.com/user_avatar/forum.pritunl.com/bulgaru/32/257_2.png) [@bulgaru](https://forum.pritunl.com/u/bulgaru)
#### Post date: [December 29, 2022, 4:52pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/1 "2022-12-29T16:52:51Z")

</div>

Hello!

I am doing a research project related to affordable security. This is irrelevant when it comes to the issue, but I think it is important for the society as a whole. Nowadays privacy is under attack, hacking and social hacking is commonplace, phishing attacks are constant. The existing VPN providers can barely be trusted, especially when it comes to high-value targets (e.g. political dissidents, celebrities, finance and business actors). My goal is having a fully hosted VPN service at a minimal cost. Most of the SBC’s are ARM based and can run the latest LTS Ubuntu releases.

I have been experimenting with deploying Pritunl Server and, since there is no existing package for ARM64, I tried using 2 guides to build the stack. First guide is an old one: [Turn a Raspberry Pi 3B+ into a PriTunl VPN | Opensource.com](https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi)  
Second one is from the github readme about installing Pritunl from source.

Unfortunately whatever approach I take, the build fails with errors. Some errors are related to the Go package, some are related to the newest Python versions and some fail due to dependency conflicts. I tried both Ubuntu 20.04 and Ubuntu 22.04, Python 2.7 and Python 3.10, etc. After spending a day on this issue I understand that I need your guidance.

I was wondering if it would be possible to create a guide for Installing From Source on Ubuntu. I will try helping as much as possible when it comes to documentation and testing.

Please let me know if you have experience with something similar!

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [December 29, 2022, 8:36pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/2 "2022-12-29T20:36:32Z")

</div>

It’s unlikely a Raspberry Pi will have enough resources to run the MongoDB server and the Pritunl server. The ARM servers available from cloud providers will be slower than x86 due to AES-NI being available in x86 and the improved single thread performance of x86.

There shouldn’t be anything preventing building pritunl-web and pritunl-dns with Golang. Golang is available on ARM and there are no CGO modules used.

For security reasons the hashes of all Python PyPI requirements are set in `requirements.txt`, these hashes will likely need to be removed when building on other platforms.

The build files for Pritunl are available in the [**pritunl/pritunl-pacur**](https://github.com/pritunl/pritunl-pacur/blob/master/pritunl/PKGBUILD) repository. There are some platform specific patches such as the removal of `dataclasses` on Ubuntu from the PyPI requirements with the line `sed -i -e '/^dataclasses==0.8/,+2d' requirements.txt`.

---

<div class="post-metadata">

### Author: ![bulgaru](https://forum.pritunl.com/user_avatar/forum.pritunl.com/bulgaru/32/257_2.png) [@bulgaru](https://forum.pritunl.com/u/bulgaru)
#### Post date: [December 29, 2022, 10:04pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/3 "2022-12-29T22:04:46Z")

</div>

@zach

I am actually using the latest OrangePi5 for testing and the performance does seem promising. I will come back with a more detailed feedback after a thorough testing.

Here’s what I have so far:

```auto
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null
echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update && sudo apt install mongodb-org
sudo systemctl start mongod && sudo systemctl enable mongod

sudo apt install python3 python3-distutils net-tools openvpn openssl iptables ipset ca-certificates psmisc gcc python3-dev python3-setuptools python3-virtualenv libssl-dev libffi-dev golang-go

mkdir pritunl && cd pritunl
wget https://github.com/pritunl/pritunl/archive/refs/tags/1.30.3388.46.tar.gz
tar xf 1.30.3388.46.tar.gz && rm 1.30.3388.46.tar.gz
cd pritunl-1.30.3388.46
tee -a ~/.bashrc << EOF
export GOPATH=\$HOME/go
export PATH=/usr/local/go/bin:\$PATH
EOF
source ~/.bashrc
sed -i "s/’/'/" LICENSE
sed -i -e '/^dataclasses==0.8/,+2d' requirements.txt
virtualenv --python=python3 /usr/lib/pritunl
/usr/lib/pritunl/bin/pip install -U pip
/usr/lib/pritunl/bin/pip install -U setuptools
/usr/lib/pritunl/bin/python setup.py build
/usr/lib/pritunl/bin/pip install --require-hashes -r requirements.txt
go install github.com/pritunl/pritunl-dns@latest
go install github.com/pritunl/pritunl-web@latest
sudo ln -s ~/go/bin/pritunl-dns /usr/bin/pritunl-dns
sudo ln -s ~/go/bin/pritunl-web /usr/bin/pritunl-web
sudo /usr/lib/pritunl/bin/python setup.py install

sudo systemctl start pritunl && sudo systemctl enable pritunl

```

The only thing I’m missing is the pritunl cli. In order to run the setup, I had to do

```auto
sudo /usr/lib/pritunl/bin/pritunl setup-key
sudo /usr/lib/pritunl/bin/pritunl default-password

```

Any hints?

Edit:

```auto
sudo ln -s /usr/lib/pritunl/bin/pritunl /usr/bin/pritunl

```

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [December 30, 2022, 7:03pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/4 "2022-12-30T19:03:53Z")

</div>

Installing Go from the Ubuntu repositories will likely not work, the release is incompatible with newer codebases. The parameter `--require-hashes` may need to be removed from the PyPI command.

---

<div class="post-metadata">

### Author: ![bulgaru](https://forum.pritunl.com/user_avatar/forum.pritunl.com/bulgaru/32/257_2.png) [@bulgaru](https://forum.pritunl.com/u/bulgaru)
#### Post date: [December 30, 2022, 10:29pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/5 "2022-12-30T22:29:59Z")

</div>

@zach  
Just to be clear - the app is perfectly functional, from what I’ve tested so far.  
The only thing missing is “pritunl” cli shortcut.  
Would --require-hashes help with this?

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [January 1, 2023, 9:17pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/6 "2023-01-01T21:17:42Z")

</div>

The command is available in `/usr/lib/pritunl/bin/pritunl`. This can be linked to the `/usr/bin` directory to make it available to the system.

---

<div class="post-metadata">

### Author: ![bulgaru](https://forum.pritunl.com/user_avatar/forum.pritunl.com/bulgaru/32/257_2.png) [@bulgaru](https://forum.pritunl.com/u/bulgaru)
#### Post date: [March 28, 2023, 3:31pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/7 "2023-03-28T15:31:25Z")

</div>

Reporting after a thorough testing for the past 2 months. I am so deeply impressed by the performance of Pritunl on the Orange Pi 5. Initially I expected it to be a backup gateway to accessing the datacenter.

But I’ve been stress-testing it with 5 users heavily streaming YouTube over VPN. The traffic has been steady, there were no lags, the CPU load is always below 7-10% with the average around 2-3%.

It is incredible how the system performs overall! Thank you for all the help in making this possible!

---

<div class="post-metadata">

### Author: ![Turbovix](https://forum.pritunl.com/user_avatar/forum.pritunl.com/turbovix/32/437_2.png) [@Turbovix](https://forum.pritunl.com/u/Turbovix)
#### Post date: [May 22, 2023, 3:28pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/8 "2023-05-22T15:28:54Z")

</div>

Hello Bulgaru, I’ve been breaking my head for some time trying to find a way to install Pritunl on my OrangePI 5 but without success. Would it be possible to have access to your binaries so that I could install on my OPI5?

Thank you very much in advance.

---

<div class="post-metadata">

### Author: ![bulgaru](https://forum.pritunl.com/user_avatar/forum.pritunl.com/bulgaru/32/257_2.png) [@bulgaru](https://forum.pritunl.com/u/bulgaru)
#### Post date: [May 22, 2023, 3:50pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/9 "2023-05-22T15:50:42Z")

</div>

Hey!

Depending on the OS you use, simply pasting the instructions from above should install Pritunl (if your OS is Debian based). Let me know if you want to jump on a call - I’d be glad to help out!

Best!

---

<div class="post-metadata">

### Author: ![Turbovix](https://forum.pritunl.com/user_avatar/forum.pritunl.com/turbovix/32/437_2.png) [@Turbovix](https://forum.pritunl.com/u/Turbovix)
#### Post date: [May 23, 2023, 5:38pm UTC](https://forum.pritunl.com/t/installing-from-source-on-ubuntu-22-04-on-arm64/645/10 "2023-05-23T17:38:36Z")

</div>

hello bulgaru  
Thanks for the feedback, I’ll follow your guidance and try to create the installer to run on mine (Orange PI5 16GB).  
Any questions I come back here to ask for some help.

Thank you and success!
