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.
- Use
trustProxy
: Enables proxy support (true
,false
, or IP range)restartOnFailure
: Automatically restart workers if they crash (true
orfalse
)
π 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
orfalse
)
β‘ cache
β
adapter
: Cache system (mysql
by default, orredis
)ttl
: Default time-to-live for cached entries (in seconds)redis
: Redis connection URL (used whenadapter: redis
)
π websocket
β
adapter
: WebSocket adapter (cluster
orredis
)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 whenadapter: redis
)
π§ mail
β
host
: SMTP server hostport
: SMTP server port (e.g.,587
)sender
: Sender email address (e.g.,Sync-in<notification@sync-in.com>
)auth
:user
: SMTP usernamepass
: SMTP password
secure
: Use SSL connection (true
orfalse
)logger
: Enable SMTP logging (true
orfalse
)debug
: Enable debug mode (true
orfalse
)
π auth
β
method
: Authentication method (mysql
orldap
)sameSite
: SameSite cookie policy (lax
,strict
)token
:access
:name
: Access token cookie namesecret
: JWT secret for access tokensexpiration
: Access token lifespan (e.g.,30m
)cookieMaxAge
: Cookie lifetime
refresh
:name
: Refresh token cookie namesecret
: JWT secret for refresh tokensexpiration
: Refresh token lifespan (e.g.,4h
)cookieMaxAge
: Cookie lifetime
ldap
(ifmethod: ldap
):servers
: List of LDAP server URLsbaseDN
: Base distinguished name (e.g.,ou=people,dc=example,dc=com
)filter
: LDAP filter (optional)loginAttribute
: Login attribute (uid
ormail
)
π§© applications
β
π files
β
dataPath
: Path to store user datamaxUploadSize
: Maximum allowed file upload size (default: 5 GB)- π
onlyoffice
:enabled
: Enable OnlyOffice integration (true
orfalse
)externalServer
: OnlyOffice server URL (e.g.,https://onlyoffice.domain.com
)secret
: Shared JWT secret with OnlyOfficeverifySSL
: Enforce SSL verification (true
orfalse
)
ποΈ appStore
β
repository
: Choose where to fetch client releases:public
(default) orlocal
π 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