Production¶
Build with make build (or see Installation), then run:
ROOT_PATH=/path/to/files CONFIG_FILE=./config.yaml ./app/filetree
Then open http://localhost:8080.
Deployment¶
Option A: Binary¶
Embedded UI (recommended for a single file to deploy): from a source tree, run make build. Deploy only app/filetree (plus your config). The UI is in the binary via go:embed and -tags embed; Make copies Vite output from app/web/dist into app/uiembed/dist before compiling.
UI on disk: use make build-app and make build-frontend (no -tags embed), or plain go build after npm run build, and ensure app/web/dist exists when you run from the repo root; from the app/ directory, ./web/dist / ./uiembed/dist can be used instead.
Then:
- Set
ROOT_PATHto the directory where files should be stored - Set
CONFIG_FILEto your config file (e.g../config.yaml) - Use a reverse proxy (nginx, Caddy) for the production URL if needed
- Set
JWT_SECRETandoauth_redirect_urlfor production (e.g.https://your-domain.com/api/auth/google/callback)
Option B: Docker¶
- Build the image:
docker build -f Containerfile -t filetree . - Run with a volume for files:
docker run -d -p 8080:8080 -v /path/to/files:/data filetree - Mount your config file and set
CONFIG_FILEif needed - Use a reverse proxy in front for HTTPS and custom domains
Serving the UI¶
- Embedded build (
-tags embed, withapp/uiembed/distpopulated at compile time): the server serves the UI from the binary; no separate static directory at runtime. - Disk layout: if there is no usable embedded bundle (e.g. plain
go buildwithout-tags embed, or an empty embed), the server looks for./app/web/dist,./app/uiembed/dist,./web/dist, or./uiembed/dist(relative to the working directory) and serves those files.
No separate web server is required for the UI. For HTTPS and custom domains, put a reverse proxy in front.