Skip to main content

Server Configuration

All Sync-in server configuration options are defined in the environment.yaml file.

This file allows you to customize how your Sync-in instance behaves: networking, authentication, database, caching, email, and more.

🧱 Sections​

πŸ–₯️ server​

  • host: IP address the server will listen on (default: 0.0.0.0)
  • port: Port used for the web interface (default: 3000)
  • workers: Number of worker processes.
    • Use auto to utilize all CPU cores.
    • Regardless of the value, at least 2 workers are always started β€” 1 is reserved for scheduled tasks.
  • trustProxy: Enables proxy support (true, false, or IP range)
  • restartOnFailure: Automatically restart workers if they crash (true or false)

πŸ“‹ logger​

  • level: Logging level (trace, debug, info, warn, error, fatal)
  • stdout: Outputs logs to the console (true) or writes them to a file (false)

🐬 mysql​

  • url: MySQL connection URL (e.g., mysql://user:password@localhost:3306/database)
  • logQueries: Enables logging of SQL queries to the database (true or false)

⚑ cache​

  • adapter: Cache system (mysql by default, or redis)
  • ttl: Default time-to-live for cached entries (in seconds)
  • redis: Redis connection URL (used when adapter: redis)

πŸ”„ websocket​

  • adapter: WebSocket adapter (cluster or redis)
    • cluster: uses Node.js workers for inter-process communication (default)
    • redis: enables communication between distributed instances; recommended for multi-server setups
  • corsOrigin: Allowed origin(s) for WebSocket connections (e.g., "*")
  • redis: Redis connection URL (used when adapter: redis)

πŸ“§ mail​

  • host: SMTP server host
  • port: SMTP server port (e.g., 587)
  • sender: Sender email address (e.g., Sync-in<notification@sync-in.com>)
  • auth:
    • user: SMTP username
    • pass: SMTP password
  • secure: Use SSL connection (true or false)
  • logger: Enable SMTP logging (true or false)
  • debug: Enable debug mode (true or false)

πŸ” auth​

  • method: Authentication method (mysql or ldap)
  • sameSite: SameSite cookie policy (lax, strict)
  • token:
    • access:
      • name: Access token cookie name
      • secret: JWT secret for access tokens
      • expiration: Access token lifespan (e.g., 30m)
      • cookieMaxAge: Cookie lifetime
    • refresh:
      • name: Refresh token cookie name
      • secret: JWT secret for refresh tokens
      • expiration: Refresh token lifespan (e.g., 4h)
      • cookieMaxAge: Cookie lifetime
  • ldap (if method: ldap):
    • servers: List of LDAP server URLs
    • baseDN: Base distinguished name (e.g., ou=people,dc=example,dc=com)
    • filter: LDAP filter (optional)
    • loginAttribute: Login attribute (uid or mail)

🧩 applications​

πŸ“ files​

  • dataPath: Path to store user data
  • maxUploadSize: Maximum allowed file upload size (default: 5 GB)
  • πŸ“ onlyoffice:
    • enabled: Enable OnlyOffice integration (true or false)
    • externalServer: OnlyOffice server URL (e.g., https://onlyoffice.domain.com)
    • secret: Shared JWT secret with OnlyOffice
    • verifySSL: Enforce SSL verification (true or false)

πŸ›οΈ appStore​

  • repository: Choose where to fetch client releases: public (default) or local

πŸ“Œ Example​

server:
host: 0.0.0.0
port: 3000
workers: 4
trustProxy: false
restartOnFailure: true
logger:
level: trace
stdout: true
mysql:
url: mysql://user:password@localhost:3306/database
logQueries: false
cache:
adapter: mysql
ttl: 60
redis: redis://127.0.0.1:6379
websocket:
adapter: cluster
corsOrigin: '*'
redis: redis://127.0.0.1:6379
mail:
host: smtp.server.com
port: 587
sender: 'Sync-in<notification@sync-in.com>'
auth:
user: user
pass: password
secure: false
logger: false
debug: false
auth:
method: mysql
sameSite: strict
token:
access:
name: sync-in-access
secret: changeAccessWithStrongSecret
expiration: 30m
cookieMaxAge: 30m
refresh:
name: sync-in-refresh
secret: changeRefreshWithStrongSecret
expiration: 4h
cookieMaxAge: 4h
ldap:
servers: []
baseDN:
filter:
loginAttribute:
applications:
files:
dataPath: /home/sync-in
maxUploadSize: 5368709120
onlyoffice:
enabled: false
externalServer:
secret: onlyOfficeSecret
verifySSL: false
appStore:
repository: public