User Configuration

Users can be configured through the GUI interface with the following options:

Basic Settings

  • Username: Unique identifier for the user
  • Password: Optional password for authentication
  • Public Key: Optional SSH public key for SFTP authentication

Access Control

  • Subscribed Listeners: Choose which FTP/SFTP listeners the user can access
  • GUI Access: Grant or deny access to the management GUI

Virtual Path Mappings

  • Virtual Path: The path as seen by the user (e.g., /uploads)
  • Real Path: The actual filesystem path (e.g., /home/user/uploads)
  • Permissions: Read, Write, Append, Delete, List, Create folders and Rename, per path (see below)
  • Also apply to subfolders: on by default; switch it off to limit the user to the files directly in the mapped folder

Groups

Give many users the same access once: Users → Groups → Add Group. A group has members, listeners (with listener permissions) and folders (virtual paths with the same permissions as a user's).

  • A member can sign in to their own listeners and their groups' listeners.
  • Listener permissions add up: a right granted by the user's own settings or by any of their groups counts.
  • Members see their own folders plus their groups' folders. When two use the same virtual path, the user's own folder wins, then the group whose name sorts first.
  • Changes apply at the next sign-in. Deleting a group never deletes users or files.
  • Group folders do not count towards a member's storage quota.

Server Configuration

Configure FTP/SFTP listeners through the GUI:

Listener Settings

  • Protocol: Choose between FTP or SFTP
  • Binding IP: IP address to bind to (0.0.0.0 for all interfaces)
  • Port: Port number for the listener. The default listeners use non-privileged ports (SFTP 2222, FTP 2121) so the server runs without root; the standard ports 22/21 can be used when running with administrator/root rights.
  • Enable/Disable: Toggle listener on/off

Security Settings

  • FTPS: per FTP listener choose None, FTPS optional (clients may use AUTH TLS) or FTPS required (unencrypted logins are refused)
  • HTTPS: enable Use HTTPS for the web GUI in Listeners → Web GUI Server → Edit. A self-signed certificate is created automatically; set the tlsCertPath and tlsKeyPath settings to use your own
  • SFTP host key: generated once and kept in the config directory (ssh_host_rsa_key); its SHA256 fingerprint is shown on each SFTP listener so users can verify the server
  • Passwords: stored as salted scrypt hashes; users authenticate with a password and/or an SSH public key

Protocol security

  • SSH / SFTP algorithms (Security → Protocol Security, setting sshAlgorithms): modern (default) offers no SHA-1 — key exchange curve25519 / DH group 16, 18 / group exchange with SHA-256, ciphers ChaCha20-Poly1305, AES-GCM, AES-CTR, MACs HMAC-SHA2 (encrypt-then-MAC first), host key signatures Ed25519 / rsa-sha2-512 / rsa-sha2-256. Clients that can only use ssh-rsa (SHA-1) signatures are disconnected. compatible adds SHA-1 and NIST curves for old clients
  • Minimum TLS version for HTTPS and FTPS (tlsMinVersion): TLS 1.2 (default) or 1.3
  • Both apply when a listener or the web GUI (re)starts

Single Sign-On (OpenID Connect)

Security → Single Sign-On adds a "Sign in with…" button to the web GUI's and the file portal's sign-in pages. It works with any OpenID Connect provider: Microsoft Entra ID, Google Workspace, Okta, Keycloak, Authentik.

  1. Register an application with your provider. Use the Redirect URI shown on the card (a web platform redirect). Behind a reverse proxy, first enter the public address so that the URI is right.
  2. Enter the issuer URL, the client (application) ID and, if your provider issued one, the client secret. Examples:
    • Entra ID: https://login.microsoftonline.com/<tenant id>/v2.0, username claim preferred_username
    • Google: https://accounts.google.com, username claim email
    • Keycloak: https://keycloak.example.com/realms/<realm>
  3. Tick Ignore the domain if [email protected] should sign in as the SLightSFTP user alice.
  • Sign-in never creates an account. The person needs an existing SLightSFTP user with that name and GUI access (web GUI) or web file access (portal). The user's IP allow-list and the sign-in ban still apply.
  • The provider handles multi-factor authentication, so SLightSFTP's own two-factor code is not asked for after a single sign-on.
  • The flow is the authorization code flow with PKCE. The ID token's signature, issuer, audience, expiry and nonce are all checked. The client secret is stored encrypted.
  • The desktop app's own sign-in window, SFTP/FTP and WebDAV keep using passwords or keys.

Email Notifications

Webhooks → Email notifications sends email through your SMTP server (Microsoft 365, Gmail, your provider, or a local relay).

  • Alerts (on by default): a listener that cannot start, a failed scheduled backup or certificate renewal, an address banned after failed sign-ins. Alerts go out within 10 seconds and ignore the user and path filters.
  • File events, as for webhooks: uploads, downloads, deletes, sign-ins, failed sign-ins, share links; optionally only for one user or below one folder.
  • Events are collected for Collect for seconds (60 by default) and sent as one email.
  • Encryption: STARTTLS (port 587) or TLS (port 465); the server's certificate is verified unless you untick it. Microsoft 365 and Gmail need an app password or an SMTP-enabled account.
  • The SMTP password is stored encrypted with the other secrets and never shown again. Send test email uses the form as it is, before saving.
  • The result of the last email is shown on the card; failures are also in the activity log (EMAIL_FAILED).

Certificates (Let's Encrypt)

Security → Certificate (Let's Encrypt) gets a free, trusted certificate for the web GUI, the file portal, WebDAV (when HTTPS is on) and FTPS listeners, and renews it 30 days before it expires, without a restart.

  • The domain names must resolve to this server, and Let's Encrypt must reach it on port 80 (HTTP-01 validation). Either leave Challenge port at 80, so SLightSFTP answers there while it gets a certificate, or forward port 80 to the web server (a reverse proxy that passes /.well-known/acme-challenge/ through works too) and set the port to 0.
  • Binding port 80 needs administrator rights on Windows (the Windows service has them) and CAP_NET_BIND_SERVICE on Linux.
  • Wildcard certificates and IP addresses need DNS validation, which is not supported.
  • Try with Let's Encrypt staging first: its certificates are not trusted, but its rate limits are generous.
  • The account key and the certificate are stored next to config.db (acme-account.key, acme.crt, acme.key); the tlsCertPath / tlsKeyPath settings point at them. Turning it off keeps the last certificate in use until you change those settings.
  • Another ACME CA: set its directory URL through the API (PUT /api/acme).

WebDAV

Tick Listeners → WebDAV to serve users' files at https://<server>:<web port>/webdav/. Users need web file access (Edit user); they sign in with their username and password and see the same folders, with the same permissions, as over SFTP.

  • Windows: File Explorer → This PC → Map network drive → https://server:3000/webdav/. Windows only sends passwords over HTTPS, and only to a certificate it trusts (install a real certificate, or trust the self-signed one); files over 50 MB need the FileSizeLimitInBytes registry value of the WebClient service raised.
  • macOS: Finder → Go → Connect to Server → https://server:3000/webdav/.
  • Linux / scripts: GNOME Files (davs://server:3000/webdav/), davfs2, or rclone with a webdav remote (vendor "other").
  • Use HTTPS: WebDAV sends the password with every request. Accounts with two-factor sign-in cannot use WebDAV.
  • Locks are acknowledged (Office and Finder need them) but not enforced; file properties other than size and dates are not stored.
  • Deleted files go to the recycle bin; failed sign-ins count towards brute-force protection.

Cloud Storage (S3 & Azure Blob)

A virtual path can live in a cloud bucket instead of a folder on this computer.

Connect a bucket

  • Open Cloud Storage → Add Connection
  • Amazon S3: bucket, region, access key ID and secret access key
  • S3-compatible services (MinIO, Wasabi, Cloudflare R2, Backblaze B2, DigitalOcean Spaces, ...): also set the service's endpoint; tick Path-style URLs for MinIO
  • Azure Blob Storage: the container and a connection string (or the storage account name and key)
  • Click Test connection: it lists the bucket, uploads, reads back and deletes a small probe file

Give a user a folder in it

  • In Edit User → Add Virtual Path, set Storage to the bucket
  • Folder in the bucket is optional: users/alice keeps each user in their own folder; leave it empty to share the whole bucket
  • Permissions, quotas, speed limits, checksums and webhooks work as for local folders
  • Files cannot be moved between a bucket and a local folder in one rename; copy them instead
  • Deleting in a bucket is permanent; the recycle bin covers local folders
  • The access keys are stored in the configuration database (and in configuration backups); give SLightSFTP a key that can only reach this bucket

Permission System

Granular permissions can be set per user and per virtual path:

Permission Types

  • Read: download files
  • Write: upload new files and overwrite or edit existing ones
  • Append: only add to the end of an existing file (FTP APPE, resuming an upload at its current end); Append alone never creates a file and never changes bytes already there
  • Delete: delete files and folders (deleted files go to the recycle bin when it is on)
  • List: list folder contents
  • Create folders: make new folders
  • Rename: rename and move. Renaming onto an existing file replaces it only when the user also has Delete there; the replaced file goes to the recycle bin. A folder is never replaced.

Permission Inheritance

  • Permissions are set per virtual path mapping and per listener; an operation is allowed only when both allow it
  • Group members get the group's listeners, listener permissions and folders on top of their own (see Groups)
  • Users are confined to their virtual paths — .. can never reach files outside them
  • Different paths can have different permissions for the same user; the most specific mapping wins (/docs/private over /docs)
  • With Also apply to subfolders off, List covers the mapped folder itself and every other permission covers only the entries directly in it; subfolders are listed but cannot be opened
  • A path outside every mapping does not exist for the user: nothing falls back to the first mapping
  • A user without a / mapping sees the folders leading to their mappings (for /photos/2024: / shows photos, which shows 2024); those folders are read-only
  • FTP SITE CHMOD is accepted but never changes file modes (it needs the listener's Edit permission)
  • The file portal and share links follow the same rules; a share link stops working as soon as its owner loses access to the shared file or folder

Database Configuration

All configuration is stored in SQLite database (config.db):

Database Location

  • Default location: Application directory/config.db
  • A standard SQLite database in WAL mode: every change is written to disk as it is made (config.db-wal and config.db-shm sit next to it while the server runs)
  • Supports standard SQLite tools for management
  • Upgrades: before a new version changes the database, it saves a copy as config.db.v<old schema>-<time>.bak (the newest three are kept). To go back, reinstall the old version and rename the copy to config.db. A newer database is never opened by an older version

Encrypted secrets and the master key

  • Cloud storage credentials, the LDAP bind password, webhook signing secrets and two-factor secrets are encrypted (AES-256-GCM) inside config.db
  • The master key is secret.key, created next to config.db on first start (readable by its owner only). Keep it with config.db: without it the stored secrets cannot be read and must be entered again
  • Or set SLIGHTSFTP_MASTER_KEY (64 hex characters, base64 of 32 bytes, or a passphrase) to keep the key outside the data folder, e.g. in a secrets manager

Backup and Migration

  • Use Settings → Backup: the bundle holds config.db, the SFTP host key, the TLS certificate and the master key, so it restores on a new machine
  • Scheduled backups: every N hours (default 24) a bundle is written to a folder (default: backups next to config.db) and the newest N (default 7) are kept; set a passphrase to encrypt them. Point the folder at another disk or a synced location
  • Enter a backup passphrase to encrypt the bundle (AES-256-GCM, scrypt); the same passphrase is needed to restore it. Unencrypted backups contain password hashes and keys
  • Copying files by hand: stop the server, then copy config.db and secret.key together (while it runs, recent changes may still be in config.db-wal)
  • With SLIGHTSFTP_MASTER_KEY, the key is not in the backup; restore with the same key

Default Configuration

Default Credentials

Username: admin

Password: admin123

⚠️ You must choose a new password the first time you sign in with the default one.