Running without Docker
Running the server directly on Windows, Linux, or macOS.
This is the recommended way to run Local Drive. One process, a few megabytes of memory, and a start measured in milliseconds. On modest hardware it is clearly the better choice, and the Docker daemon on its own costs more than this server does.
What you give up is listed below, and it is short. Reach for Docker when you want one of those things, not by default.
Setting up
Run localdrive and take the default when it asks how to run. Setup then:
- Writes an
.envwith local filesystem paths rather than container paths. - Sets
LISTEN_ADDRto the real port, since there is no proxy in front. - Leaves
MOUNT_HELPER_SOCKETandLAN_DISCOVERY_SOCKETempty.
What you get
Everything the API does: files, folders, versions, sharing, permissions, uploads, downloads, thumbnails, search, trash, activity, and the WebSocket.
What you do not get
| Missing | Why | What to do instead |
|---|---|---|
| The browser client | Caddy is what serves the web bundle; the binary answers the API only | Use the Android, Windows, Linux or macOS app, or run Docker |
| Drive management from the app | mount and mergerfs are Linux tools run by a privileged helper |
Mount the drive with the operating system and point LIBRARY_PATH at it |
| Network discovery | The announcer needs host networking | Type the address in the app once; it is remembered |
Drive management and discovery degrade cleanly: nothing errors, the features
simply do not appear. The browser client is different, and worth knowing before
you deploy: opening the server's address in a browser returns
404 no such endpoint, because the API is all that is listening. That is not a
broken install.
HTTPS is not on that list any more. Set LD_DOMAIN and the bare binary
requests and renews its own certificate, with no proxy involved. It needs ports
80 and 443 reachable, since those are the only two Let's Encrypt will connect
back on. See HTTP and HTTPS.
Running it
localdrive startA native install runs in the foreground, on purpose. Installing a background service correctly on Windows and Linux are two very different jobs, and this tool does not pretend otherwise. Use the operating system's own mechanism:
- Linux: a systemd unit calling
localdrive serve. - Windows: Task Scheduler with "run whether user is logged on or not", or a service wrapper.
Set LOCALDRIVE_HOME in the unit or task so it finds its install.