EmbarkStudios / wg-ui

WireGuard Web UI for self-serve client configurations, with optional auth.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARM Support

cameroncros opened this issue · comments

Is your feature request related to a problem? Please describe.
I cannot start this UI within a ARM docker environment.

Describe the solution you'd like
Make a docker image that will run on ARM cpus, such as Raspberry PI.

Additional context
Currently fails with: standard_init_linux.go:211: exec user process caused "exec format error"
I assume, and I could be wrong, that it is as simple as recompiling.

Would actually love this for my wireguard server hosted on a Rpi4

Just building the image on my PI didnt solve the problem, but I am not super familiar with the build system

Hi @cameroncros and @Bykow,

Thanks for taking your time to create an issue. To build the go app for ARM we need to set the following env variables in the build step if I recall correctly. Ideally it would be nice to have build steps building for both architectures.

export GOARCH=arm64
export GOOS=linux

FWIW, I build the images for arm

https://hub.docker.com/r/velo/wireguard-ui

Followed the instructions from https://www.docker.com/blog/multi-arch-images/

docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t velo/wireguard-ui:v1.0.0 -t velo/wireguard-ui:db46cbe --push .

I would be happy to delete my repo once office images are created

@velo I tried this on my PI4:

[user@pi ~]$ docker run --rm -it --privileged --entrypoint "/wireguard-ui" -v /tmp/wireguard-ui:/data -p 8080:8080 -p 5555:5555 velo/wireguard-ui:latest --data-dir=/data --log-level=debug
standard_init_linux.go:211: exec user process caused "no such file or directory"

Came here to request same, would love to run this on my raspberry pi wireguard server.

You can build an ARM version that doesn't need to run in docker (as it's a self contained app when built) by cloning the code and using the following after installing the latest golang compiler and the go-bindata-assetfs binary:

make ui
go-bindata-assetfs -prefix ui/dist ui/dist
env GOOS=linux GOARCH=arm GOARM=5 go build .

I forked the code and created an ARM release for those interested.

https://github.com/cottley/wg-ui/releases/tag/v1.0.0-ARM

@cottley thank you so much! Running great on my raspberry pi 4

@cottley thank you so much! Running great on my raspberry pi 4

what is the process you have used?

I am interesting of this because i can't start it on my Pi4

I have now updated documentation to describe how to build wg-ui without docker, and also added information on how to build for ARM.

Next step is to make proper releases where we also include a ARM built binary, but this will happen later.

thank you suom1 :)

No problems!

v1.1.0 was released with ARM builds and therefor I close this issue!

@suom1 this version, this is the dockerfile that we must build in the local, or the docker is in the dockerhub, and we can pull on the RPi?

I ask the question because i have doing something wrong