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
| Flag | Default | Purpose |
|---|---|---|
-dir | ./uploads | Directory to share. |
-port | 9090 | TCP port; defaults to 443 when only -ssl changes it. |
-user | empty | Basic Auth username; requires -pass. |
-pass | empty | Basic Auth password; requires -user. |
-ssl | false | Enable HTTPS. |
-cert | empty | PEM certificate path for HTTPS. |
-key | empty | PEM private key path for HTTPS. |
-readonly | false | Disable application upload, create, and delete operations. |
-disable-hidden-files | false | Keep hidden files out of the UI. |
-max-upload-size | 0 | Maximum upload size in GiB; zero is unlimited. |
-max-tabs | 10 | Maximum shared clipboard tabs. |
-read-header-timeout | 10s | Maximum time to read request headers. |
-read-timeout | 0 | Maximum time to read a complete request; zero is unlimited. |
-write-timeout | 0 | Maximum response write duration; zero is unlimited. |
-q | false | Quiet mode. |
The executable remains the source of truth. Run upgopher -h to inspect the flags in your installed version.