Repository navigation
Expand file tree
/
Copy pathlibrary.env.example
More file actions
166 lines (123 loc) · 8.15 KB
/
Copy pathlibrary.env.example
File metadata and controls
166 lines (123 loc) · 8.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# 📚 Biblioteca — configuration
#
# cp library.env.example library.env
#
# library.env is gitignored: it holds your passwords. Anything left blank
# falls back to the default shown here.
#
# ┌─ CHANGE THESE FIRST ──────────────────────────────────────────────────┐
# │ BOOKS_ENDPOINT, MANAGER_ENDPOINT and WALLPAPERS_ENDPOINT become the │
# │ URLs your server answers on. Biblioteca is open source, so the stock │
# │ layout is public knowledge — picking your own names means a scanner │
# │ that knows this project finds nothing at the obvious addresses. │
# │ It is obscurity on top of the passwords, never instead of them. │
# └───────────────────────────────────────────────────────────────────────┘
# ─── Library ─────────────────────────────────────────────────────────────
# Your library's name. Shown on the landing page, in the browser title, and
# top-left in the web UI. Yours to choose — the footer credits stay put.
#
# Quote it if it contains spaces or an apostrophe. This file is read as a
# shell script, so LIBRARY_TITLE=Your Name's Shelf is a syntax error and
# LIBRARY_TITLE=My Library silently becomes empty. The installer checks for
# both and tells you, but quoting simply always works:
# LIBRARY_TITLE="Your Name's Shelf"
LIBRARY_TITLE="Biblioteca"
# ─── Server ──────────────────────────────────────────────────────────────
# Published over mDNS on the LAN -> http://biblioteca.local
SERVER_HOSTNAME=biblioteca
# 80 keeps every URL free of a port number. Change only if something else
# already owns :80 — then every address below gains ":<port>".
SERVER_PORT=80
# Unprivileged unix account the server runs as.
SERVICE_USER=copyparty
# ─── Remote access: Tailscale (Funnel) ──────────────────────────────────
# Reach the library from outside at https://<pi>.<tailnet>.ts.net. TLS ends
# on the Pi; Tailscale relays only ciphertext. Interactive on first run
# (browser login). 0 = LAN only: nothing is installed, nothing is exposed,
# and an existing Tailscale setup is left alone rather than torn down.
TAILSCALE_ENABLED=1
# ─── Remote access: Cloudflare Tunnel ───────────────────────────────────
# A short name on your own domain instead of the long ts.net one. Requires
# the domain's DNS to be hosted at Cloudflare (the free plan is enough).
# The certificate is Cloudflare's wildcard, so this name never appears in
# Certificate Transparency logs — pick something non-obvious anyway.
# Trade-off, stated plainly: Cloudflare terminates TLS and sees your
# traffic in the clear, passwords included; Funnel does not. Either, both,
# or neither can be on.
#
# One manual step, once: Zero Trust -> Networks -> Tunnels -> Create a
# tunnel (Cloudflared) -> copy the token below -> Public Hostname: the name
# below -> Service: http://localhost:<SERVER_PORT>. Cloudflare creates the
# DNS record. Re-running the installer with the same token reattaches it.
CLOUDFLARE_ENABLED=0
# First-level only (x.example.com): the free wildcard cert covers no deeper.
PUBLIC_HOSTNAME=
# A bearer credential for the tunnel: whoever holds it receives your
# traffic. It stays in this gitignored file and in a 0600 file on the Pi.
CLOUDFLARE_TUNNEL_TOKEN=
# ─── Management door ─────────────────────────────────────────────────────
# Upload, rename, delete. Yours alone.
# https://<server>:<port>/manager/
# Wallpapers are managed one level in, at /manager/wallpapers/
MANAGER_ENDPOINT=manager
# The account that owns the library.
MANAGER_ACCOUNT=reader
# Leave blank and 30-copyparty.sh generates a strong one, prints it once,
# and writes it back into library.env.
MANAGER_PASSWORD=
# ─── Guests ──────────────────────────────────────────────────────────────
# An optional second account: read-only for friends. They get their own
# password, browse and download the whole library (no copies, no separate
# folder), and cannot upload, rename or delete anything. Blank = no guest.
GUEST_ACCOUNT=
# Blank + a GUEST_ACCOUNT set -> generated, printed once, saved back here.
GUEST_PASSWORD=
# copyparty's brute-force ban: 9 wrong passwords in an hour -> 24 h ban.
# 0 disables it, which helps while you are still typing the password into
# the reader by hand. Set back to 1 once everything works.
BAN_PW=1
# ─── Books ───────────────────────────────────────────────────────────────
# Reading and OPDS. Read-only for EVERYONE, you included — that is what
# makes your view identical to your guests'.
# https://<server>:<port>/books/ browser
# https://<server>:<port>/books/?opds the reader
# Changing this means re-entering the OPDS URL on the reader once.
BOOKS_ENDPOINT=books
# Where the files live on disk (not a URL — that is BOOKS_ENDPOINT above).
BOOKS_DIR=/srv/books
# Which formats appear in the catalogue. The reader itself opens only
# epub, xtc/xtch and txt; the rest download fine but are meant for reading
# on a phone or computer.
BOOKS_EXTS=epub,xtc,xtch,txt,pdf,md,cbz,cbr,azw3,mobi,fb2
# 1 = extract EPUB cover thumbnails. Needs one thumbnail backend — pillow
# or ffmpeg both work, and 10-system.sh installs python3-pil, the smaller
# of the two. Each cover is decoded once and cached, not per request.
ENABLE_COVERS=0
# ─── Wallpapers ──────────────────────────────────────────────────────────
# CrossPoint sleep-screen images, kept out of the book catalogue entirely.
# Add this as a SECOND OPDS server on the reader:
# https://<server>:<port>/wallpapers/ browser
# https://<server>:<port>/wallpapers/?opds the reader
# The installer creates the folder; you do not need to.
WALLPAPERS_ENABLED=1
WALLPAPERS_ENDPOINT=wallpapers
WALLPAPERS_DIR=/srv/wallpapers
# What the device can actually open as a sleep screen. BMP wants exact
# dimensions — 480x800 on the X4, 528x792 on the X3. PXC is CrossPoint's
# native format and about a tenth the size, which matters over Funnel.
# PNG is deliberately absent: the reader cannot open a standalone PNG, so
# listing one would only produce an entry that fails when tapped. PNGs you
# drop in WALLPAPERS_DIR are still visible and downloadable from a browser.
WALLPAPERS_EXTS=bmp,pxc
# ─── Landing page ────────────────────────────────────────────────────────
# The public page at https://<server>:<port>/ — no login, nothing listed.
# Customise config/landing/index.html.template, not the copy on the Pi:
# the installer re-renders it on every run.
LANDING_DIR=/srv/landing
# ─── System ──────────────────────────────────────────────────────────────
# 1 = install zram swap. Recommended on a 512 MB board.
ENABLE_ZRAM=1
# ─── Deploying from your computer ────────────────────────────────────────
# Used only by deploy.sh: where to rsync and ssh.
# Before the .local name exists, use the Pi's current hostname or IP.
PI_SSH=pi@raspberrypi.local