This guide walks you through deploying a self-hosted rtCloud instance on a Linux server from scratch. By the end, you will have a running rtCloud accessible in your browser.

Prerequisites

Ensure your server meets the following requirements before starting:

Hardware

ResourceMinimumRecommended
RAM2 GB4 GB
Disk10 GB40 GB
CPU1 vCPU2 vCPUs

Software

SoftwareVersion
OSUbuntu 20.04 LTS or newer (or any Linux with Docker support)
Docker20.10 or newer
Docker Composev2.x (docker compose) or v1.x (docker-compose)

Install Docker on Ubuntu:

  curl -fsSL https://get.docker.com | sh
  

Verify the installation:

  docker --version
docker compose version
  

Step 1 — Get the Files

Clone the deployment repository to your server:

  git clone ssh://git@rtgit.rta.vn:2224/rtlab/rtwebteam/rta-smart-survey-docker.git rtcloud
cd rtcloud
  

Step 2 — Configure the Environment

Copy the sample configuration file:

  cp .env.production.sample .env
  

Open .env in a text editor and fill in the required values:

  # Unique identifier for this deployment (no spaces, no special characters)
PROJECT_ID=myproject

# Domain or IP address where users will access the app
# Example: rtcloud.example.com  or  192.168.1.100
PROJECT_URL=rtcloud.example.com

# Protocol: use "https" if you have a domain with SSL, "http" otherwise
HTTP_PROTOCOL=https

# Strong, unique passwords — change all three before starting
MYSQL_PASSWORD=change_me_strong_password
MYSQL_ROOT_PASSWORD=change_me_root_password
ADMIN_PASSWORD=change_me_admin_password
  

Important: Only .env is read by Docker Compose automatically. Do not create a file named .env.production, as that would cause confusion. The ADMIN_PASSWORD is applied only on the first boot of a fresh database.


Step 3 — Start the Containers

Launch all services in the background:

  docker compose -f docker-compose.production.yml up -d
  

The first startup takes 3–5 minutes while Docker:

  1. Pulls the rtCloud application image (~1 GB download)
  2. Initializes the MySQL database
  3. Loads the base schema
  4. Runs all pending database migrations

Monitor startup progress in real time:

  docker compose -f docker-compose.production.yml logs -f rtcloud
  

Wait until you see output indicating the application is ready. You can also watch the container health status:

  watch docker compose -f docker-compose.production.yml ps
  

Step 4 — Access the Application

Once both containers show Up (healthy), open your browser:

  http://<PROJECT_URL>:8080
  

Log in using the administrator account:

FieldValue
Usernameadmin
PasswordThe value you set for ADMIN_PASSWORD in .env

Change the admin password immediately after your first login from the account settings page.


Step 5 — Verify All Services

Check that all containers are running and healthy:

  docker compose -f docker-compose.production.yml ps
  

Expected output:

  NAME                    IMAGE                                   STATUS
rtcloud-app             rtawebteam/rta-smartsurvey:...          Up (healthy)
rtcloud-mysql           mysql:8.0                               Up (healthy)
  

If a container shows Up (starting) or Up (unhealthy), wait 30–60 more seconds and check again. MySQL can take up to a minute to fully initialize on first boot.


Port Reference

PortServiceDescription
8080rtCloud AppMain web UI (configurable via APP_PORT)
3838Shiny ServerAnalytics and R-based visualizations (configurable via SHINY_PORT)

MySQL (port 3306) and any optional services (Keycloak) are internal-only and not exposed to the host by default.


Next Steps

Your rtCloud instance is now running. Consider these follow-up tasks:

  • Enable HTTPS — Point a domain to your server and configure SSL with Let’s Encrypt. See Cloud Deployment for automated HTTPS setup.
  • Review all settings — Browse the Configuration Reference to tune your deployment for production.
  • Set up SSO — Connect an identity provider for centralized user authentication. See SSO Authentication.
  • Plan your backups — Review the Maintenance page for backup and upgrade procedures.
Was this page helpful?