---
title: Building Jack for JackTrip Studio Servers
description: JackTrip uses version 2 of the Jack Audio Connection Kit (jackdmp). With a few patches described in this article, we've been able to run synthetic scale tests of up to 500 stereo clients using a singl
---

[Skip to content](https://support.jacktrip.com/building-jack-for-virtual-studio-servers#main-content)

English

Show submenu for translations

[Customer portal](https://support.jacktrip.com/tickets?hsLang=en)

![jt-logo-dark.png\]](https://support.jacktrip.com/hs-fs/hubfs/jt-logo-dark.png?height=40&name=jt-logo-dark.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Customer portal](https://support.jacktrip.com/tickets)
- Go to JackTrip Labs

 Go to JackTrip Labs

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://support.jacktrip.com/?hsLang=en)
2. [Open Source JackTrip](https://support.jacktrip.com/open-source-jacktrip?hsLang=en)
3. [Building Virtual Studio](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#building-virtual-studio)

# Building Jack for JackTrip Studio Servers

JackTrip uses version 2 of the [Jack Audio Connection Kit](https://jackaudio.org/) (jackdmp). With a few patches described in [this article](https://25ms.org/2020/07/21/scaling-to-254-and-beyond/), we've been able to run synthetic scale tests of up to 500 stereo clients using a single 96 vCPU server. This page documents how we build Jack for our servers.

First, clone the jack2 repository:

```
git clone https://github.com/jackaudio/jack2.gitcd jack2git checkout v1.9.19
```

Next, apply this patch to increase limits:

```
diff --git a/common/JackConstants.h b/common/JackConstants.hindex 0cf62ebc..7f9525f6 100644--- a/common/JackConstants.h+++ b/common/JackConstants.h@@ -44,11 +44,11 @@#define REAL_JACK_PORT_NAME_SIZE JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE // full name like "client_name:short_port_name"#ifndef PORT_NUM-#define PORT_NUM 2048+#define PORT_NUM 8192#endif#ifndef PORT_NUM_MAX-#define PORT_NUM_MAX 4096 // The "max" value for ports used in connection manager, although port number in graph manager is dynamic+#define PORT_NUM_MAX 8192 // The "max" value for ports used in connection manager, although port number in graph manager is dynamic#endif#define DRIVER_PORT_NUM 256@@ -62,7 +62,7 @@#define CONNECTION_NUM_FOR_PORT PORT_NUM_FOR_CLIENT#ifndef CLIENT_NUM-#define CLIENT_NUM 64+#define CLIENT_NUM 1024#endif#define AUDIO_DRIVER_REFNUM 0 // Audio driver is initialized first, it will get the refnum 0diff --git a/common/shm.h b/common/shm.hindex 3e3276dc..27559fa4 100644--- a/common/shm.h+++ b/common/shm.h@@ -49,7 +49,7 @@ extern "C"#endif#define MAX_SERVERS 8 /* maximum concurrent servers */-#define MAX_SHM_ID 256 /* generally about 16 per server */+#define MAX_SHM_ID 4096 /* generally about 16 per server */#define JACK_SHM_MAGIC 0x4a41434b /* shm magic number: "JACK" */#define JACK_SHM_NULL_INDEX -1 /* NULL SHM index */#define JACK_SHM_REGISTRY_INDEX -2 /* pseudo SHM index for registry */
```

Configure, build and install:

```
./waf configure --clients=1024 --ports-per-application=8192sudo ./waf install
```

Finally, create a tarball for installation in the VM images:

```
tar cvzf jack2-1.9.19-patched.tar.gz /usr/local/include/jack/* /usr/local/lib/libjack* /usr/local/lib/jack/* /usr/local/bin/jack* /usr/local/share/man/man1/jack* /usr/local/share/man/man1/alsa_* /usr/local/lib/pkgconfig/jack.pc
```

- [Setup Guides - Start here!](https://support.jacktrip.com/setup-guides-start-here?hsLang=en#main-content)

    - [Connecting to JackTrip for the First Time](https://support.jacktrip.com/setup-guides-start-here?hsLang=en#connecting-to-jacktrip-for-the-first-time)
    - [Advanced Setup Topics - Connecting, Recording, and Optimizing](https://support.jacktrip.com/setup-guides-start-here?hsLang=en#advanced-setup-topics-connecting-recording-and-optimizing)
    - [Using the Optional JackTrip Bridge](https://support.jacktrip.com/setup-guides-start-here?hsLang=en#using-the-optional-jacktrip-bridge)
- [Info, FAQs, and Troubleshooting](https://support.jacktrip.com/info-faqs-and-troubleshooting?hsLang=en#main-content)

    - [Info and FAQs](https://support.jacktrip.com/info-faqs-and-troubleshooting?hsLang=en#info-and-faqs)
    - [Bridge Troubleshooting](https://support.jacktrip.com/info-faqs-and-troubleshooting?hsLang=en#bridge-troubleshooting)
    - [Troubleshooting](https://support.jacktrip.com/info-faqs-and-troubleshooting?hsLang=en#troubleshooting)
    - [Managing Studio Servers](https://support.jacktrip.com/info-faqs-and-troubleshooting?hsLang=en#managing-studio-servers)
- [Open Source JackTrip](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#main-content)

    - [Getting Started with JackTrip on your Computer](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#getting-started-with-jacktrip-on-your-computer)
    - [Building Your Own JackTrip Bridge Device](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#building-your-own-jacktrip-bridge-device)
    - [Alternative Raspberry Pi Configurations](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#alternative-raspberry-pi-configurations)
    - [External Resources](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#external-resources)
    - [Other Applications Related to JackTrip](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#other-applications-related-to-jacktrip)
    - [Building Virtual Studio](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#building-virtual-studio)
    - [SuperCollider](https://support.jacktrip.com/open-source-jacktrip?hsLang=en#supercollider)
- [Get Started with JackTrip](https://support.jacktrip.com/get-started-with-jacktrip?hsLang=en)
- [Managing a JackTrip Server](https://support.jacktrip.com/managing-a-jacktrip-server?hsLang=en)

# JackTrip Labs Inc.

JackTrip Labs Help Center

Copyright © 2026, JackTrip Labs Inc.