- Installing Ballerina via installers
- Installing from source
- Uninstalling Ballerina
- Getting help
- What’s next
Ballerina binary distributions are available for the following supported operating systems and architectures. Ensure that your system meets the below requirements before you proceed with the installation.
- Windows Vista SP2 x64 or later
- Ubuntu Linux 12.04 x64 - LTS and above
- OS X 10.8.3 x64 and above
Installing Ballerina via installers
Follow the below instructions to download and use the installers to install the latest Ballerina version. The installer will automatically uninstall the old Ballerina version if you have one already installed.
Info: If a binary distribution is not available for your combination of operating system and architecture, try installing from source.
Installing on OS X
Download the package file and double-click on it to launch the installer. The installer guides you through the installation process and installs the Ballerina distribution to
The package automatically sets your PATH environment variable for you. You may need to restart any open Terminal sessions for the change to take effect.
Installing on Windows
Download the MSI file and double-click on it to launch the installer. The installer guides you through the installation process and installs the Ballerina distribution to
The installer should put the
C:\Program Files\Ballerina\<ballerina-directory>\bin directory in your PATH environment variable. You may have to restart any open command prompts for the change to take effect.
Installing on Linux
Download the DEB file and double-click on it to launch the installer. The installer guides you through the installation process and installs the Ballerina distribution to
Info: Alternatively, you can use the below command to install Ballerina using the downloaded DEB file. Replace
<ballerina-home>/<ballerina-binary>.debwith the actual file path.
dpkg -i <ballerina-binary>.deb
Installing from source
Alternatively, follow the instructions below to install Ballerina from the source.
Setting up the prerequisites
You need to download and install the below to build the Ballerina modules.
- Java SE Development Kit (JDK) version 8 (from one of the following locations)
- Node.js (version 8.9.x or the latest LTS release)
- npm (version 5.6.0 or later)
Obtaining the source code
Follow the steps below to obtain the Ballerina source code.
Execute the below command to clone the ‘ballerina-lang’ source repository.
git clone --recursive https://github.com/ballerina-platform/ballerina-lang.git
Tip: If you have already forked the repository to your GitHub account, then execute the below command replacing
<YOUR-GITHUB-USERNAME>with your Git username.
git clone --recursive https://github.com/<YOUR-GITHUB-USERNAME>/ballerina-lang.git
Execute the below command to update the Git submodules.
git submodule update --init
Building the source
Follow the steps below to build the project of the obtained source.
Navigate to the root directory of the Ballerina repo (i.e.,
<BALLERINA_PROJECT_ROOT>) and execute one of the below Gradle commands to build the project using Gradle.
- On Unix/Mac OS:
- On Unix/Mac OS:
Extract the built Ballerina distributions created in the below locations:
- runtime only:
- runtime and tools (e.g., Ballerina Language Server):
- runtime only:
Note: If you face an IOException error stating “Too many open files”, this is due to the default number of possible open files being set to a lower number on your operating system than required for Ballerina to be compiled. You may have to increase the number of open files/file descriptors (FD) on your operating system to 1000000 (or higher).
To remove an existing Ballerina installation, go to the Ballerina installation location and delete the Ballerina directory.
- The installation location is usually
/Library/Ballerinain Mac OS X,
/usr/lib/ballerina/in Ubuntu and
C:\Program Files\Ballerina\in Windows.
To get help when you work with Ballerina, see Community.
Once you have successfully installed Ballerina, click the below links to set up your IDE.