CMS installation

  CMS Installation


  Installing and Running the CMS Code


TutoCito CMS installation is performed via the apt package manager from a local .deb package. To do this, simply execute the following two-command line in your server terminal:

wget https://tutocito.com/api/updates/download/cmsTCpro_<version>.deb && sudo apt install ./cmsTCpro_<version>.deb

The first command downloads the package to the current directory, while the second extracts, installs, and launches it. Before running this command, verify the latest package version number and adjust it in the command line accordingly, otherwise the installation will fail. You can find the current version number in your personal account, where you can also obtain your product license key.

The CMS application code will be placed in the /var/www/cmsTCpro directory. This directory will also contain the /base folder with database files storing all your website content. Make regular backups of this folder to ensure recovery in case of accidental data loss.

After installation, you can verify the application is working by visiting http://localhost:4000 in your browser. The application runs as a system service, so you can manage it using the following commands:

  • Check status: sudo systemctl status cmsTCpro.service
  • Start/Stop: sudo systemctl start cmsTCpro.service |   sudo systemctl stop cmsTCpro.service
  • Enable at boot: sudo systemctl enable cmsTCpro.service
  • Restart (zero downtime config reload): sudo systemctl restart cmsTCpro.service

This is the system service file that launches the application:

/etc/systemd/system/cmsTCpro.service
[Unit]
Description=TutoCito CMS - .NET Blazor Web App on Linux

[Service]
WorkingDirectory=/var/www/cmsTCpro

ExecStart=/usr/bin/dotnet /var/www/cmsTCpro/cmsTC.dll --urls='http://127.0.0.1:4000'

Restart=always

# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10

KillSignal=SIGINT
SyslogIdentifier=cmsTCpro
User=root
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target



  Configuring the NGINX Web Server

  Create a new NGINX configuration file with the content below and the specified filename. Replace example.com with your actual domain and verify the paths to your .key and .crt certificate files. If certificate files are missing, generate them following your hosting provider's instructions or independently using a tool like Certbot (Let's Encrypt).

/etc/nginx/sites-enabled/default

# MIME types and extension for .razor.js
include       /etc/nginx/mime.types;
types {
    application/javascript razor.js;
}

# Upstream for ASP.NET Core application
upstream app_server {
    server 127.0.0.1:4000;
}

# ============================================
# Redirect www.example.com → example.com
# ============================================
server {
    listen 80;
    listen 443 ssl;
    server_name www.example.com;

    # SSL certificates (Certbot)
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    include             /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam         /etc/letsencrypt/ssl-dhparams.pem;

    # Permanent redirect to primary domain
    return 301 https://example.com$request_uri;
}

# ============================================
# Main server: example.com
# ============================================
server {
    listen [::]:443 ssl ipv6only=on;
    listen 443 ssl;
    server_name example.com;
    # server_name localhost;

    # SSL certificates (Certbot)
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    include             /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam         /etc/letsencrypt/ssl-dhparams.pem;

    # Root directory
    root /var/www/cmsTCpro/wwwroot;

    # --------------------------------------------
    # Proxy requests to ASP.NET Core
    # --------------------------------------------
    location / {
        # Rate limiting (bot protection)
        # zone=bot_limit, burst=20 — allow short bursts up to 20 requests
        # nodelay — excess requests beyond burst are rejected immediately with 503
        limit_req zone=bot_limit burst=20 nodelay;

        # Proxy to upstream
        proxy_pass http://app_server;
        proxy_http_version 1.1;  # Required for WebSockets

        # Headers for proper proxy operation
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;

        # Disable buffering for streaming (JS modules, SignalR)
        proxy_buffering off;
    }

    # --------------------------------------------
    # Static HTML files
    # --------------------------------------------
    location /html {
        root /var/www;
        index index.html index.nginx-debian.html;
        try_files $uri $uri/ =404;
    }
}

Reload the web server:
$ sudo systemctl restart nginx
and verify your website is working correctly in a browser.




Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.