This docker image is used for all Lethean node types:
Warning: Running this image contains Zabbix agent which monitors basic functionality of node.
To run daemon node, no more options are needed. Note: It is best option to move blockchain data and config outside of docker so you can easily upgrade. See "Sample docker script" below.
docker run -p48782:48782 -p 48772:48772 \
-v /var/lib/lthn:/var/lib/lthn \
--hostname lthn-daemon-xxx \
letheanio/vpn daemon
To run client, you need working wallet. Only HTTP proxy VPN is available within docker image. By default, port 8888 is used as proxy port. To run in proxy mode:
docker run letheanio/vpn vpnclient connect authid@provider/service
If you want to run openvpn client inside docker, you must allow more capabilities: Of course, you need to enable routing to container, see openvpn docker container howto.
docker run --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun \
--sysctl net.ipv4.ip_forward=1 \
--sysctl net.ipv6.conf.all.forwarding=1 \
letheanio/vpn vpnclient connect authid@provider/service
To run a server, you need more prereqs. And server must be preconfigured. See "VPN server easy configure"
mkdir -p /dev/net && mknod /dev/net/tun c 10 200
docker run --hostname lthn-vpn-server-xxx \
-v /etc/lthn:/etc/lthn/ \
--cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun \
--sysctl net.ipv4.ip_forward=1 \
--sysctl net.ipv6.conf.all.forwarding=1 letheanio/vpn vpnserver
docker run --hostname lthn-vpn-server-xxx \
-v /etc/lthn:/etc/lthn \
configure
If you want to become lethean node provider, your node is being automatically monitored by Zabbix so SLA and other parameters will be monitored. But note it is not enough to just run docker one time. Do not run provired manually. Use modified script below. It is safe to run this script regularly from cron so your node will allways be up to date.
This script will ensure that you are always running latest version of docker image and that your data are outside of docker (requirement for provider). Upgrade is very quick and straightforward with docker. Just change docker name to unique string like "lthn-provider-acme" Run this script daily, best in some random time. Data are outside of docker so it is safe to run.
#!/bin/sh
# Config part
PROVIDER_NAME=<name>
CONF=/etc/lthn
DATA=/var/lib/lthn
# Script part
docker pull letheanio/vpn
docker stop $PROVIDER_NAME
docker rm $PROVIDER_NAME
# Create LMDB snapshot for rsync
docker run -ti -v $CONF:/etc/lthn -v $DATA:/var/lib/lthn \
letheanio/vpn lmdb-snapshot
# Run provider node
docker run -d --restart=always \
--cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --sysctl net.ipv4.ip_forward=1 --sysctl net.ipv6.conf.all.forwarding=1 \
-p 20000:20000 -p 20000:20000/udp -p 20002:20002 -p 20002:20002/udp -p 8179:8179 \
-p 48782:48782 -p 48772:48772 -p873:873 \
-e DAEMONHOST=sync.lethean.io \
-e RPCPORT=14660 \
-v $CONF:/etc/lthn \
-v $DATA:/var/lib/lthn \
--hostname $PROVIDER_NAME \
--name $PROVIDER_NAME \
letheanio/vpn provider
docker build -t lethean:latest .
Content type
Image
Digest
sha256:897fe77c3…
Size
569.5 MB
Last updated
almost 3 years ago
docker pull letheanio/vpn