⟵ hearthere ⟶
  • Quick start
  • Install Totum
  • Installation
  • Totum PRO Licenses
  • Test License
  • Mandatory Condition for License Operation and Network Debugging
  • Concurrent Connections
  • User Management from the Console
  • Switching from Totum MIT to PRO
  • If you need to change the domain of a running system
  • Changing the timezone on a running system
  • Updating
  • Optimization
  • Backups
  • bin/totum
  • Basics for users
  • Interface and Layout
  • Tables and their parameters
  • Fields and their parameters
  • Prefilter
  • Syntax
  • Code, actions, formatting
  • Relational associations
  • Calculation order and calculation units
  • Auto-complete calculations and timing
  • Duplicate rows and cycles
  • Comparisons
  • Functions
  • Debugging
  • Print and CSV
  • Roles and users
  • Notifications
  • System tables
  • [PRO] Crons
  • [PRO] Daemons
  • [PRO] API
  • [PRO] Exporting and importing tables
  • [PRO] Anonymous tables
  • [PRO] External Forms
  • [PRO] LDAP AD
  • [PRO] MeiliSearch
  • [PRO] Only Office
  • [PRO] Trees
  • [PRO] Dynamic fields
  • [PRO] File versions
  • [PRO] 2FA
  • [PRO] Superlang
  • [PRO] Auth Tokens
  • [PRO] List-unsubscribe
  • [PRO] Databases
  • [PRO] Custom CSS
  • [PRO] Custom docs
  • [PRO] Profiler
  • [PRO] Connecting functions
  • [SRV] Installation and Connection
  • [SRV] Export, PDF, Upload, and Preview
  • [SRV] XLSX/DOCX Generators
  • Installing Totum on Ubuntu 24.04

    youtube

    Video on YouTube ⟹


    The auto-installation script is intended ONLY FOR CLEAN IMAGES!!!

    If you already have other software installed and configured (or other versions of Totum), the server will become inoperable!

    Installation

    1. Deploy a server with Ubuntu 24.04 without pre-installed packages of other software!;

      If you need to install on a version of Ubuntu different from 24.04 (for example, if you or your hoster do not have the required image), you can disable the version check by passing the parameter --without-check

      If installation is carried out with an intermediate proxy ⟹

    2. If you want to install with a domain — purchase a domain, delegate it, and create an A-record on the server's IP (you need to wait until the DNS takes effect);

      For testing or for an internal network, you can install on the server's IP; for this, when the installer asks about the domain, leave the field empty.

      You can connect a domain later by creating an A-record and rerunning the installer from the same folder from which it was initially run!

    3. Open a terminal under root or sudo-user and execute:

      sudo curl -O https://raw.githubusercontent.com/totumonline/totum-mit/master/totum/moduls/install/totum_autoinstall.sh && sudo bash totum_autoinstall.sh
      

      The script installs both the MIT and PRO versions! You can install the PRO version only with an Admin user without paying for a license!

      If the server says it doesn't have curl, it needs to be installed: apt update && apt -y install curl

    4. Follow the on-screen prompts.

    Totum PRO Licenses


    licenses

    Video on YouTube ⟹


    Free license for 2 users, how to get it ⟹

    Users (admin 1 pc, cron and service are technical users and are not counted in the license limit) — you can install PRO for development without a license file.

    To add users — you need to purchase a license at https://totum.online/pro and write it to the file:

    nano /home/totum/totum-mit/PRO.license
    

    Write the file from the console, third-party software of the hoster or virtual machine (e.g., GUI file managers) may corrupt the file!

    For registration, see the PRO version page.

    Example of a PRO.license file:

    [{"l":250,"schemas":{"start.ttmapp.ru":"totum"},"to":"2025-08-12","type":"base","users":40},{"l":250,"schemas":{"start-dev.ttmapp.ru":"dev"},"to":"2025-08-12","type":"base","users":40}]
    ---------
    VRJucMTJu9uh/a8LIBqzH5jl8NyDgKmzsR2Aa1jG9WEqW8...
    

    After writing the license file, you need to restart totum-gom:

    sudo service totum-gom restart
    

    Totum processes two types of users, determined by the number of tables accessible: standard user and limited.

    • "users":40 — number of standard users.

    • "l":250 — number of limited users with access to less than 8 tables (each user has 3 technical tables, which can be fully or partially disabled if necessary).

    If the license does not contain information about the number of limited users, they will be counted as standard.

    Limited users are cheaper and necessary, for example, for organizing personal accounts of contractors/customers, etc.

    The cost of one license includes 4 hosts (main, test, and additional). All are fully functional. You can also issue a license with one host and add others later to the existing license.

    The license is valid up to and including the date specified in to.

    If one of the hosts in the license fails the check, it does not affect other hosts in this license, but we recommend issuing two separate license files if the hosts are on different servers.

    To pass the check, the host must be accessible from the network where the server is installed.

    If there are network problems, the license check restarts automatically at 30-second intervals.

    You can restart manually by restarting the totum-gom service:

    sudo service totum-gom restart
    

    Test License

    We cannot revoke issued license files, so we cannot correct errors you made when entering the host and scheme when issuing the license.

    You can check the entered data before paying for the license:

    1. Register on the license site: https://totum.online/pro

    2. Add a License

    3. Download the test license

    4. Create a test license file and write the test license into it:

      su totum
      
      cd /home/totum/totum-mit && nano PRO.license-test
      
    5. Perform a license check

      bin/gomodule-test
      
    6. A positive result looks like this

      2024-09-17 19:31:54
      Opening Conf by pathConf.php: OK
      Connecting db totum: OK
      Checking License file:
      [Read License file PRO.license-test]
      [select id, name->>'v' as name from "totum".tables where name->>'v' in ('tables', 'users', 'tables_fields', 'notifications', 'roles')]
      [License loaded successfully]
      Checking Licenses hosts:
      [Part  license.totum.online & totum passed successfully]
      

    Mandatory Condition for License Operation and Network Debugging

    The license module, during its operation, periodically requests temporary key data (which it creates itself) by sending a request to the hosts specified in the license file. If the response is incorrect, the go-module will issue an error: GOMODULE: The host X didn't pass checker.

    To check from the console, execute the request (replace HOST with your domain or IP):

    curl -L http://HOST/go-licenser
    

    The -L flag is mandatory to follow the 3** redirect.

    Example:

    totum@vm-75577e5b:~/totum-mit$ curl -L http://revizor.ttmapp.ru/go-licenser
    GOMODULE: go-license checker error Strct {898388 2025-05-07 14:36:39 totum}
    

    The response should start with GOMODULE (when manually executing CURL, there will always be an error, as when this request is executed by the license module, a temporary key is also transmitted in this request).

    The additional -v flag will show the full log of the request execution:

    root@vm-75577e5b:~# curl -v -L http://revizor.ttmapp.ru/go-licenser
    * Host revizor.ttmapp.ru:80 was resolved.
    * IPv6: (none)
    * IPv4: 91.226.80.205
    *   Trying 91.226.80.205:80...
    * Connected to revizor.ttmapp.ru (91.226.80.205) port 80
    > GET /go-licenser HTTP/1.1
    > Host: revizor.ttmapp.ru
    
    * * *
    
    < Content-Type: text/html; charset=UTF-8
    < Transfer-Encoding: chunked
    < Connection: keep-alive
    < 
    * Connection #1 to host revizor.ttmapp.ru left intact
    GOMODULE: go-license checker error Strct {69958 2025-06-02 10:36:42 totum}root@vm-75577e5b
    

    Concurrent Connections

    1 license slot per user provides one simultaneously connected browser. If exceeded, the connection with the least recent activity date will be disconnected.

    If you need one user to be able to connect simultaneously from multiple browsers, you need to set the number of connections available to them in the ttm__concurrent_connections field of the users table.

    Each additional slot for simultaneous connection consumes 1 license slot.

    User Management from the Console

    This part is especially necessary if you have exceeded the number of users and the system is locked, then disabling users is possible through the server console.

    It is executed by the console utility bin/totum. All commands must be executed from the installation folder:

    cd /home/totum/totum-mit
    

    List all users (replace totum if the command is executed for another scheme):

    bin/totum schema-users --schema=totum --list=all
    

    List only active users (replace totum if the command is executed for another scheme):

    bin/totum schema-users --schema=totum --list=on
    

    Command execution result:

    +------------------+------------------+-------+--------+----------+---------+------------+
    | Login            | FIO              | Email | Status | Licenses | Tables  | Limit User |
    +------------------+------------------+-------+--------+----------+---------+------------+
    | admin            | Administrator    |       | ON     |          | 49      |            |
    | anonym           | anonym           |       | OFF    |          | 0       | +          |
    | api-remotes-user | api-remotes-user |       | ON     |          | 11      |            |
    | cron             | Cron             |       | ON     |          | 0       |            |
    | limit-user       | limit-user       |       | ON     |          | 11      |            |
    | one-more-user    | one-more-user    |       | ON     |          | 0       | +          |
    | other-user       | other-user       |       | ON     |          | 11      |            |
    | service          | service          |       | ON     |          | 49      |            |
    | some-user        | some-user        |       | ON     | 10       | 11      |            |
    |                  |                  |       | ALL:9  | FULL:13  | LIMIT:2 | TOTAL:15   |
    +------------------+------------------+-------+--------+----------+---------+------------+
    
    • ALL — all users in the list.

    • FULL — the number of unlimited license slots used in the scheme (in this example some-user uses 10 instead of 1 because they are set to allow 10 simultaneous connections from different browsers through the ttm__concurrent_connections field in the users table).

    • LIMIT — the number of limited license slots used in the scheme. If the license does not contain a limit on restricted users, they are counted as unlimited.

    • TOTAL — the total number of license slots used. In this example TOTAL:15 with 10 available without a license file — the scheme is locked.

    To disable a user from the console:

    Replace USER_LOGIN_OR_EMAIL with the login or email (if available) of the user you want to disable (replace totum if the command is executed for another scheme):

    bin/totum schema-users --schema=totum --off=USER_LOGIN_OR_EMAIL
    

    To enable a user from the console:

    Replace USER_LOGIN_OR_EMAIL with the login or email (if available) of the user you want to enable (replace totum if the command is executed for a different schema):

    bin/totum schema-users --schema=totum --on=USER_LOGIN_OR_EMAIL
    

    Switching from Totum MIT to PRO

    Your MIT installation must be updated to the latest version to switch to PRO! Be sure to perform the update! before switching.

    Run the standard Totum installer from the same folder from which it was run on the server during the first system installation:

    sudo curl -O https://raw.githubusercontent.com/totumonline/totum-mit/master/totum/moduls/install/totum_autoinstall.sh && sudo bash totum_autoinstall.sh
    

    The installer will prompt you to change the installation option to PRO.

    If you forgot the folder from which the installer was run, search for totum_install_vars (this file is created during installation):

    sudo find / -name "totum_install_vars"
    

    If you need to change the domain of a running system

    1. Delegate the new domain (wait for DNS changes to apply).

      Open the Totum config file and replace the old domain with the new one.

      nano /home/totum/totum-mit/Conf.php
      

      If you uploaded files — rename the folder (replace YOUR_OLD_DOMAIN with YOUR_NEW_DOMAIN):

      mv /home/totum/totum-mit/http/fls/YOUR_OLD_DOMAIN  /home/totum/totum-mit/http/fls/YOUR_NEW_DOMAIN
      

      If you uploaded protected! files — rename another folder (replace YOUR_OLD_DOMAIN and YOUR_NEW_DOMAIN):

      mv /home/totum/totum-mit/secureFiles/YOUR_OLD_DOMAIN  /home/totum/totum-mit/secureFiles/YOUR_NEW_DOMAIN
      
    2. Issue a new certificate.

      Check certificate acquisition in test mode (replace YOUR_DOMAIN.ZONE with your new domain):

      certbot certonly --dry-run -d YOUR_DOMAIN.ZONE
      

      If the test passes — obtain the certificate:

      certbot certonly -d YOUR_DOMAIN.ZONE
      

      Connect the certificate in the nginx config:

      nano /etc/nginx/sites-available/totum.online.conf
      

      Replace YOUR_DOMAIN.ZONE with your new domain:

      In the server_name line and in the certificate block

      ssl_certificate /etc/letsencrypt/live/YOUR_DOMAIN.ZONE/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/YOUR_DOMAIN.ZONE/privkey.pem;
      ssl_trusted_certificate /etc/letsencrypt/live/YOUR_DOMAIN.ZONE/chain.pem;
      
    3. Restart nginx:

      service nginx reload
      

    Changing the timezone on a running system

    We recommend updating all packages on the server to the latest versions:

    apt update
    
    apt upgrade
    

    If asked about local configurations — choose to keep local as they are configured for your host

    View system information:

    timedatectl
    

    View the list of all timezones:

    timedatectl list-timezones
    

    Set the timezone (the timezone name is taken from the list above):

    timedatectl set-timezone Europe/Kaliningrad
    

    Set the timezone for the FPM pool:

    nano /etc/php/8.3/fpm/pool.d/totum.conf
    

    PHP-FPM takes the system timezone at startup, so after setting a new system timezone, you need to restart FPM and nginx:

    service php8.3-fpm restart
    
    service nginx restart
    

    Set the zone for PostgreSQL. Launch the PostgreSQL console from the postgres user.

    sudo -u postgres psql
    

    Set the zone:

    ALTER SYSTEM SET timezone TO 'Europe/Minsk'
    

    Close the database console

    \q
    

    Restart PostgreSQL:

    service postgresql restart
    

    Change the timezone in CLI.totum.php.ini

    nano /home/totum/totum-mit/CLI.totum.php.ini