Skip to content

Commit a87d423

Browse files
committed
Add Neko virtual browser template
Introduce Neko container template with installer and metadata. Adds ct/neko.sh (container install entrypoint and update routine), install/neko-install.sh (detailed install/build steps: fetch GitHub release m1k1o/neko, build client/server, configure supervisord, systemd service, runtime users, plugins, and default neko.yaml), and json/neko.json (app metadata, resources, port 8080, default credentials and notes). Enables automated provisioning of the Neko WebRTC virtual browser on Debian 12 with default CPU/RAM/disk values.
1 parent 2e2b315 commit a87d423

3 files changed

Lines changed: 360 additions & 0 deletions

File tree

ct/neko.sh

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: CanbiZ (MickLesk)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://neko.m1k1o.net/
7+
8+
APP="Neko"
9+
var_tags="${var_tags:-virtual-browser;webrtc;streaming}"
10+
var_cpu="${var_cpu:-4}"
11+
var_ram="${var_ram:-4096}"
12+
var_disk="${var_disk:-12}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d /opt/neko ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
32+
if check_for_gh_release "neko" "m1k1o/neko"; then
33+
msg_info "Stopping Service"
34+
systemctl stop neko
35+
msg_ok "Stopped Service"
36+
37+
msg_info "Backing up Data"
38+
cp /etc/neko/neko.yaml /opt/neko.yaml.bak
39+
msg_ok "Backed up Data"
40+
41+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "neko" "m1k1o/neko" "tarball"
42+
43+
msg_info "Building Client"
44+
cd /opt/neko/client
45+
$STD npm install
46+
$STD npm run build
47+
cp -r /opt/neko/client/dist/* /var/www/
48+
msg_ok "Built Client"
49+
50+
msg_info "Building Server"
51+
cd /opt/neko/server
52+
$STD ./build
53+
cp /opt/neko/server/bin/neko /usr/bin/neko
54+
cp -r /opt/neko/server/bin/plugins/* /etc/neko/plugins/ 2>/dev/null || true
55+
msg_ok "Built Server"
56+
57+
msg_info "Restoring Data"
58+
cp /opt/neko.yaml.bak /etc/neko/neko.yaml
59+
rm -f /opt/neko.yaml.bak
60+
msg_ok "Restored Data"
61+
62+
msg_info "Starting Service"
63+
systemctl start neko
64+
msg_ok "Started Service"
65+
msg_ok "Updated successfully!"
66+
fi
67+
exit
68+
}
69+
70+
start
71+
build_container
72+
description
73+
74+
msg_ok "Completed Successfully!\n"
75+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
76+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
77+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"

install/neko-install.sh

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: CanbiZ (MickLesk)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://neko.m1k1o.net/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt install -y \
18+
supervisor \
19+
pulseaudio \
20+
dbus-x11 \
21+
xserver-xorg-video-dummy \
22+
xdotool \
23+
xclip \
24+
libgtk-3-0 \
25+
gstreamer1.0-plugins-base \
26+
gstreamer1.0-plugins-good \
27+
gstreamer1.0-plugins-bad \
28+
gstreamer1.0-plugins-ugly \
29+
gstreamer1.0-pulseaudio \
30+
openbox \
31+
firefox-esr \
32+
fonts-noto-color-emoji \
33+
fonts-wqy-zenhei
34+
msg_ok "Installed Dependencies"
35+
36+
msg_info "Installing Build Dependencies"
37+
$STD apt install -y \
38+
build-essential \
39+
pkg-config \
40+
libx11-dev \
41+
libxrandr-dev \
42+
libxtst-dev \
43+
libgtk-3-dev \
44+
libxcvt-dev \
45+
libgstreamer1.0-dev \
46+
libgstreamer-plugins-base1.0-dev
47+
msg_ok "Installed Build Dependencies"
48+
49+
NODE_VERSION="22" setup_nodejs
50+
GO_VERSION="1.25" setup_go
51+
52+
fetch_and_deploy_gh_release "neko" "m1k1o/neko" "tarball"
53+
54+
msg_info "Building Client"
55+
cd /opt/neko/client
56+
$STD npm install
57+
$STD npm run build
58+
mkdir -p /var/www
59+
cp -r /opt/neko/client/dist/* /var/www/
60+
msg_ok "Built Client"
61+
62+
msg_info "Building Server"
63+
cd /opt/neko/server
64+
$STD ./build
65+
cp /opt/neko/server/bin/neko /usr/bin/neko
66+
mkdir -p /etc/neko/plugins
67+
cp -r /opt/neko/server/bin/plugins/* /etc/neko/plugins/ 2>/dev/null || true
68+
msg_ok "Built Server"
69+
70+
msg_info "Setting up Runtime"
71+
useradd -m -s /bin/bash neko
72+
usermod -aG audio,video neko
73+
74+
mkdir -p /etc/neko/supervisord /var/www /var/log/neko /tmp/.X11-unix /tmp/runtime-neko /home/neko/.config/pulse /home/neko/.local/share/xorg
75+
chmod 1777 /tmp/.X11-unix
76+
chmod 1777 /var/log/neko
77+
chmod 0700 /tmp/runtime-neko
78+
chown neko /tmp/.X11-unix /var/log/neko /tmp/runtime-neko
79+
chown -R neko:neko /home/neko
80+
81+
cp /opt/neko/runtime/xorg.conf /etc/neko/xorg.conf
82+
cp /opt/neko/runtime/default.pa /etc/pulse/default.pa
83+
84+
cat <<EOF >/etc/neko/supervisord.conf
85+
[supervisord]
86+
nodaemon=true
87+
user=root
88+
pidfile=/var/run/supervisord.pid
89+
logfile=/dev/null
90+
logfile_maxbytes=0
91+
loglevel=debug
92+
93+
[include]
94+
files=/etc/neko/supervisord/*.conf
95+
96+
[program:x-server]
97+
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
98+
command=/usr/bin/X %(ENV_DISPLAY)s -config /etc/neko/xorg.conf -noreset -nolisten tcp
99+
autorestart=true
100+
priority=300
101+
user=%(ENV_USER)s
102+
stdout_logfile=/var/log/neko/xorg.log
103+
stdout_logfile_maxbytes=100MB
104+
stdout_logfile_backups=10
105+
redirect_stderr=true
106+
107+
[program:pulseaudio]
108+
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
109+
command=/usr/bin/pulseaudio --log-level=error --disallow-module-loading --disallow-exit --exit-idle-time=-1
110+
autorestart=true
111+
priority=300
112+
user=%(ENV_USER)s
113+
stdout_logfile=/var/log/neko/pulseaudio.log
114+
stdout_logfile_maxbytes=100MB
115+
stdout_logfile_backups=10
116+
redirect_stderr=true
117+
118+
[program:neko]
119+
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
120+
command=/usr/bin/neko serve --server.static "/var/www"
121+
stopsignal=INT
122+
stopwaitsecs=3
123+
autorestart=true
124+
priority=800
125+
user=%(ENV_USER)s
126+
stdout_logfile=/var/log/neko/neko.log
127+
stdout_logfile_maxbytes=100MB
128+
stdout_logfile_backups=10
129+
redirect_stderr=true
130+
131+
[unix_http_server]
132+
file=/var/run/supervisor.sock
133+
chmod=0770
134+
chown=root:neko
135+
136+
[supervisorctl]
137+
serverurl=unix:///var/run/supervisor.sock
138+
139+
[rpcinterface:supervisor]
140+
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
141+
EOF
142+
143+
cat <<EOF >/etc/neko/supervisord/firefox.conf
144+
[program:firefox]
145+
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
146+
command=/usr/bin/firefox-esr --no-remote --display=%(ENV_DISPLAY)s -width 1280 -height 720
147+
stopsignal=INT
148+
autorestart=true
149+
priority=800
150+
user=%(ENV_USER)s
151+
stdout_logfile=/var/log/neko/firefox.log
152+
stdout_logfile_maxbytes=100MB
153+
stdout_logfile_backups=10
154+
redirect_stderr=true
155+
156+
[program:openbox]
157+
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
158+
command=/usr/bin/openbox --config-file /etc/neko/openbox.xml
159+
autorestart=true
160+
priority=300
161+
user=%(ENV_USER)s
162+
stdout_logfile=/var/log/neko/openbox.log
163+
stdout_logfile_maxbytes=100MB
164+
stdout_logfile_backups=10
165+
redirect_stderr=true
166+
EOF
167+
168+
cat <<'EOF' >/etc/neko/openbox.xml
169+
<?xml version="1.0" encoding="UTF-8"?>
170+
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
171+
<applications>
172+
<application class="firefox" name="Navigator" role="browser">
173+
<decor>no</decor>
174+
<maximized>true</maximized>
175+
<focus>yes</focus>
176+
<layer>normal</layer>
177+
</application>
178+
</applications>
179+
<focus>
180+
<focusNew>yes</focusNew>
181+
<followMouse>no</followMouse>
182+
<focusLast>yes</focusLast>
183+
<underMouse>no</underMouse>
184+
<focusDelay>200</focusDelay>
185+
<raiseOnFocus>no</raiseOnFocus>
186+
</focus>
187+
<placement>
188+
<policy>Smart</policy>
189+
<center>yes</center>
190+
</placement>
191+
<desktops>
192+
<number>1</number>
193+
<firstdesk>1</firstdesk>
194+
<popupTime>0</popupTime>
195+
</desktops>
196+
</openbox_config>
197+
EOF
198+
199+
cat <<EOF >/etc/neko/neko.yaml
200+
server:
201+
bind: "0.0.0.0:8080"
202+
static: "/var/www"
203+
member:
204+
provider: "multiuser"
205+
multiuser:
206+
admin_password: "admin"
207+
user_password: "neko"
208+
EOF
209+
msg_ok "Set up Runtime"
210+
211+
msg_info "Creating Service"
212+
cat <<EOF >/etc/systemd/system/neko.service
213+
[Unit]
214+
Description=Neko Virtual Browser
215+
After=network.target
216+
217+
[Service]
218+
Type=simple
219+
User=root
220+
Environment=USER=neko
221+
Environment=DISPLAY=:99.0
222+
Environment=PULSE_SERVER=unix:/tmp/pulseaudio.socket
223+
Environment=XDG_RUNTIME_DIR=/tmp/runtime-neko
224+
Environment=NEKO_PLUGINS_ENABLED=true
225+
Environment=NEKO_PLUGINS_DIR=/etc/neko/plugins/
226+
Environment=NEKO_CONFIG=/etc/neko/neko.yaml
227+
ExecStart=/usr/bin/supervisord -c /etc/neko/supervisord.conf -n
228+
Restart=on-failure
229+
RestartSec=5
230+
231+
[Install]
232+
WantedBy=multi-user.target
233+
EOF
234+
systemctl enable -q --now neko
235+
msg_ok "Created Service"
236+
237+
motd_ssh
238+
customize
239+
cleanup_lxc

json/neko.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "Neko",
3+
"slug": "neko",
4+
"categories": [
5+
13
6+
],
7+
"date_created": "2026-04-13",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8080,
12+
"documentation": "https://neko.m1k1o.net/docs/v3/configuration",
13+
"website": "https://neko.m1k1o.net/",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/neko.webp",
15+
"config_path": "/etc/neko/neko.yaml",
16+
"description": "A self-hosted virtual browser that uses WebRTC to stream a desktop environment to multiple users for watch parties, collaborative browsing, and interactive presentations.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/neko.sh",
21+
"resources": {
22+
"cpu": 4,
23+
"ram": 4096,
24+
"hdd": 12,
25+
"os": "Debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": "admin",
32+
"password": "admin"
33+
},
34+
"notes": [
35+
{
36+
"text": "Regular user password is 'neko'. Change both passwords in /etc/neko/neko.yaml after first login.",
37+
"type": "warning"
38+
},
39+
{
40+
"text": "Firefox ESR is installed as the default browser. The virtual display runs at 1280x720.",
41+
"type": "info"
42+
}
43+
]
44+
}

0 commit comments

Comments
 (0)