website/docs/gettingstarted/installation.mdx
Wails has a number of common dependencies that are required before installation:
Download Go from the Go Downloads Page.
Ensure that you follow the official Go installation instructions. You will also need to ensure that your PATH environment variable also includes the path to your ~/go/bin directory. Restart your terminal and do the following checks:
go versionecho $PATH | grep go/binDownload NPM from the Node Downloads Page. It is best to use the latest release as that is what we generally test against.
Run npm --version to verify.
You will also need to install platform specific dependencies:
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
<Tabs
defaultValue="Windows"
values={[
{ label: "Windows", value: "Windows" },
{ label: "MacOS", value: "MacOS" },
{ label: "Linux", value: "Linux" },
]}
>
<TabItem value="MacOS">
Wails requires that the xcode command line tools are installed. This can be
done by running <code>xcode-select --install</code>.
</TabItem>
<TabItem value="Windows">
Wails requires that the <a href="https://developer.microsoft.com/en-us/microsoft-edge/webview2/">WebView2</a> runtime is installed. Some Windows installations will already have this installed. You can check using the <code>wails doctor</code> command.
</TabItem>
<TabItem value={"Linux"}>
Linux requires the standard <code>gcc</code> build tools plus <code>libgtk3</code> and <code>libwebkit</code>. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run <code>wails doctor</code> after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the <a href={"/docs/guides/linux-distro-support"}>Add Linux Distro</a> guide.
<strong>Note:</strong>
If you are using latest Linux version (example: Ubuntu 24.04) and it is not supporting <code>libwebkit2gtk-4.0-dev</code>, then you might encounter an issue in <code>wails doctor</code>: <code>libwebkit</code> not found. To resolve this issue you can install <code>libwebkit2gtk-4.1-dev</code> and during your build use the tag <code>-tags webkit2_41</code>.
After installing Wails via Go, ensure you run the following commands to update your PATH:
<code>export PATH=$PATH:$(go env GOPATH)/bin</code>
<code>source ~/.bashrc</code> or <code>source ~/.zshrc</code>
</TabItem>
</Tabs>
Run go install github.com/wailsapp/wails/v2/cmd/wails@latest to install the Wails CLI.
Note: If you get an error similar to this:
....\Go\pkg\mod\github.com\wailsapp\wails\[email protected]\pkg\templates\templates.go:28:12: pattern all:ides/*: no matching files found
please check you have Go 1.18+ installed:
go version
Running wails doctor will check if you have the correct dependencies installed. If not, it will advise on what is missing and help on how to rectify any problems.
wails command appears to be missing?If your system is reporting that the wails command is missing, make sure you have followed the Go installation guide
correctly. Normally, it means that the go/bin directory in your User's home directory is not in the PATH environment
variable. You will also normally need to close and reopen any open command prompts so that changes to the environment
made by the installer are reflected at the command prompt.