TMA CloudTMA Cloud
Getting Started

Environment Setup

Environment variable reference for TMA Cloud.

Environment variable reference for TMA Cloud.

Application Configuration

VariableRequiredDefaultDescription
NODE_ENVNodevelopmentEnvironment mode
BPORTNo3000Backend server port
BACKEND_URLYes (OnlyOffice)-Public backend URL

Database Configuration

VariableRequiredDefaultDescription
DB_HOSTNolocalhostPostgreSQL host
DB_PORTNo5432PostgreSQL port
DB_USERNopostgresDatabase username
DB_PASSWORDYes-Database password
DB_NAMENotma_cloud_storageDatabase name
DB_SSLMODENodisableSSL mode
PGBOSS_SCHEMANopgbosspg-boss job queue schema

Redis Configuration

VariableRequiredDefaultDescription
REDIS_HOSTNolocalhostRedis host
REDIS_PORTNo6379Redis port
REDIS_PASSWORDNo-Redis password (recommended)
REDIS_DBNo0Redis database number

Note: Redis is optional. App works without it but caching is disabled.

Authentication

VariableRequiredDefaultDescription
JWT_SECRETYes-Secret key for JWT tokens
SESSION_IDLE_DAYSNo30Days of inactivity before a session ends
FORCE_INSECURE_COOKIESNofalseIf true, the auth cookie has no Secure flag

Configure reverse proxy trust after the first login under SettingsAdministrationKnown Proxies. See Known Proxies.

Google OAuth (Optional)

VariableRequiredDescription
GOOGLE_CLIENT_IDNoGoogle OAuth Client ID
GOOGLE_CLIENT_SECRETNoGoogle OAuth Client Secret
GOOGLE_REDIRECT_URINoRedirect URI (must match Google Console)

Note: All three must be set to enable Google OAuth.

File Storage

Configure a required S3-compatible bucket using R2, RustFS, or AWS environment variables. See Environment Variables for all provider settings.

VariableRequiredDefaultDescription
FILE_ENCRYPTION_KEYNo-Encryption key (see reference)

Note: Storage limits are configured per-user in Settings (admin only). For S3-compatible storage, see Environment Variables.

Logging Configuration

VariableRequiredDefaultDescription
LOG_LEVELNoinfoLog level (fatal, error, warn, info, debug, trace)
LOG_FORMATNojson (prod), pretty (dev)Log format (json, pretty)
METRICS_ALLOWED_IPSNo127.0.0.1,::ffff:127.0.0.1,::1IPs allowed to access /metrics
QUEUE_METRICS_INTERVAL_SECONDSNo60Audit queue gauge refresh interval

Audit Logging Configuration

VariableRequiredDefaultDescription
AUDIT_WORKER_CONCURRENCYNo5Concurrent audit events processed
AUDIT_JOB_TTL_SECONDSNo82800 (23h)Job TTL (must be < 24h)

OnlyOffice Background Save

VariableRequiredDefaultDescription
ONLYOFFICE_AUTOSAVE_INTERVAL_MSNo300000Worker force-save interval

Omit this variable to keep the five-minute default. See Environment Variables for accepted overrides.

Last Access Time

VariableRequiredDefaultDescription
ACCESS_TIME_TRACKINGNo1Set to 0 or false to stop
ACCESS_TIME_WINDOW_MINUTESNo60Per-item suppression window
ACCESS_TIME_FLUSH_SECONDSNo10Buffer flush interval

Frontend Environment Variables

No frontend environment variables required!

Single-Origin Architecture means frontend uses relative URLs and is served from the same origin as the backend.

Next Steps

On this page