Complete reference for all environment variables used to configure a self-hosted rtCloud deployment.
All configuration is done through environment variables in the .env file at the root of your deployment directory. Docker Compose reads this file automatically — no --env-file flag is needed.
Variables marked required must be set before starting the containers. All others have defaults and are optional.
These variables define the identity and access point of your rtCloud instance.
Variable Default Required Description PROJECT_ID— Yes Unique identifier for this deployment. No spaces or special characters. Used as a prefix for internal naming. PROJECT_URL— Yes Domain name or IP address where users access the app (e.g., rtcloud.example.com or 192.168.1.100). PROJECT_TYPErtsurveyNo Platform variant to activate. Options: rtwork, rtsurvey, rthome. PROJECT_PORT80No Port the application listens on inside the container. Do not change unless you know what you are doing. HTTP_PROTOCOLhttpsNo Protocol used to construct internal URLs. Set to http if you are not using SSL.
Database link MySQL connection credentials. The database is managed automatically by the MySQL container — you only need to set strong passwords.
Variable Default Required Description MYSQL_DATABASEsmartsurveyNo Name of the application database. MYSQL_USERsmartsurveyNo MySQL user for the application. MYSQL_PASSWORD— Yes Password for MYSQL_USER. Use a strong, unique value. MYSQL_ROOT_PASSWORD— Yes MySQL root password. Required for database initialization and admin operations. MYSQL_HOSTmysqlNo MySQL hostname. Use the default unless you are connecting to an external database. MYSQL_PORT3306No MySQL port.
Admin Account link The admin account is created automatically on the first boot of a fresh database.
Variable Default Required Description ADMIN_PASSWORDadminYes Password for the built-in admin user. Set this before first boot. Has no effect if the database already exists.
After first login, change the admin password from the Account Settings page in the web UI.
Control which host ports the application binds to.
Variable Default Description APP_PORT8080Host port for the main web UI. Change this if port 8080 is already in use on your server. SHINY_PORT3838Host port for the Shiny analytics server.
Variable Default Description RUN_ENVprodRuntime environment. Use prod for production deployments, dev for local development. RUN_MODEadminContainer role. admin runs the full stack (web + queue + cron). worker runs background processing only (for horizontal scaling). TZAsia/Ho_Chi_MinhServer timezone. Affects log timestamps, cron schedules, and date display. Use a TZ database name (e.g., UTC, America/New_York, Europe/London). LOG_LEVELinfoApplication log verbosity. Options: debug, info, warning, error. COMPOSE_PROJECT_NAMErtcloudPrefix applied to all Docker container and volume names. Change this when running multiple rtCloud instances on the same host. RESTART_POLICYunless-stoppedDocker container restart behavior. Options: no, always, on-failure, unless-stopped. RTCLOUD_IMAGErtawebteam/rta-smartsurvey:survey-dockerizeDocker image to use. Change the tag to pin a specific version. REQUIRE_LICENSEfalseEnable license key validation on startup. Contact RTA for license information.
Security link Variable Default Description CSRF_VALIDATION_ENABLEDtrueEnable CSRF token validation. Keep this true in production. Set to false only in local development if you encounter 400 CSRF token could not be verified errors. GII_ENABLEDfalseEnable the Yii framework code generator tool. Never enable in production.
SSO — Embedded Keycloak link Enable the bundled Keycloak container for full-featured enterprise SSO. Requires a domain with HTTPS.
Variable Default Description EMBED_KEYCLOAKfalseSet to true to start the embedded Keycloak container. Activates the embed-keycloak Docker Compose profile. KEYCLOAK_URL— Full URL of the Keycloak server (e.g., https://rtcloud.example.com/auth). KEYCLOAK_REALM— Keycloak realm name (e.g., rtsurvey). KEYCLOAK_CLIENT_ID— Keycloak client ID for the rtCloud application. KEYCLOAK_CLIENT_SECRET— Keycloak client secret. Generate this from the Keycloak admin console. KEYCLOAK_ADMIN_USERadminKeycloak administrator username. KEYCLOAK_ADMIN_PASSWORD— Keycloak administrator password. KEYCLOAK_DBkeycloakDatabase name for Keycloak. Created automatically on first boot. KEYCLOAK_DB_USERkeycloakDatabase user for Keycloak. KEYCLOAK_DB_PASSWORD— Database password for the Keycloak user. KC_HOSTNAME— Keycloak frontend URL (e.g., https://rtcloud.example.com/auth). KC_HOSTNAME_STRICTfalseEnforce strict hostname matching. Set to true in production with a fixed domain.
See SSO Authentication for the complete setup guide.
SSO — External OIDC Provider link Connect to an existing OIDC-compatible identity provider (Supabase, Auth0, Authentik, Okta, etc.).
Variable Default Description OIDC_ISSUER_URL— OIDC issuer discovery URL (e.g., https://accounts.google.com). OIDC_CLIENT_ID— Client ID registered in your identity provider. OIDC_CLIENT_SECRET— Client secret from your identity provider. OIDC_SCOPEopenid profile emailSpace-separated list of OIDC scopes to request. OIDC_REDIRECT_URI— Callback URL for the web app (e.g., https://rtcloud.example.com/auth/callback). OIDC_MOBILE_CLIENT_ID— Separate client ID for the rtSurvey mobile app. OIDC_MOBILE_REDIRECT_URI— Mobile app callback URI (e.g., vn.rta.rtsurvey.auth://callback). OPEN_REGISTRATIONfalseAutomatically create rtCloud accounts for users who authenticate via OIDC for the first time. OIDC_AUTHORIZATION_ENDPOINT— Override the authorization endpoint URL (leave blank to use discovery). OIDC_TOKEN_ENDPOINT— Override the token endpoint URL (leave blank to use discovery). OIDC_USERINFO_ENDPOINT— Override the userinfo endpoint URL (leave blank to use discovery).
SSO — Azure Active Directory link Variable Description AZURE_CLIENT_IDAzure AD application (client) ID. AZURE_TENANT_IDAzure AD directory (tenant) ID.
Optional Integrations link Variable Default Description STATA_ENABLEDfalseEnable Stata statistical software integration for data analysis. STATA_BIN_PATH/usr/bin/stataAbsolute path to the Stata binary inside the container.
Elasticsearch link Variable Description ES_HOSTElasticsearch host (e.g., http://elasticsearch:9200). ES_PORTElasticsearch port.
Matomo Analytics link Variable Description PIWIK_URLMatomo (Piwik) server URL. PIWIK_IDMatomo site ID. PIWIK_SECRETMatomo authentication token.
OpenCPU (R Computation) link Variable Description OCPU_HOSTOpenCPU server URL for R-based statistical computation.
RtBox Integration link Variable Description RTBOX_HOSTRtBox service host URL. RTBOX_USER_APIRtBox user API key. RTBOX_BASIC_AUTHBasic authentication credentials for RtBox.
Matrix Messaging link Variable Description MATRIX_HOMESERVER_HOSTMatrix homeserver host. MATRIX_HOMESERVER_PORTMatrix homeserver port.
Data Volumes link All application data is stored in named Docker volumes. Volumes are automatically created on first startup and persist across container restarts and updates.
Volume Mount Point Contents rtcloud_mysql_data/var/lib/mysqlMySQL database files rtcloud_uploads…/uploadsFiles uploaded by survey respondents rtcloud_audios…/audiosAudio recordings rtcloud_downloads…/downloadsGenerated export files rtcloud_gallery…/galleryGallery images rtcloud_voicemail…/voicemailVoicemail recordings rtcloud_analytics…/analyticsAnalytics data rtcloud_aggregate…/aggregateAggregated survey results rtcloud_converter…/converterData conversion outputs rtcloud_shiny_data/srv/shiny-server/smartsurveyShiny server R scripts rtcloud_shiny_logs/var/log/shiny-serverShiny server logs rtcloud_assets…/assetsWeb assets (CSS, JS) rtcloud_runtime…/protected/runtimeApplication runtime cache rtcloud_cache…/cacheApplication cache rtcloud_tmp…/tmpTemporary files
Volume names are prefixed by the value of COMPOSE_PROJECT_NAME (default: rtcloud).
List all volumes for your deployment:
docker volume ls | grep rtcloud