This document provides detailed instructions for installing dir2opds on various platforms.
Download binaries for Linux, macOS, Windows, and other platforms from the Releases page.
docker pull ghcr.io/dubyte/dir2opds:v1.11.0docker run \
-d \
-m 256MB \
--restart always \
-p 8080:8080 \
-v ./books:/books \
--name dir2opds \
ghcr.io/dubyte/dir2opds:v1.11.0Use a specific release tag instead of v1.11.0 if needed. Thanks to rockavoldy for the run example.
Pre-built image:
podman pull ghcr.io/dubyte/dir2opds:v1.11.0Build from source:
podman build -t localhost/dir2opds .Run (OPDS on port 8080):
podman run \
-d \
-m 256MB \
--restart always \
-p 8080:8080 \
-v ./books:/books \
--name dir2opds \
ghcr.io/dubyte/dir2opds:v1.11.0Rootless (e.g. non-root user, SELinux): use a bind mount with the Z option and keep the user namespace:
mkdir -p /data/Books
podman run \
-d \
-m 256MB \
--restart always \
--userns=keep-id \
-p 8080:8080 \
-v /data/Books:/books:Z \
--name dir2opds \
ghcr.io/dubyte/dir2opds:v1.11.0Add -debug for request logging, e.g. ... ghcr.io/dubyte/dir2opds:v1.11.0 /dir2opds -debug.
cd && mkdir dir2opds && cd dir2opds
# Replace v1.11.0 and the asset name with the release that matches your system
wget https://github.com/dubyte/dir2opds/releases/download/v1.11.0/dir2opds_1.11.0_linux_armv7.tar.gz
tar xvf dir2opds_1.11.0_linux_armv7.tar.gz
sudo nano /etc/systemd/system/dir2opds.service
# Paste the unit below, then set the full path of your books folder in -dir
sudo systemctl enable --now dir2opds.service/etc/systemd/system/dir2opds.service:
[Unit]
Description=dir2opds
Documentation=https://github.com/dubyte/dir2opds
After=network-online.target
[Service]
User=pi
Restart=on-failure
ExecStart=/home/pi/dir2opds/dir2opds -dir <FULL_PATH_TO_BOOKS> -port 8080
[Install]
WantedBy=multi-user.targetInstallation scripts and configs for FreeBSD, Illumos, and Linux are in the files/ directory.
Requires Go 1.25.3+. Build for multiple platforms:
make build-allBinaries are written to bin/.