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
61 changes: 61 additions & 0 deletions ct/bark-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/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: Charlie Smith (chazkii)
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://github.com/Finb/bark-server

APP="Bark-Server"
var_tags="${var_tags:-notification}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-256}"
var_disk="${var_disk:-2}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
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/bark-server ]]; then
msg_error "No Bark Server Installation Found!"
exit
fi

if check_for_gh_release "bark-server" "Finb/bark-server"; then
msg_info "Stopping Bark Server"
systemctl stop bark-server
msg_ok "Stopped Bark Server"

create_backup /opt/bark-server/bark.db

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bark-server" "Finb/bark-server" "singlefile" "latest" "/opt/bark-server" "bark-server_linux_$(arch_resolve "amd64" "armv8")"

restore_backup

msg_info "Starting Bark Server"
systemctl start bark-server
msg_ok "Started Bark Server"
msg_ok "Updated successfully!"
fi
exit
}

start
build_container
description

msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}Bark Server setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/ping${CL}"
42 changes: 42 additions & 0 deletions install/bark-server-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash

# Copyright (c) 2021-2026 community-scripts ORG
# Author: Charlie Smith (chazkii)
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://github.com/Finb/bark-server

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

fetch_and_deploy_gh_release "bark-server" "Finb/bark-server" "singlefile" "latest" "/opt/bark-server" "bark-server_linux_$(arch_resolve "amd64" "armv8")"

msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/bark-server.service
[Unit]
Description=Bark Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/bark-server
Environment=BARK_SERVER_ADDRESS=0.0.0.0:8080
Environment=BARK_SERVER_DATA_DIR=/opt/bark-server
ExecStart=/opt/bark-server/bark-server
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now bark-server
msg_ok "Created Service"

motd_ssh
customize
cleanup_lxc
44 changes: 44 additions & 0 deletions json/bark-server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "Bark Server",
"slug": "bark-server",
"categories": [
18
],
"date_created": "2026-10-14",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8080,
"documentation": "https://bark.day.app/",
"website": "https://bark.day.app/",
"repository": "https://github.com/Finb/bark-server",
"logo": "https://bark.day.app/logo.png",
"description": "Bark Server is the self-hosted backend for the Bark iOS app. It receives push requests over a simple HTTP API and forwards them to Apple's APNs, so scripts and home-automation flows can send custom notifications to your own iPhone. Device keys are stored locally in an embedded key-value database, so no external database is required.",
"install_methods": [
{
"type": "default",
"script": "ct/bark-server.sh",
"resources": {
"cpu": 1,
"ram": 256,
"hdd": 2,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Bark Server has no authentication by default, set BARK_SERVER_BASIC_AUTH_USER / BARK_SERVER_BASIC_AUTH_PASSWORD to enable HTTP Basic auth.",
"type": "warning"
},
{
"text": "Verify the server with: curl http://<IP>:8080/ping — it returns {\"code\":200,\"message\":\"pong\"}.",
"type": "info"
}
]
}
Loading