Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions ct/airconnect.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env bash
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main"
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")

# Copyright (c) 2021-2026 community-scripts ORG
# Author: Chris Moriarty (cwmoriarty)
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://github.com/philippe44/AirConnect

APP="AirConnect"
var_tags="${var_tags:-airplay;audio;streaming}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"

header_info "$APP"
variables
color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources

if [[ ! -d /opt/airconnect ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi

if check_for_gh_release "airconnect" "philippe44/AirConnect"; then
msg_info "Stopping AirConnect"
systemctl stop airupnp aircast
msg_ok "Stopped AirConnect"

CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="airupnp.xml aircast.xml" fetch_and_deploy_gh_release "airconnect" "philippe44/AirConnect" "prebuild" "latest" "/opt/airconnect" "AirConnect-*.zip"

msg_info "Configuring AirConnect"
chmod +x /opt/airconnect/airupnp-linux-$(arch_resolve x86_64 aarch64) /opt/airconnect/aircast-linux-$(arch_resolve x86_64 aarch64)
ln -sf /opt/airconnect/airupnp-linux-$(arch_resolve x86_64 aarch64) /opt/airconnect/airupnp
ln -sf /opt/airconnect/aircast-linux-$(arch_resolve x86_64 aarch64) /opt/airconnect/aircast
find /opt/airconnect -maxdepth 1 -type f ! -name "air*linux-$(arch_resolve x86_64 aarch64)*" ! -name "airupnp" ! -name "aircast" ! -name "*.xml" -delete
msg_ok "Configured AirConnect"

msg_info "Starting AirConnect"
systemctl start airupnp aircast
msg_ok "Started AirConnect"
msg_ok "Updated successfully!"
fi
exit
}

start
build_container
description

msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}AirConnect is running and bridging AirPlay to discovered players:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}airupnp${CL} ${YW}(UPnP / Sonos bridge)${CL}"
echo -e "${TAB}${GATEWAY}${BGN}aircast${CL} ${YW}(Chromecast bridge)${CL}"
echo -e "${INFO}${YW}Ensure your container is on the same LAN subnet as your devices.${CL}"
67 changes: 67 additions & 0 deletions install/airconnect-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env bash

# Copyright (c) 2021-2026 community-scripts ORG
# Author: Chris Moriarty (cwmoriarty)
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://github.com/philippe44/AirConnect

source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os

fetch_and_deploy_gh_release "airconnect" "philippe44/AirConnect" "prebuild" "latest" "/opt/airconnect" "AirConnect-*.zip"

msg_info "Configuring AirConnect"
chmod +x /opt/airconnect/airupnp-linux-$(arch_resolve x86_64 aarch64) /opt/airconnect/aircast-linux-$(arch_resolve x86_64 aarch64)
ln -sf /opt/airconnect/airupnp-linux-$(arch_resolve x86_64 aarch64) /opt/airconnect/airupnp
ln -sf /opt/airconnect/aircast-linux-$(arch_resolve x86_64 aarch64) /opt/airconnect/aircast
find /opt/airconnect -maxdepth 1 -type f ! -name "air*linux-$(arch_resolve x86_64 aarch64)*" ! -name "airupnp" ! -name "aircast" ! -name "*.xml" -delete
msg_ok "Configured AirConnect"

msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/airupnp.service
[Unit]
Description=AirUPnP bridge
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/airconnect
ExecStart=/opt/airconnect/airupnp -l 1000:2000 -Z -x /opt/airconnect/airupnp.xml
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now airupnp

cat <<EOF >/etc/systemd/system/aircast.service
[Unit]
Description=AirCast bridge
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/airconnect
ExecStart=/opt/airconnect/aircast -Z -x /opt/airconnect/aircast.xml
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now aircast
msg_ok "Created Services"

motd_ssh
customize
cleanup_lxc
53 changes: 53 additions & 0 deletions json/airconnect.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "AirConnect",
"slug": "airconnect",
"categories": [
13
],
"date_created": "2026-11-09",
"type": "ct",
"updateable": true,
"privileged": false,
"architectures": [
"amd64",
"arm64"
],
"interface_port": null,
"documentation": "https://github.com/philippe44/AirConnect#readme",
"website": "https://github.com/philippe44/AirConnect",
"repository": "https://github.com/philippe44/AirConnect",
"logo": "https://avatars.githubusercontent.com/u/9712599?v=4",
"description": "AirConnect adds AirPlay capabilities to Chromecast and UPnP (such as Sonos) players, allowing them to appear as native AirPlay audio devices on your network.",
"install_methods": [
{
"type": "default",
"script": "ct/airconnect.sh",
"config_path": "/opt/airconnect/airupnp.xml",
"resources": {
"cpu": 1,
"ram": 512,
"hdd": 4,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "AirConnect relies on network discovery (mDNS on UDP 5353 and UPnP/SSDP on UDP 1900) to find players and receive AirPlay streams. The container must be attached to the same local network bridge (e.g. vmbr0) as your audio devices and AirPlay clients.",
"type": "warning"
},
{
"text": "Both AirUPnP (Sonos/UPnP bridge) and AirCast (Chromecast bridge) services are enabled by default. If you only need one, disable the unused service with systemctl disable --now aircast or systemctl disable --now airupnp.",
"type": "info"
},
{
"text": "Optional custom XML configuration files can be placed at /opt/airconnect/airupnp.xml and /opt/airconnect/aircast.xml. Custom configs are preserved across updates.",
"type": "info"
}
]
}
Loading