Skip to content

Commit 5ff9994

Browse files
committed
fixes kyoo
1 parent b833b46 commit 5ff9994

3 files changed

Lines changed: 31 additions & 7 deletions

File tree

‎ct/kyoo.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ description
8686
msg_ok "Completed Successfully!\n"
8787
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
8888
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
89-
echo -e "${GATEWAY}${BGN}http://${IP}:8901${CL}"
89+
echo -e "${GATEWAY}${BGN}https://${IP}${CL}"

‎install/kyoo-install.sh‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ intel | amd) KYOO_HWACCEL="vaapi" ;;
7272
*) KYOO_HWACCEL="disabled" ;;
7373
esac
7474
cat <<EOF >/opt/kyoo_data/.env
75-
PUBLIC_URL=http://${LOCAL_IP}:8901
76-
JWT_ISSUER=http://${LOCAL_IP}:8901
75+
PUBLIC_URL=https://${LOCAL_IP}
76+
JWT_ISSUER=https://${LOCAL_IP}
7777
EXTRA_OIDC_REDIRECT_URLS=kyoo
7878
7979
PGHOST=127.0.0.1
@@ -115,7 +115,9 @@ chmod 600 /opt/kyoo_data/.env /opt/kyoo_data/keibi.pem
115115
msg_ok "Configured Kyoo"
116116

117117
msg_info "Configuring Nginx"
118+
create_self_signed_cert "kyoo"
118119
# Upstream's Traefik routes; auth_request replaces its forwardAuth that swaps tokens/API keys for a JWT.
120+
# HTTPS so browsers honour COOP/COEP (SharedArrayBuffer for subtitles); 127.0.0.1:8901 is plain HTTP for the scanner.
119121
cat <<'EOF' >/etc/nginx/sites-available/kyoo
120122
map $http_upgrade $kyoo_connection_upgrade {
121123
default upgrade;
@@ -133,11 +135,21 @@ map $http_x_forwarded_host $kyoo_forwarded_host {
133135
}
134136
135137
server {
136-
listen 8901;
138+
listen 80 default_server;
139+
server_name _;
140+
return 301 https://$host$request_uri;
141+
}
142+
143+
server {
144+
listen 443 ssl default_server;
145+
listen 127.0.0.1:8901;
137146
server_name _;
138147
charset utf-8;
139148
client_max_body_size 0;
140149
150+
ssl_certificate /etc/ssl/kyoo/kyoo.crt;
151+
ssl_certificate_key /etc/ssl/kyoo/kyoo.key;
152+
141153
root /opt/kyoo/front/dist;
142154
index index.html;
143155

‎json/kyoo.json‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"amd64",
1313
"arm64"
1414
],
15-
"interface_port": 8901,
15+
"interface_port": 443,
1616
"documentation": "https://github.com/zoriya/Kyoo/blob/master/INSTALLING.md",
1717
"website": "https://kyoo.zoriya.dev/",
1818
"repository": "https://github.com/zoriya/Kyoo",
@@ -38,9 +38,21 @@
3838
},
3939
"notes": [
4040
{
41-
"text": "There is no default account. The first account registered at http://<IP>:8901 becomes the administrator, so create it right after the install. Later sign-ups have to be verified by the administrator before they can play anything.",
41+
"text": "Kyoo is served over HTTPS with a self-signed certificate (http:// redirects to it): open https://<IP> and accept the certificate warning. HTTPS is needed because the player's subtitle renderer uses SharedArrayBuffer, which browsers only allow on a secure page.",
42+
"type": "info"
43+
},
44+
{
45+
"text": "There is no default account. The first account registered at https://<IP> becomes the administrator, so create it right after the install. Later sign-ups have to be verified by the administrator before they can play anything.",
4246
"type": "warning"
4347
},
48+
{
49+
"text": "Until the first video has been scanned and matched, the home page shows only \"Resource not found.\". That, and a 403 on /auth/users/me in the browser console when the settings page is opened while logged out, is how upstream Kyoo behaves with an empty library and guest access.",
50+
"type": "info"
51+
},
52+
{
53+
"text": "A login that answers \"Field validation for 'Login' failed on the 'required' tag\" reached Kyoo with empty fields, which happens when the browser autofills the form without the page noticing. Type or edit the username and password, then log in again.",
54+
"type": "info"
55+
},
4456
{
4557
"text": "Visitors who are not logged in can browse the library but not play it (GUEST_CLAIMS in /opt/kyoo_data/.env). Set GUEST_CLAIMS= to require a login for everything, then run systemctl restart kyoo-auth.",
4658
"type": "info"
@@ -50,7 +62,7 @@
5062
"type": "info"
5163
},
5264
{
53-
"text": "PUBLIC_URL and JWT_ISSUER in /opt/kyoo_data/.env must stay identical. Change both when Kyoo is reached under another address (needed for OIDC logins), then run systemctl restart kyoo-auth kyoo-api kyoo-scanner.",
65+
"text": "PUBLIC_URL and JWT_ISSUER in /opt/kyoo_data/.env (https://<IP>) must stay identical. Change both when Kyoo is reached under another address, e.g. a domain behind a reverse proxy (needed for OIDC logins), then run systemctl restart kyoo-auth kyoo-api kyoo-scanner.",
5466
"type": "info"
5567
},
5668
{

0 commit comments

Comments
 (0)