-
-
Notifications
You must be signed in to change notification settings - Fork 183
Setup on Raspberry Pi 4
Steven Tang edited this page Apr 12, 2022
·
7 revisions
Contributed by @nck974 in #150, #353.
# Installing go for example in /usr/local/go
apt install build-essential
export GO111MODULE=on
wget https://go.dev/dl/go1.18.linux-armv6l.tar.gz
# or newest golang arm version from https://golang.org/dl/
tar xvf go1.18.linux-armv6l.tar.gz
rm go1.18.linux-armv6l.tar.gz
mv go/* .
rmdir go
vim ~/.profile
# add
# export GOPATH=$HOME/work
# export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
source ~/.profile
cd ..
git clone https://github.com/muety/wakapi.git
cd wakapi
go build -o wakapi
cp config.default.yml config.yml
vim config.yml # setup your config
nohup ./wakapi > nohuput.out &
Example running on port 80 without https for a local network cd /etc/apache2/sites-available/
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:3001/
ProxyPassReverse / http://127.0.0.1:3001/
CustomLog /var/log/apache2/wakapi.log common
ServerName my-server
</VirtualHost>
a2enmod proxy
a2enmod proxy_http
a2enmod lbmethod_byrequests
a2ensite wakapi.conf
service apache2 restart
server:
listen_ipv4: localhost # leave blank to disable ipv4
listen_ipv6: ::1 # leave blank to disable ipv6
tls_cert_path: # leave blank to not use https
tls_key_path: # leave blank to not use https
port: 3001
base_path: /
# Kill process
ps aux | grep wakapi
kill <give_here_pid>
# Download and reset to remove problems with go.sum
git reset --hard
git pull
go build
# Start again
nohup ./wakapi > nohuput.out &