Configuration

Upgopher is configured entirely with command-line flags. No configuration file is required.

Files and port

upgopher -dir ./shared -port 8080

-dir selects the shared directory and defaults to ./uploads. The directory is created when it does not exist. -port defaults to 9090, or 443 when -ssl is explicitly enabled without a custom port.

Access controls

Basic Auth

upgopher -user admin -pass 'choose-a-strong-password'

Both flags are required together. Authentication covers the registered application routes globally; Upgopher does not provide multiple accounts or per-folder roles.

Read-only mode

upgopher -dir ./public -readonly

Disables uploads, file and directory deletion, and directory creation through the application while retaining browsing and downloads.

Hidden files

upgopher -disable-hidden-files

Removes the UI control for showing hidden files and keeps them out of listings.

HTTPS

Self-signed certificate

upgopher -ssl

A new in-memory self-signed certificate is generated at startup. Browsers will warn because it is not signed by a trusted certificate authority.

Custom certificate

upgopher -ssl -cert /path/to/cert.pem -key /path/to/key.pem

Provide both certificate and private key. For public deployments, a reverse proxy that manages trusted certificates is usually easier to operate.

Limits and timeouts

upgopher \
  -max-upload-size 1 \
  -max-tabs 5 \
  -read-header-timeout 10s \
  -read-timeout 30m \
  -write-timeout 30m

Upload size is expressed in GiB; zero means unlimited. Read and write timeout values use Go duration syntax such as 30s, 5m, or 1h. Zero disables the respective overall timeout.

Flag reference

FlagDefaultPurpose
-dir./uploadsDirectory to share.
-port9090TCP port; defaults to 443 when only -ssl changes it.
-useremptyBasic Auth username; requires -pass.
-passemptyBasic Auth password; requires -user.
-sslfalseEnable HTTPS.
-certemptyPEM certificate path for HTTPS.
-keyemptyPEM private key path for HTTPS.
-readonlyfalseDisable application upload, create, and delete operations.
-disable-hidden-filesfalseKeep hidden files out of the UI.
-max-upload-size0Maximum upload size in GiB; zero is unlimited.
-max-tabs10Maximum shared clipboard tabs.
-read-header-timeout10sMaximum time to read request headers.
-read-timeout0Maximum time to read a complete request; zero is unlimited.
-write-timeout0Maximum response write duration; zero is unlimited.
-qfalseQuiet mode.

The executable remains the source of truth. Run upgopher -h to inspect the flags in your installed version.