Deployment guide

LabKey Server

Overview

LabKey Server is an open-source scientific data management platform. Biomedical and translational research groups use it to organise study data, assay results and sample information behind a single secure web interface.

A team gets projects and folders with fine-grained permissions, typed datasets and lists, a schema and query browser with its own SQL dialect, charts and reports, a wiki and an issue tracker. Research data then lives in a queryable system of record rather than in scattered spreadsheets.

The SecureAnyCloud image installs LabKey Server 26.7.0 Community Edition as a self-contained appliance. What you get:

  • LabKey Server 26.7.0 Community Edition (Apache-2.0) with Apache Tomcat 11.0 embedded. The distribution is a single Spring Boot application, so there is no separate servlet container to install or patch.
  • Eclipse Temurin 25 JDK (LTS), the only Java version LabKey supports. LabKey runs as a dedicated unprivileged labkey service account bound to the loopback interface.
  • PostgreSQL 16 bundled locally as the LabKey application database, tuned for a single-node appliance
  • nginx on :80 reverse-proxying the loopback LabKey connector on 127.0.0.1:8080
  • A per-VM site administrator account, PostgreSQL password and encryption key, generated on first boot and recorded in a root-only file
  • A preloaded Demo Biomarker Study: a date-based study with a 600-row BiomarkerResults dataset across 60 participants and 12 time points, plus a 600-row SampleMeasurements list
  • The full Community Edition module set: studies, assays, experiments, lists, queries, visualisations, file content, search, wiki, issue tracker and the audit log
  • labkey_server.service, nginx.service and postgresql.service as systemd units, enabled and active
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Use Standard_B2ms (2 vCPU / 8 GiB RAM) or larger. This matches LabKey's own published guidance, which specifies 8 GB as the minimum and 16 GB as the recommended memory for a small single-machine installation. The image ships a JVM heap of -Xms512m -Xmx2G, which leaves ample room on an 8 GiB VM.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp from the clients that need the web interface. LabKey serves plain HTTP on port 80 in this image, so for production terminate TLS in front of it with your own domain and certificate.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for LabKey Server by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size (Standard_B2ms or larger). Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Select Review + create, then Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:labkey-server-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name labkey \
  --image sac1647283583153:labkey-server-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_rsa.pub \
  --public-ip-sku Standard

Open the ports you need:

az vm open-port --resource-group <your-rg> --name labkey --port 80 --priority 1001

Step 3 - Wait for first boot to finish

First boot does real work. It mints this VM's secrets, creates the LabKey application database, runs the initial schema bootstrap across all modules, creates the site administrator account and loads the demo study. This takes roughly one to two minutes after the VM reports running.

Until first boot completes, the web interface may briefly answer with a "server is not ready" message. That is the module bootstrap finishing, not an error.

Check progress over SSH:

sudo systemctl is-active labkey-server-firstboot.service

When the unit reports active (exited), first boot is done.

Step 4 - Retrieve the per-VM administrator password

Each VM generates its own credentials and writes them to a root-only file. Read it as root with sudo:

sudo cat /root/labkey-credentials.txt

The file contains the site administrator email (admin@sac.local), the generated administrator password and the generated PostgreSQL role password. No shared or default password ships in this image. The values are unique to your VM and are created the first time it boots.

Sign in at http://<vm-public-ip>/. After your first sign-in, change the administrator password from the user menu in the top right.

Failed sign-ins. LabKey blocks a client host after several failed sign-in attempts. While the block is active, LabKey rejects the correct password too. If you lock yourself out, wait rather than continuing to guess.

Step 5 - Explore the preloaded demo study

The image ships with a Demo Biomarker Study, so you can see the platform working before you load any of your own data. Open it from the project menu in the top left.

The study overview reports what it holds: one dataset, twelve time points and sixty participants. The tabs across the top open the Participants view and the Clinical and Assay Data browser.

Open Clinical and Assay Data > BiomarkerResults to see the dataset itself: 600 assay results keyed by participant and date.

From this grid you can sort, filter, chart and export the data. Use Manage to change the dataset definition. The demo study is ordinary content, so delete it once you have loaded your own data.

Step 6 - Browse the schema and query your data

Open the Query Schema Browser from the gear menu: Go To Module > Query. You can also go to /Demo%20Study/query-begin.view. The browser lists every schema the Community Edition exposes:

  • study holds subjects, visits and datasets.
  • lists holds each defined list.
  • exp covers experiment runs, data files and sample types.
  • assay covers assay designs and runs.
  • auditLog records who changed what.

You can write LabKey SQL against any of them and save the result as a named query.

Step 7 - Load your own data

Create a project of your own from the project menu (New Project). Pick a folder type: Study for participant- and time-based research data, or Collaboration for a general workspace. Then choose one of these routes:

  • Create a study dataset. In a Study folder, open Manage > Manage Datasets > Create New Dataset. Define your fields, then import rows from a TSV or Excel paste.
  • Create a list. Open the gear menu > Manage Lists > Create New List for reference data that is not keyed by participant and time.
  • Import a spreadsheet. Most grids accept Import Data by copy-paste or file upload, with columns mapped to fields.

The demo study's BiomarkerResults dataset is a working example of the first route: a date-based dataset with participant, date, assay type, result and units.

Maintenance

Service control. The appliance is three systemd units:

sudo systemctl is-active labkey_server nginx postgresql

LabKey logs go to the journal: sudo journalctl -u labkey_server -f.

Memory. The JVM is configured with -Xms512m -Xmx2G in /etc/systemd/system/labkey_server.service. Keep the maximum heap at 2 GB or above. Below that, LabKey shows a persistent "heap memory is too low" warning on every page. If you size the VM up and want a larger heap, raise -Xmx and restart labkey_server.

Database. PostgreSQL 16 runs locally. The LabKey database is named labkey and is owned by the labkey role. Back it up with pg_dump:

sudo install -d -m 0700 /var/backups
sudo -u postgres pg_dump labkey | gzip > /tmp/labkey-backup-test.sql.gz && ls -la /tmp/labkey-backup-test.sql.gz

The application also holds an encryption key in /labkey/labkey/config/application.properties. The key protects secrets stored in the database. Back that file up alongside your database dump, because a restore without the matching key cannot decrypt those values.

Operating system updates. The image is patched at build time and ships with unattended-upgrades enabled, so security updates keep applying on your VM.

Usage reporting. LabKey can report usage statistics back to LabKey Corporation. The report includes environment details and the site administrator's email address and organisation name. This image sets reporting to the minimum level on first boot. To review or change it, open the gear menu > Site > Admin Console > Settings > Usage/Exception Reporting.

Editions

This image ships LabKey Server Community Edition. It is free to download and use, licensed under the Apache License 2.0, and includes the full core data-management module set described above.

LabKey Corporation also sells Premium Editions that add features not present in the Community Edition: specialty assays, electronic lab notebook, sample management, LDAP/SSO/multi-factor authentication, compliance tooling and vendor support. This image does not include them. LabKey's own in-product link about them is visible in the interface.

Support

SecureAnyCloud provides 24/7 support for this image. SecureAnyCloud produces the image, which is not affiliated with, endorsed by or supported by LabKey Corporation. "LabKey" is a trademark of LabKey Corporation, used here only to identify the software this image contains.

Deploy on Azure

Launch LabKey Server 26.7 Community Edition on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure