The example listens on 127.0.0.1:4445 and serves directories under smb-example in the system temp directory.
Share
Access
public
anonymous read-write
media
anonymous read-only
home
alice read-write, bob read-only
Variable
Effect
SMB_LISTEN
Listen address
SMB_ROOT
Root directory for the shares
SMB_PASSWORD
Password for alice and bob. If unset, a password is generated and logged at startup
SMB_DISCOVERY=1
Announce the server on the network. Requires --features discovery and a non-loopback address
SMB_STREAMS=0
Disable named streams
SMB_COPY=0
Disable server-side copy
SMB_S3_BUCKET
Serve this S3 bucket as the only share (s3). Requires --features s3. See backends
SMB_ENCRYPTION_KEY
64-hex-digit encryption key. Adds an encrypted vault share, or encrypts s3 when SMB_S3_BUCKET is also set. Requires --features encryption. See encrypted storage
SMB_DISCOVERY=1 SMB_LISTEN='[::]:4445' cargo run -p minimal-smb-example --features discovery