# Audio X server (Linux and macOS, experimental)

![Audio X web remote](images/web-playlist.png)

**audiox-server** is Audio X without the desktop window. It runs the audio engine, the cue list, the soundboard pads, the show-control actions of the cues (Yamaha, Allen & Heath, Q-SYS, MIDI) and the PIN-protected [web remote](Remote-Control-and-Phone-App). You open its web page from a phone, tablet or PC and run the show from there. It is the first part of Audio X that runs on **Linux** (tested) and **macOS** (written, never run). There is **no Linux or Mac editing program yet**; a first window for Linux is the [desktop preview](Audio-X-Desktop-Preview). Build the show and the pads with the Windows program and copy the `.axshow` file (and `settings.json`) over.

## What it does and does not do

| In the server | Not in the server yet |
|---|---|
| Cue list: GO, STOP, PAUSE, PANIC, fire a cue, groups, timers, locks, auto-continue and auto-follow | Radio and idents, Spotify |
| Soundboard pads (all modes, ducking) | Multitrack recorder |
| Cue actions: Yamaha, Allen & Heath, Q-SYS, MIDI (Linux: ALSA; macOS: CoreMIDI, untried) | Talkback microphone, analyser / SPL meter |
| Countdown timer | Stage display server, Stream Deck link, timecode |
| WAV, FLAC, MP3, Ogg, AIFF and AAC / M4A files | Editing a show (use the Windows program) |

A button on the web page for something the server does not have answers "Not available in audiox-server yet".

## Install

**Debian / Ubuntu 26.04:** `sudo apt install ./audiox-server_1.12.0_amd64.deb`. It creates the user `audiox`, installs the service and the `audiox-server` command.

**Any x86-64 Linux:** unpack `audiox-server-1.12.0-linux-x64.tar.gz`; run `./audiox-server --help`, or `sudo ./install.sh` to install it to `/opt/audiox-server` with the systemd service.

**macOS:** the packages are built on a Mac by `macos/build-macos-package.sh` (or by the *Packages* workflow); none has been published because none has been built yet. The program is not signed: see the note in the package's `README-macos.txt` about the quarantine mark.

The server needs ALSA (`libasound2`), `libssl3` and, for AAC / M4A files, the FFmpeg libraries it was built against (the `.deb` depends on them).

## Run

```
audiox-server --list-devices                      the audio outputs
audiox-server --show my.axshow --port 8765        run it in a terminal; Ctrl+C stops it
audiox-server --virtual                           no sound card: a test device, to try the web page
```

At start it prints the audio device, the show, and the address and **PIN** of the web remote (`http://THIS-MACHINE:8765/`). Options: `--show FILE`, `--port N`, `--pin PIN`, `--device "TYPE|NAME"`, `--rate HZ`, `--buffer N`, `--channels N`, `--virtual`, `--list-devices`, `--version`.

Settings, pads and the show-control setup are read from the same `settings.json` as the Windows program (Linux: `~/.config/audiox/`, macOS: `~/Library/Application Support/AudioX/`). The server saves a PIN there when it makes one.

## As a service (Linux)

Edit `/etc/default/audiox-server` (for example `AUDIOX_ARGS="--show /var/lib/audiox/shows/mine.axshow --device 'ALSA|hw:0,0' --port 8765"`), put the show in `/var/lib/audiox/shows/`, then:

```
sudo systemctl enable --now audiox-server
journalctl -u audiox-server -f
```

The service runs as the user `audiox` in the `audio` group and uses ALSA directly. On a desktop with PipeWire or PulseAudio run `audiox-server` as yourself in a terminal instead, so it plays through the sound server.

## Safety

The web remote is protected by the PIN, locks out repeated wrong attempts and only accepts commands from its own page, but the plain page is **not encrypted**: use it on the show network, never on the internet.

## What has been tested

On Ubuntu 26.04 under Windows WSL 2: start-up on the virtual device and on ALSA (through the PulseAudio bridge, with sound), sign-in, GO / PAUSE / PANIC / fire / countdown through the web API, graceful stop on SIGTERM, the `.deb` install and removal, and control of the Linux server from a Windows browser. **Not tested:** other distributions, a real sound card, MIDI hardware, the systemd service on a real machine, anything on macOS.
