Lokinet LXC
Jump to navigation
Jump to search
You can run lokinet inside an lxc and this is a preferred way to run lokinet on a vps or box with a public ip.
install lxc:
sudo apt install lxc
you do not want lxd, that is lxc with more things you probably dont need and their cli tools are totally different.
Setup
create the lxc:
sudo lxc-create -t debian -n lokinet
set up the config options needed for lokinet to run in an lxc
# this goes at the end of /var/lib/lxc/lokinet/config # bind /dev/net into the container for /dev/net/tun lxc.mount.entry = /dev/net dev/net none bind,create=dir # allow /dev/net/tun to exist lxc.cgroup2.devices.allow = c 10:200 rwm # auto start the container (optional but nice to have) lxc.start.auto = 1
start up the lxc
sudo lxc-start -d -n lokinet
then attach to the inside of the lxc and install lokinet as you usually would.
sudo lxc-attach -n lokinet apt update && apt upgrade apt install curl gpg curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg echo "deb https://deb.oxen.io $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/oxen.list apt update && apt install lokinet && exit
set up an exit node to make sure clearnet traffic goes over lokinet. see this page.