Self-host Audiobookshelf
Self-hosted media server for audiobooks and podcasts, with a web client, mobile apps and per-user progress sync. Run your own Audiobookshelf on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.
Updated November 23, 2026
Running your own Audiobookshelf usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Audiobookshelf behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.
Just ask your agent
Open a Plus workspace (Audiobookshelf runs in Docker, which Plus and Pro include), tap Launch to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:
Set up Audiobookshelf on this workspace and give me the link. Follow https://envhaven.com/self-host/audiobookshelf.md
Then open the link it sends and create your Audiobookshelf account straight away, before anyone else finds the address. That is the whole request: the address in it is this page’s Markdown copy, and the agent follows the instructions for it further down, with every setting Audiobookshelf’s docs require.
Or keep it private with Tailscale
The preview URL puts Audiobookshelf on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Audiobookshelf an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace’s Vars pane as TS_AUTHKEY, and ask the agent:
Set up Audiobookshelf on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/audiobookshelf.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
- A Tailscale container runs beside Audiobookshelf, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
- Anything other services have to reach, such as a webhook, still needs a public address. Keep self-hosted apps private with Tailscale covers both, and what Tailscale’s free plan includes.
| At a glance | |
|---|---|
| What it is | Music, video and books |
| License | GPL-3.0 |
| Runs as | Docker (ghcr.io/advplyr/audiobookshelf) |
| Memory | Not documented |
| Plan that fits | Plus or larger |
| Web port | 13378 |
| Documentation | audiobookshelf.org/docs/documentation/install/docker |
What your agent takes care of
- Installing it. Audiobookshelf runs from the official image,
ghcr.io/advplyr/audiobookshelf, with its data in folders under~/apps/audiobookshelf. - Putting it on an HTTPS address. The workspace’s preview URL serves it, and your own domain can too.
- Locking it down first. What Audiobookshelf’s docs say to set before it faces the internet, below.
- Telling you what to back up: /config (SQLite database; local disk only), /metadata (metadata, covers, logs, backups, cache) and /audiobooks and /podcasts (media mounts, names are your choice) (docs).
The settings it needs behind a proxy
- WebSocket pass-through (proxy side): The proxy must forward the WebSocket upgrade; the web client does not work without it. (docs)
- X-Forwarded-For and X-Forwarded-Proto (proxy side): The documented nginx block passes the client address and scheme through. (docs)
HOST: Bind address; use 127.0.0.1 when only a local proxy or tunnel connects. (docs)PORT: TCP listening port; the packages set 13378. (docs)ALLOW_CORS(default 0): Allows cross-origin requests when set to 1. (docs)ALLOW_IFRAME(default 0): Allows embedding in iframes; can also be handled at the proxy. (docs)- client_max_body_size (nginx example): Upload size allowed through the documented proxy block. (docs)
Before it faces the internet
- The first account is the root admin; there is no documented default password, so create it before sharing the address. (docs)
- New user accounts see all libraries by default. (docs)
- Login attempts are rate limited by default. (docs)
- Leave JWT_SECRET_KEY unset or keep it fixed after deployment. (docs)
Things to ask next
Everything after the install is one more sentence to the agent. Some that come up:
- “Organize the files in ~/apps/media into folders the server can scan.”
- “Make a library for each kind of media.”
- “Move Audiobookshelf to app.example.com.” Add the domain on the dashboard’s Domains page with a CNAME to
domains.envhaven.app, and the agent changes Audiobookshelf’s address settings to match. - “Update Audiobookshelf to the latest release.” It pulls the new image and recreates the container, data kept.
Instructions for the agent
The agent reads these from the page’s Markdown copy. They also work pasted on their own, if you would rather give them in your own words.
Set up Audiobookshelf on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, ghcr.io/advplyr/audiobookshelf, starting from the docs' compose file: https://audiobookshelf.org/docs/documentation/install/docker. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- Keep the compose file in ~/apps/audiobookshelf and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Audiobookshelf's port 13378.
- The preview URL terminates HTTPS in front of Audiobookshelf: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/audiobookshelf.md for the preview URL, as Audiobookshelf's docs describe for running behind a proxy; skip any that apply only when Audiobookshelf serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/audiobookshelf.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Audiobookshelf up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.
What to know
- In Docker, Audiobookshelf’s containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
- The web client needs a WebSocket connection, so the tunnel or proxy must allow it. (docs)
- The documented nginx block allows uploads up to 10240M for the built-in upload feature; an HTTP tunnel with a lower body cap blocks large uploads, so big files are better copied to the server. (docs)
- Uploading through the web UI is a built-in feature. (docs)
- The config folder holds the SQLite database and must be on local disk, not a network mount. (docs)
- The Debian and RPM packages exist for amd64 only. (docs)
- The SSRF filter blocks requests to private addresses by default, which matters for podcasts hosted on a LAN. (docs)
- A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.
Without a workspace
The manual route, on a server you run:
- Rent a Linux VPS, secure SSH, and create a user for the app.
- Install Docker and write a compose file from the official image.
- Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
- Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
- Keep the firewall closed except for the proxy, and schedule backups and updates.
Audiobookshelf’s own documentation covers each step for its install methods.
Sources
Facts about Audiobookshelf come from its own documentation, checked on 2026-11-23:
- audiobookshelf.org/docs/documentation/install/docker
- github.com/advplyr/audiobookshelf/blob/master/readme.md
- audiobookshelf.org/docs/documentation/install/reverse-proxy/nginx
- audiobookshelf.org/docs/documentation/install/configuration
- audiobookshelf.org/docs/documentation/server-management/uploading
- audiobookshelf.org/docs/documentation/install/linux/linux-install-deb
- audiobookshelf.org/docs/documentation/server-management/user-management