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:8080
)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
)colorize
: Enables log colorization (default:true
)filePath
: Path to the log file used whenstdout
is set tofalse
.
π¬ 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)showHiddenFiles
: Show files starting with a dot in the file explorer (default:false
)- π
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
: Choice of repository for application client releases:public
(default) orlocal
π± Environment variablesβ
All Sync-in server configuration parameters can be set using environment variables prefixed with SYNCIN_
.
For example, the following configuration :
auth:
token:
access:
secret: "changeAccessWithStrongSecret"
refresh:
secret: "changeRefreshWithStrongSecret"
mysql:
url: mysql://root:MySQLRootPassword@mariadb:3306/sync_in
Can be replicated with environment variables as follows:
SYNCIN_AUTH_TOKEN_ACCESS_SECRET="changeAccessWithStrongSecret"
SYNCIN_AUTH_TOKEN_REFRESH_SECRET="changeAccessWithStrongSecret"
SYNCIN_MYSQL_URL="mysql://root:MySQLRootPassword@mariadb:3306/sync_in"
info
For boolean values, use true
or false
.
Numeric values are parsed automatically
π Exampleβ
server:
host: 0.0.0.0
port: 3000
# workers: auto (use all cpus) | number
# regardless of the value, starts with at least 2 workers, 1 worker is dedicated to scheduled tasks
workers: 4
# trust proxy: true | false | 127.0.0.1,192.168.1.1/24
trustProxy: false
# restartOnFailure : automatically restart workers if they are killed or die
restartOnFailure: true
logger:
# level: trace | debug | info | warn | error | fatal
level: trace
# stdout : if false logs are written to the run directory (default: true)
stdout: true
# path to the log file used when stdout is set to false
filePath: /var/log/sync-in/server.log
mysql:
url: mysql://user:password@localhost:3306/database
logQueries: false
cache:
# adapter: mysql (default) | redis (requires optional dependency: redis)
adapter: mysql
# default ttl in seconds
ttl: 60
# redis adapter url
redis: redis://127.0.0.1:6379
websocket:
# adapter: cluster (Node.js Workers: default) | redis (requires optional dependency: @socket.io/redis-adapter)
adapter: cluster
# cors origin allowed
corsOrigin: '*'
# redis adapter url
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: defines if the connection should use SSL (if true) or not (if false)
secure: false
# enable logger
logger: false
# set log level to debug
debug: false
auth:
# adapter : mysql (default) | ldap
method: mysql
# sameSite (cookie settings) : lax | strict
sameSite: strict
token:
access:
name: sync-in-access
# used for token & cookie signatures
secret: changeAccessWithStrongSecret
expiration: 30m
cookieMaxAge: 30m
refresh:
name: sync-in-refresh
# used for token & cookie signatures
secret: changeRefreshWithStrongSecret
expiration: 4h
cookieMaxAge: 4h
ldap:
# e.g: [ldap://localhost:389, ldaps://localhost:636] (array required)
servers: []
# baseDN: distinguished name, e.g: (ou=people,dc=ldap,dc=sync-in,dc=com)
baseDN:
# filter, e.g: (acl=admin)
filter:
# login attribute: uid (default) or mail
loginAttribute:
applications:
files:
dataPath: /home/sync-in
# Default to 5 GB if not specified
maxUploadSize: 5368709120
# Show files starting with a dot in the file explorer (default: false)
showHiddenFiles: false
onlyoffice:
enabled: false
# for an external server (e.g: https://onlyoffice.domain.com), remember the url must be accessible from browser !
# if externalServer is empty (case of official docker compose), we use the local instance
externalServer:
# secret used for jwt tokens, it must be the same on the onlyoffice server
secret: onlyOfficeSecret
# if you use https, set to true
verifySSL: false
appStore:
# repository: public (default) | local
repository: public