This topic is under construction for the 24.3 (March 2024) release of LabKey Server with embedded Tomcat 10. For the previous documentation, click here.

In addition to the general process described in Set Up a Development Machine, follow these extra steps when setting up OSX machines for LabKey development.

Software Installation

1. Install the Apple OSX developer tools. This contains a number of important tools you will need.

2. GitHub for OSX

You can use GitHub Desktop or another Git client.

3. Java for OSX

  • Download the appropriate version and variant (x64 or aarch64 depending on your CPU type) of the recommended version of Java:
  • Supported Technologies
4. PostgreSQL Database
Note: You can also consider installing the database using docker as outlined in this topic.

This facilitates launch with a command like:

$ docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=[password] -d postgres

5. Set up environment variables: We use <LK_ENLISTMENT> to refer to the location where you placed your enlistment. Substitute it where shown.

  • Add this location to your PATH: <LK_ENLISTMENT>/build/deploy/bin
    • This directory won't exist yet, but add it to the PATH anyway. The Gradle build downloads binaries used by the server, such as graphvis, dot, and proteomics tools, to this directory.
You can do this via traditional linux methods (in ~/.bash_profile) or via OSX's plist environment system.

To add the environment variables using ~/.zshrc or ~/.bash_profile (depending on your default shell), edit the file and add the lines, customizing for your own local paths to your enlistment and java:

export JAVA_HOME=`/usr/libexec/java_home -v 11`
export LK_ENLISTMENT=/labkeydev/labkeyEnlistment
export PATH=$LK_ENLISTMENT/build/deploy/bin:$PATH

IntelliJ IDEA

The setup for IntelliJ is described in the common documentation. There may be differences for OSX, and version differences, including but not limited to:

    • The menu path for setting path variables is IntelliJ IDEA > Preferences > Appearance & Behavior > Path Variables.

SQL Server Notes (Premium Feature)

Premium Feature — Using SQL Server is available with Premium Editions of LabKey Server. Learn more or contact LabKey.

Typically SQL Server Express is adequate for development. Follow the instructions here for the installation. Note that you should not need to do the extra steps to get GROUP_CONCAT installed. It will be installed automatically when you start up LabKey Server for the first time pointing to your SQL Server database.

SQL Server Browser Setup

During the installation, you will want to set the SQL Server Browser to start automatically. You can do this from within the SQL Server Configuration Manager. Under SQL Server Services, right click on the SQL Server Browser and open the Properties window. Go to the Service tab and change the Start Mode to "Automatic."

Remote Access to SQL Server

To allow for remote access to SQL Server, you will need to:

  1. Create a hole for SQL Server in the Windows firewall. Follow the instructions in the "TCP Access" section of this TechNet note.
  2. Make some configuration changes to allow remote connections and set up a login for LabKey Server to use:
  • Open SQL Server Management Studio (which is not the same as the SQL Server Configuration Manager)
  • Right click on the <Server Name> and choose Properties -->Connections, check "Allow remote connections to this server"
  • From <Server Name> --> Properties, --> Security, set Server Authentication to “SQL Server & Windows Authentication mode”
  • Click OK and Close the Properties window
  • Choose Security --> Logins --> double click on 'sa' --> Status, set Login to Enabled. This is the user that will be used by LabKey Server, so set the password and take note of it.
  • From Sql Server Configuration Manager, select SQL Server Network Configuration --> Protocols for MSSQLSERVER.
    • Enable TCP/IP (If not enabled already).
    • Right Click on TCP/IP --> Properties --> IP Addresses tab
    • Make sure ports with IP Addresses of and other other IP Address (thats used in Port Forwarding that you found using ipconfig), are Enabled.
    • Restart your computer.
  1. Restart SQL Server & SQL Server Browser from the Services control panel.

LabKey Properties Files

  1. Edit the config file under <LK_ENLISTMENT>/server/configs. If you have setup the NAT forwarding mentioned above, then set the databaseDefaultHost to Otherwise, set the databaseDefaultHost to the windows IP (use ipconfig to find out what this is; you want the IPv4 address) (seems like this is necessary; just using the name of the host instead doesn't seem to work). If you have multiple datasources defined in your file, the IP address needs to be used for those data sources as well.
  2. Edit the config file further by updating the jdbcUser and jdbcPassword information. This is where you use the "sa" user and the password you had setup during the SQL Server install.
  3. Pick SQL Server for LabKey (run "gradlew pickMSSQL" - either from the command line or within IntelliJ)
  4. Restart your LabKey Server Instance

Notes for Using Oracle as an External Data Source

Oracle Express Edition is probably sufficient for development and testing purposes. Follow the instructions in the installation docs on Oracle's site and then refer to the page for using Oracle as an external data source for some LabKey specifics.

Remote Access to Oracle

After the initial installation, Oracle Database XE will be available only from the local server, not remotely. Be sure to follow the steps for making Oracle available to Remote Clients. In particular, you will need to run the following command from within SQL*Plus connected as the system user


SQL Developer (Oracle Client UI)

For troubleshooting and development, you will probably want to install a version of SQL Developer, the Oracle client application. There is a version of the client that works on OSX, so it is probably easiest to download and install on your OSX machine.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all