--- title: What is Total.js Code project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/introduction/ updated: 2026-11-19T04:32:09.378Z --- # What is Total.js Code > What Total.js Code does, who it is for and what to read next. Total.js Code is a code editor that runs on your own server and opens in the browser. You and your team work on the same projects, see each other's changes live, and keep every project in one place. ![The Code editor with a project open, the file tree on the left and the Additional panel on the right](/files/Janvs52YR61f.webp) ## What you can do - Edit files with syntax highlighting, tabs and search across a whole project. - Work on the same file at the same time as a colleague. - Go back to an earlier version of a file from its backups. - Run scripts, send API requests and read application logs without leaving the editor. - Talk to your team in the built-in chat and see how much time went into each project. - Manage projects and users from one administration area. ## Who it is for Code is made for developers and small teams who build applications with Total.js and want one shared place to work on them. An administrator adds the projects and the users. Developers open the projects they are assigned to. ## What to read next 1. Check the [requirements](../requirements/). 2. Install Code [on your computer](../install-localhost/) or [on a server](../install-server/). 3. [Create the first administrator](../first-administrator/) straight after you install. 4. [Add a project](../add-project/) and learn [the interface](../interface/). --- title: Requirements project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/requirements/ updated: 2026-11-19T04:32:09.378Z --- # Requirements > What you need to install and run Total.js Code. Code needs very little. It keeps its data in files, so you don't have to set up a database. ## For the official installation | You need | Why | |---|---| | Docker with Docker Compose | Both official installation methods run Code in a container | | A domain pointing to your server | Only for the [server installation](../install-server/) | ## To run from source | You need | Why | |---|---| | Node.js | Runs the application. The official image uses Node.js 24 | | npm | Installs the dependencies | Read [Run from source](../run-from-source/) for the steps. ## Browser Code runs in a current desktop browser. To upload a whole folder by dragging it, use a Chromium-based browser or Safari. ## Database Code doesn't need a database of its own. PostgreSQL only matters if you want to [browse your own PostgreSQL database](../db-viewer/) from the editor. --- title: Install on your computer project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/install-localhost/ updated: 2026-11-19T04:32:04.377Z --- # Install on your computer > Run Total.js Code on your own computer with Docker. This installation runs Code in Docker on your computer and opens it at `http://code.localhost`. ## Before you start Make sure Docker is installed and running. See the [requirements](../requirements/). ## Install Code **1.** Download the official setup: ```bash git clone https://github.com/totaljs/code-local cd code-local ``` **2.** Open `docker-compose.yaml` in a text editor. **3.** Replace `/your/local/path/apps` with the folder that holds your applications. It appears in two places: the `/www/www` volume and `FOLDER_WWW`. **4.** Replace `/your/local/path/node_modules` in `FOLDER_NPM` with a folder for the shared Node.js modules. **5.** Start Code: ```bash docker compose up -d ``` **6.** Open `http://code.localhost` in your browser. ## Finish the setup The first person who opens Code becomes its administrator, so [create the first administrator](../first-administrator/) now. ## Add your applications When you [add a project](../add-project/), give it an address that ends in `.localhost`, for example `http://yourapp.localhost`. --- title: Install on a server project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/install-server/ updated: 2026-11-19T04:32:04.377Z --- # Install on a server > Run Total.js Code on a server with Docker and HTTPS. This installation runs Code in Docker on a server, behind a proxy that handles your domains and HTTPS certificates. ## Before you start - Point the DNS of your domains to the server. - Install Docker and Node.js on the server. ## Set up the proxy **1.** Clone [nginx-proxy-automation](https://github.com/evertramos/nginx-proxy-automation). **2.** Update `nginx.tmpl` as described in the "Tune NGINX" section of the [code-cloud readme](https://github.com/totaljs/code-cloud), and follow step 1 of the proxy's own instructions. **3.** Start the proxy, using your own email address: ```bash cd proxy/bin ./fresh-start.sh --yes -e your_email@domain --skip-docker-image-check --use-nginx-conf-files ``` ## Prepare the folders Create the folders for your applications and the shared modules, and install Total.js there: ```bash mkdir -p /www/www /www/node_modules cd /www npm install total4 ``` ## Install Code **1.** Download the official setup: ```bash git clone https://github.com/totaljs/code-cloud cd code-cloud ``` **2.** Open `docker-compose.yaml` and enter your domain in `LETSENCRYPT_HOST` and `VIRTUAL_HOST`. You can also set `ORIGIN`, described in the [configuration](../../reference/configuration/). **3.** Start Code: ```bash docker compose up -d ``` **4.** Open your domain in the browser. ## Protect your server The first person who opens a fresh instance becomes its administrator. Keep the server closed to the public until you have [created the first administrator](../first-administrator/), for example with a firewall rule that only allows your own address. Always open Code over HTTPS on a public server. --- title: Run from source project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/run-from-source/ updated: 2026-11-19T04:32:09.378Z --- # Run from source > Start Total.js Code directly with Node.js, without Docker. You can run Code directly with Node.js. This suits a test on your own computer. The Docker features stay off in this setup. ## Start Code **1.** Download the code: ```bash git clone https://github.com/totaljs/code cd code ``` **2.** Install the dependencies: ```bash npm install ``` **3.** Open the `config` file and set the two folders that Code uses: ```text backup : /path/to/backup/ autodiscover : /path/to/apps/ ``` **4.** Start the application: ```bash npm start ``` **5.** Open `http://localhost:8000` in your browser. Code listens on port `8000`. ## Finish the setup [Create the first administrator](../first-administrator/) before anyone else can reach the address. All settings of the `config` file are listed in the [configuration](../../reference/configuration/). --- title: Create the first administrator project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/first-administrator/ updated: 2026-11-19T04:32:04.377Z --- # Create the first administrator > Create the administrator account of a fresh Total.js Code instance. A fresh instance has no accounts and no default password. The first person who opens it creates the administrator account. **Do this straight after you install, before you expose the server to other people.** Until the account exists, anyone who can reach the address can take this role. ![The first start form with the fields Your ID, Full name, E-mail address and Password](/files/Janvrx2RR60f.webp) ## Create the account 1. Open the address of your Code instance. 2. In **Your ID**, enter a short name in lower-case letters, for example `janedoe`. 3. In **Full name**, enter your name. 4. In **E-mail address**, replace the `@` that is already in the field with your address. You sign in with this address. 5. In **Password**, enter a strong password of up to 30 characters. 6. Click **SIGN UP**. Code signs you in and opens the editor. The form doesn't appear again: from now on the page asks for **Email address** and **Password**. ## After you sign in - [Add a project](../add-project/). - [Add the users](../manage-users/) of your team. - Keep the server behind HTTPS and restrict who can reach it. --- title: The interface project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/interface/ updated: 2026-11-19T04:32:09.378Z --- # The interface > The parts of the Total.js Code screen and how to move around. The editor is the main screen of Code. This page shows you where everything is. ![The editor with the main bar on top, the project panel on the left, the code in the middle and the Additional panel on the right](/files/Janvs52YR61f.webp) ## Main bar The icons at the top left open the main areas: | Icon | What it opens | |---|---| | **Code** | The editor | | **Chat** | The [team chat](../chat/) | | **Support** | The Total.js support chat | | **Documentation** | The documentation address of the open project | | **Projects** | The [projects](../add-project/), for administrators | | **Users** | The [users](../manage-users/), for administrators | | **Time spent** | The [time report](../time-tracking/), for administrators | | **Settings** | The [settings](../../reference/settings/), for administrators | | **My account** | [Your own account](../my-account/) | | **Sign out** | Signs you out | ## Project panel The panel on the left shows the open project. - Click the project name at the top to switch to another project. - **Last changed files** lists the files that were saved most recently. - The file tree shows the folders and files. See [Manage files and folders](../manage-files/). - The buttons at the bottom are **Create file**, **Create folder**, **Refresh directories and files**, **Time spent**, **All tracked changes** and **Users**. ## Tab bar and status bar Each open file has a tab above the code. To the left of the tabs are the editor options and **Branches**. On the right you find **Preview**, which opens the address of the project, and **Docker**. The status bar under the code shows the warnings, the changed lines, the last save, the size of the file, the cursor position and the file path. ## Additional panel The panel on the right has one tab for each tool: **Used parts**, **UI components**, **Output panel**, **Search**, **Last changes**, **Backups** and **Time spent**. ## Command palette Press `F1` to find files and actions by typing. Type `:12` to jump to line 12 of the open file. ![The command palette with a search box and a list of actions](/files/Janvs72ZR60f.webp) ## Pause The pause button at the top right stops your session for a moment. Code shows the **Paused coding** page. Click **PLAY WITH CODE** or press any key to go back to your project. Code also pauses by itself after about eight minutes without a click or a key press. ![The Paused coding page with the Play with code button](/files/Janvs82aR61f.webp) --- title: Add a project project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/add-project/ updated: 2026-11-19T04:32:04.377Z --- # Add a project > Register a project in Total.js Code by hand or with Auto-Discover. A project is a folder with an application. Only an administrator can add projects. Open **Projects** in the main bar. ![The Projects screen with the Auto-Discover, Add and Selected buttons above the list of projects](/files/JanvrQ1wR61f.webp) ## Add a project by hand **1.** Click **Add**. **2.** Enter the address of the application, for example `https://www.example.com`, and press `Enter`. ![The Add button with a field for the address of the web app](/files/JanvrS1xR60f.webp) **3.** Code fills in the project form from the address. Check the **Path**, the folder of the application on the server. **4.** Change the other options if you need to. They are explained in [Project options](../../reference/project-options/). **5.** Click **SAVE**. ![The New project form with the path, name, address and other options](/files/JanvrU1yR61f.webp) ## Find projects automatically Code can register every folder it finds in its applications folder. 1. Click **Auto-Discover**. 2. Confirm your choice. Each new folder becomes a project. Code also scans the folder by itself while it runs, so a new folder appears without your help. Code builds the address of the project from the folder name. Use the form `domain_tld-subdomain`: | Folder | Address of the project | |---|---| | `sample_localhost-www` | `http://www.sample.localhost` | | `example_com-www` | `https://www.example.com` | You can change the name and the address afterwards: click the project in the list. The applications folder is the `autodiscover` key of the [configuration](../../reference/configuration/). ## Open a project Open **Code** in the main bar, click **Choose project** at the top of the panel and pick the project. --- title: Unregister or remove a project project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/remove-project/ updated: 2026-11-19T04:32:09.378Z --- # Unregister or remove a project > Take a project out of Total.js Code, with or without its files. You can take a project out of Code in two ways. One keeps the files and the other deletes them. | Action | The project in Code | The files on the server | |---|---|---| | **Unregister** | Disappears from the list | Stay in place | | **Remove** | Disappears from the list | **Are deleted** | ## Take a project out 1. Open **Projects** in the main bar. 2. Check the box next to the project. 3. Click **Selected**. 4. Choose **Unregister** or **Remove**. 5. Confirm your choice. ![The Selected menu with Run Docker, Stop Docker, Restart, Clear backups, Unregister and Remove](/files/JanvsU2uR61f.webp) **Remove** can't be undone. Make a copy of the project first if you may need it again. ## Projects inside the applications folder If the folder of an unregistered project stays in the applications folder, the next scan adds the project again. To keep it out of Code, move the folder somewhere else. --- title: Docker projects project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/docker/ updated: 2026-11-19T04:32:04.377Z --- # Docker projects > Where to find the Docker controls of a project in Total.js Code. Code can run each project in its own Docker container. The official installations are prepared for this. ## Turn Docker on Docker needs two settings, `FOLDER_WWW` and `FOLDER_NPM`. Both official `docker-compose.yaml` files have them. Without them, Code shows the message **Docker engine is not activated**. See the [configuration](../../reference/configuration/). ## Control a project - In the editor, click **Docker** at the right of the tab bar. - On the **Projects** screen, check one or more projects, click **Selected** and choose **Run Docker**, **Stop Docker** or **Restart**. The list of projects has the columns **Running**, **CPU**, **Memory** and **Network**. ## Options of a project The project form has these Docker options. Click a project on the **Projects** screen to open it. | Option | What it is for | |---|---| | **Hostnames** | Extra host names of the application, separated by commas | | **Docker: enable release mode** | Runs the application in release mode | | **Docker: enable custom docker-compose.yaml** | Uses the `docker-compose.yaml` file of the project | | **Docker: use logs directly from the docker container** | Shows the logs of the container | | **Custom SSL certificate name** | The name of your own certificate, for example `apps.yourdomain.com` | All options are listed in [Project options](../../reference/project-options/). --- title: Edit and save files project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/edit-files/ updated: 2026-11-19T04:32:04.377Z --- # Edit and save files > Open files in tabs, save your work and get back unsaved text. Open a project, then click a file in the tree. The file opens in a new tab. ## Save a file Press `Ctrl+S`, or `Cmd+S` on macOS. Code writes the file on the server and keeps a [backup](../backups/) of it. ## Work with tabs - Click a tab to switch to that file. - Press `Alt+W` to close the current tab. - Code opens your tabs again the next time you open the project. ## Reload a file Press `F5` to load the file from the server again. ## Get back unsaved text Code keeps the text you haven't saved in your browser. When you open that file again, a message appears at the top of the editor: > The content of this file wasn't saved before. Do you want to restore it? Click **Restore** to get your text back, or **Cancel** to keep the saved version. ## Find text in the file Press `Ctrl+F`, or `Cmd+F` on macOS, type in the **Search** box above the code and press `Enter`. To search a whole project, read [Search in files](../search/). All keys are listed in [Keyboard shortcuts](../../reference/keyboard-shortcuts/). --- title: Manage files and folders project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/manage-files/ updated: 2026-11-19T04:32:09.378Z --- # Manage files and folders > Create, rename, copy, upload, unpack and remove files in a project. You manage the files of a project in the file tree on the left. ## Create a file or folder 1. Click **Create file** or **Create folder** at the bottom of the panel. 2. Enter the name, for example `notes.md`, and press `Enter`. **Create folder** also suggests the usual folders of a Total.js application. ## Use the file menu Right-click a file or a folder to open its menu. ![The menu of a file with Download file, Read info, Rename, Duplicate and Remove](/files/JanvsH2iR61f.webp) | Item | What it does | |---|---| | **Download file** | Downloads the file to your computer | | **Read info** | Shows the details of the file | | **Rename** | Lets you edit the name in the tree. Press `Enter` to confirm | | **Duplicate** | Makes a copy next to the original | | **Remove** | Deletes the item after you confirm | | **Show this folder only** | Shows only this folder in the tree | | **Create file** / **Create directory** | Creates an item inside the folder | Known folders offer shortcuts too. The menu of `definitions`, for example, has **Create: init.js** and **Create: auth.js**. ## Upload files Drag files from your computer onto a folder in the tree. One upload can have up to 50 MB. ## Unpack an archive Right-click a `.zip` file and choose **Unpack**. The files appear next to the archive. --- title: Search in files project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/search/ updated: 2026-11-19T04:32:09.378Z --- # Search in files > Find text across all the files of a project. Search looks through the text files of the open project. 1. Press `Ctrl+Shift+F`, or `Cmd+Shift+F` on macOS. You can also click **Search** in the Additional panel. 2. Type the text and press `Enter`. 3. Click a result to open the file at that line. ![The Search panel with results grouped by file](/files/Janvse34R61f.webp) The results are grouped by file, and each one shows its line number. --- title: Edit together project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/collaborate/ updated: 2026-11-19T04:32:04.377Z --- # Edit together > Work on the same file at the same time as your colleagues. Two people can edit the same file at the same time. Nothing needs to be turned on. 1. Open the same project and the same file as your colleague. 2. Start typing. You see your colleague's text appear as they type, along with a cursor labelled with their ID. The initials of the people in the project appear at the top right and in the status bar. Click **Users** at the bottom of the project panel to see who is online. Save the file when you finish. Unsaved shared text is not on the server yet. --- title: Restore a file from a backup project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/backups/ updated: 2026-11-19T04:32:04.377Z --- # Restore a file from a backup > Go back to an earlier version of a file. Each time you save a file, Code keeps a backup of it. The option **Backup all modified files** of the [project](../../reference/project-options/) controls this, and it is on by default. ## Restore a file **1.** Open the file. **2.** Click **Backups** in the Additional panel. You can also click the time of the last change in the status bar. **3.** Click the version you want. ![The Backups panel with one saved version, its date and its author](/files/Janvrd26R61f.webp) **4.** Check the text in the editor. **5.** Press `Ctrl+S`, or `Cmd+S` on macOS, to save it. The version only replaces the text in the editor. The file on the server stays the same until you save. ## Restore only a part of a file 1. Select the lines you want to bring back. 2. Click the version in the **Backups** panel. Code replaces only the selected lines. ## Delete the backups of a project 1. Open **Projects** in the main bar. 2. Check the project. 3. Click **Selected** and choose **Clear backups**. 4. Confirm your choice. This deletes every backup of the project and can't be undone. --- title: Work with branches project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/branches/ updated: 2026-11-19T04:32:04.377Z --- # Work with branches > Keep separate versions of a project and switch between them. A branch is a saved copy of the whole project folder. Branches are part of Code and are separate from Git. The name of the current branch appears under the project name. The main branch is called **master**. ![The Branches window with the Create a new branch link and the master branch](/files/Janvrg29R60f.webp) ## Create a branch 1. Open a file in the project. 2. Click **Branches** next to the editor options. 3. Click **Create a new branch**. 4. Enter a name and press `Enter`. 5. Confirm with **Create branch**. Code moves you to the new branch. ## Switch to another branch 1. Click **Branches**. 2. Click the branch. 3. Confirm with **Change branch**. Code stores the files of the current branch and loads the files of the other one. A file that you add on one branch stays in the folder when you switch. Remove it by hand if you don't want it on the other branch. ## Remove a branch 1. Click **Branches**. 2. Click the trash icon next to the branch. 3. Confirm with **Remove branch**. You can't remove the branch you are working on. --- title: Browse used parts project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/used-parts/ updated: 2026-11-19T04:32:09.378Z --- # Browse used parts > See the routes and other parts that are used in your code. **Used parts** gives you a quick overview of what the open file contains, such as its routes and its to-do notes. 1. Open a file. 2. Press `F2`, or click **Used parts** in the Additional panel. The panel lists the parts it finds in the code. **Download documentation** at the top of the panel opens a documentation page of the project. --- title: Track to-dos in your code project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/todo/ updated: 2026-11-19T04:32:09.378Z --- # Track to-dos in your code > Collect the notes you leave in your code in one list. Code collects the notes you leave in comments and lists them for you. ## Write a note Add a marker to a comment in your code: ```js // @todo add a welcome message // @fixme read the items from a database // @note the model is valid here ``` ## Open the list Click **To-Do list** at the top right of the screen, or choose **To-Do list** in the editor options. ![The To-Do list with a note from the file controllers/default.js and its line number](/files/Janvsm3AR61f.webp) Each note shows its file and line number. --- title: Run scripts project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/run-scripts/ updated: 2026-11-19T04:32:09.378Z --- # Run scripts > Start JavaScript and shell scripts from the editor. You can run a `.js` or `.sh` file of a project and read its output in a window. ## Allow scripts in the project An administrator turns this on once for each project. 1. Open **Projects** in the main bar and click the project. 2. Check **Enable service mode** and **Allow scripts**. 3. Click **SAVE**. ## Run a script 1. Open the `.js` or `.sh` file. 2. Press `Ctrl+B`, or `Cmd+B` on macOS. You can also right-click in the code and choose **Run script**. A window shows the output of the script. `--END--` and the running time appear when it finishes. ![A window with the output of a script, the END mark and the running time](/files/Janvsb31R60f.webp) A script runs on the server with the same rights as Code. Run only scripts you trust. --- title: Test APIs with .api files project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/api-requests/ updated: 2026-11-19T04:32:04.377Z --- # Test APIs with .api files > Write HTTP requests in a file and send them from the editor. A file with the `.api` extension holds HTTP requests that you can send from the editor. ## Write a request Create a file such as `requests.api`: ```text // Requests of my application $host : https://www.example.com GET $host/ping/ POST $host/api/items/ Content-Type: application/json { "name": "Demo item" } ``` - A line with `$name : value` defines a variable. - `$name` in a request is replaced by its value. - Lines that start with `//` are comments. - Headers go under the first line of the request, and the body comes after them. ## Send a request 1. Select the lines of one request. 2. Press `Ctrl+B`, or `Cmd+B` on macOS. The **Output panel** opens with the status, the headers and the response. ![An .api file with a selected request and its response in the Output panel](/files/JanvrY21R60f.webp) Click **Clear output** to empty the panel. --- title: Read application logs project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/logs/ updated: 2026-11-19T04:32:09.378Z --- # Read application logs > Open the log file of a project in the editor. Press `F10` to open the log of the current project in a window. You can also choose **Show log file** in the editor options. ![The Logs window with two lines of a log file](/files/JanvsD2fR60f.webp) Click the trash icon in the window to empty the log file. ## Use another log file Code reads `logs/debug.log` in the project folder. To show another file, enter its path in **A path to log file** in the [project options](../../reference/project-options/). --- title: Browse a PostgreSQL database project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/db-viewer/ updated: 2026-11-19T04:32:04.377Z --- # Browse a PostgreSQL database > Open the DB viewer from a connection string in your code. The DB viewer opens a PostgreSQL database in a window of the editor. ## Who can use it Administrators can always open it. For other people, an administrator checks **Allow to open DB viewer** in the [user form](../manage-users/). ## Open the viewer **1.** Open the file that holds the connection, for example `config`. The line must have a name in front of the address: ```text database : postgresql://user:password@localhost:5432/database ``` **2.** Select the whole line. **3.** Right-click the selection and choose **Open DB viewer**. ## Run a query The window has a box for your query. 1. Type the SQL query. 2. Click **Run query**, or press `Ctrl+Enter` (`Cmd+Enter` on macOS). **History** lists your earlier queries, **Options** offers ready-made SQL, and **Search in results** filters the rows you see. A query runs as soon as you start it, and the viewer doesn't ask you to confirm. Take extra care with queries that change or delete data. --- title: Translate an application project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/translate/ updated: 2026-11-19T04:32:09.378Z --- # Translate an application > Collect the texts of a project and compare resource files. Total.js applications mark translatable text with `@(...)`, for example `@(Welcome)`. Code can collect these texts for you. ## Collect the texts of one file 1. Open the file. 2. Open the editor options and choose **Localize current file**. Code copies the texts to your clipboard in the format of a resource file. If the file has no marked text, Code tells you so. ## Collect the texts of the whole project Open the editor options and choose **Localize files**. The **Diff resource** window opens with all the texts of the project in **Resource B**. ## Compare two resource files 1. Open the editor options and choose **Diff resource tool**. 2. Paste the content into **Resource A** and **Resource B**, or click **Load from the editor**. 3. Read the differences under the fields. **Insert to A** lists what Resource A is missing, and **Remove from A** lists what only Resource A has. 4. Click **Apply all to Resource A** to take over the differences, or **Copy** to copy a single line. 5. Click **Push to the editor** to replace the text of the open file with Resource A. ![The Diff resource window with the Resource A and Resource B fields](/files/Janvss3FR60f.webp) --- title: Download and synchronize a project project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/bundles-sync/ updated: 2026-11-19T04:32:04.377Z --- # Download and synchronize a project > Download the source code or a bundle, and copy files to another folder. These items are in the editor options, the gear icon to the left of the tabs. The option **Allow bundle making** of the [project](../../reference/project-options/) must be on. ## Download the project | Item | What you get | |---|---| | **Download source-code** | A `.tar.gz` archive with the project. Available to administrators | | **Download bundle locally** | An `app.bundle` file of the application | ## Synchronize with another folder You can keep a second copy of your work in another folder of the server, for example the folder of your production application. 1. Open **Projects** in the main bar and click the project. 2. Enter the folder in **Path for synchronization**. 3. Click **SAVE**. The editor options then offer two more items: | Item | What it does | |---|---| | **Save synchronized** | Copies the current file to the other folder | | **Synchronize bundle** | Creates a bundle and places it in the `bundles` folder of the other folder | --- title: Chat with your team project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/chat/ updated: 2026-11-19T04:32:04.377Z --- # Chat with your team > Send messages to everyone or to one colleague. Press `F9` or click **Chat** in the main bar to open the **Internal chat** window. ![The Internal chat window with a message from Jane Doe and a box for a new message](/files/Janvrl2ER61f.webp) The bar at the top of the window has one channel for everybody and one for each colleague. 1. Click a channel. 2. Type your message. 3. Press `Enter` to send it. --- title: Keep notes in the clipboard project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/clipboard/ updated: 2026-11-19T04:32:04.377Z --- # Keep notes in the clipboard > Store a personal note on the server. The clipboard is a personal notepad. Its text is saved on the server, so it follows you to any browser where you sign in. 1. Press `F11`, or choose **Clipboard** in the editor options. 2. Type or paste your text. Code saves the text by itself while you type. --- title: Track your time project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/time-tracking/ updated: 2026-11-19T04:32:09.378Z --- # Track your time > See the time spent on each project and add hours by hand. Code counts your working time when you save files. ## See the time of a project Click **Time spent** in the Additional panel. You see the hours of the open project for each month and person. ## Add hours by hand 1. Press `F1`. 2. Type `hours` and the number of hours, for example `hours 2`. 3. Press `Enter`. ## See the time of all projects Administrators open **Time spent** in the main bar. The report shows the hours for each project and person, month by month. ![The Time spent report for one month with the hours of a project and a person](/files/Janvsi37R60f.webp) To start counting a project from zero, check **Reset time spent** in the [project options](../../reference/project-options/). --- title: Create a project wiki project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/wiki/ updated: 2026-11-19T04:32:09.378Z --- # Create a project wiki > Generate a page that describes the API of a project. Code can read a project and write a wiki page about its endpoints. 1. Open the project and a file in it. 2. Open the editor options and choose **Create Wiki**. Code creates the page and copies its link to your clipboard. Create the wiki again whenever you want to refresh the page. The link opens the page without signing in. Share it only with people who should read it. --- title: Manage users project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/manage-users/ updated: 2026-11-19T04:32:09.378Z --- # Manage users > Add, change, block and remove the users of Total.js Code. Administrators manage the accounts on the **Users** screen. Open **Users** in the main bar. ![The Users screen with a list of two users and the Add, Export / Import and Selected buttons](/files/JanvsK2lR60f.webp) ## Add a user 1. Click **Add**. 2. Fill in **ID**, **Name**, **Email address** and **Password**. In **Email address**, replace the `@` that is already in the field. **Generate password** creates a password for you. 3. Choose the options you need. 4. Click **SAVE**. 5. Give the person their email address and password. Keep passwords to 30 characters or fewer. ![The New user form with the account fields, the theme and the options](/files/JanvsM2mR61f.webp) | Option | What it does | |---|---| | **Position** | The job title shown next to the name | | **Light mode** / **Dark mode** / **Day/Night** | The look of the editor | | **User is administrator** | Gives access to Projects, Users, Time spent and Settings | | **User is blocked** | Stops the person from signing in | | **Allow to open DB viewer** | Lets the person use the [DB viewer](../db-viewer/) | | **Enable local storing of files** | Lets the desktop version keep files locally | ## Change a user Click the user in the list, make your changes and click **SAVE**. ## Remove a user 1. Check the box next to the user. 2. Click **Selected** and choose **Remove**. 3. Confirm your choice. ## Give access to projects A new user sees no projects until you add them to one. Read [Give users access to a project](../project-access/). --- title: Export and import users project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/transfer-users/ updated: 2026-11-19T04:32:09.378Z --- # Export and import users > Move user accounts from one Total.js Code instance to another. You can copy your users to another Code instance. They keep their passwords. ## Export the users 1. Open **Users** in the main bar. 2. Click **Export / Import**. 3. Copy all the text in **Data**. Blocked users are not part of the export. The text holds account data. Treat it like a password: send it over a safe channel and delete your copy when you finish. ## Import the users 1. Sign in to the other instance as an administrator. 2. Open **Users** and click **Export / Import**. 3. Replace the text in **Data** with the text you copied. 4. Click **Import**. Code adds the users whose ID doesn't exist yet. ## After the import Access to the DB viewer doesn't travel with the export. Check **Allow to open DB viewer** again for the people who need it. --- title: Give users access to a project project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/project-access/ updated: 2026-11-19T04:32:09.378Z --- # Give users access to a project > Choose which projects and folders each user works with. Administrators see every project. Other users work with the projects they are assigned to. ## Assign a user to a project 1. Open **Projects** in the main bar and click the project. 2. Scroll to **Users and permissions**. 3. In the users field, choose the people who work on this project. 4. Click **SAVE**. ## Show only some folders Use **Permissions** to narrow down what a user sees in the file tree. Write one rule per line, with the user ID and a path: ```text johndoe : /public/ ``` With this rule, John sees only the `public` folder of the project. ## Who should get an account Assignments and rules keep the editor tidy and show each person the work that belongs to them. They don't replace trust between you and your users. Give accounts only to people you trust with the server, and keep sensitive material outside Code. --- title: Change your account project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/my-account/ updated: 2026-11-19T04:32:09.378Z --- # Change your account > Update your email address, phone number, theme and password. Open **My account** in the main bar to change your own details. ![The My account form with email address, phone number, theme and the Change password option](/files/JanvsP2pR60f.webp) ## Change your details 1. Edit **Email address** or **Phone number**. 2. Choose **Light mode**, **Dark mode** or **Day/Night**. 3. Click **SAVE**. ## Change your password 1. Check **Change password**. 2. Enter your **New password**, with up to 30 characters. 3. Click **SAVE**. Use your new password the next time you sign in. --- title: Back up your Code instance project: Code version: 2.0 section: guides language: en license: MIT url: https://totaljs.es/docs/code/2-0/guides/back-up/ updated: 2026-11-19T04:32:04.377Z --- # Back up your Code instance > What to copy so that you can restore Total.js Code and your projects. Make regular copies of your Code instance, and keep them away from the server. ## What to copy | Folder | What it holds | |---|---| | `databases` in the Code folder | Users, projects, chat messages, change history and settings | | Your applications folder, `/www/www/` in the official installations | The files of your projects | | The backup folder, `/www/tmp/backup/` by default | The [file backups](../backups/) and the [branches](../branches/) | ## Keep a copy of the backups The backups inside Code protect you from a wrong edit. Keep your own copy of the backup folder as well, so you still have them if you move Code to another server or recreate its container. The location of this folder is the `backup` key of the [configuration](../../reference/configuration/). --- title: Configuration project: Code version: 2.0 section: reference language: en license: MIT url: https://totaljs.es/docs/code/2-0/reference/configuration/ updated: 2026-11-19T04:32:09.378Z --- # Configuration > The keys of the config file and the environment variables of Total.js Code. Code reads its configuration from the `config` file in its main folder. Restart Code after you change it. ## Keys of the config file | Key | Default | What it does | |---|---|---| | `name` | `Code` | The name of the instance. **Code name** in [Settings](../settings/) replaces it | | `backup` | `/www/tmp/backup/` | The folder for file backups and branches | | `autodiscover` | `/www/www/` | The folder that Code scans for projects | | `floweditor` | `https://floweditor.totaljs.com` | The address of the FlowStream designer | | `uibuilder` | `https://uibuilder.totaljs.com` | The address of the UI Builder | ## Environment variables Set these in the `environment` section of `docker-compose.yaml`, or in the environment of the process. | Variable | What it does | |---|---| | `FOLDER_WWW` | The folder of the applications on the host. Needed for [Docker projects](../../guides/docker/) | | `FOLDER_NPM` | The folder of the shared `node_modules` on the host. Needed for Docker projects | | `UID` | The identifier of this Code instance | | `ORIGIN` | The pattern for the addresses of new projects, for example `http://{0}.localhost` | | `CLOUD` | With `1`, **Add** opens the project form at once with a generated address, and the path can't be changed | | `LIMIT` | The maximum number of projects. The **Projects** screen shows the limit | ## Example ```yaml environment: - UID=code - ORIGIN=http://{0}.localhost - FOLDER_WWW=/your/local/path/apps - FOLDER_NPM=/your/local/path/node_modules - LIMIT=10 ``` --- title: Settings project: Code version: 2.0 section: reference language: en license: MIT url: https://totaljs.es/docs/code/2-0/reference/settings/ updated: 2026-11-19T04:32:09.378Z --- # Settings > Every field of the Settings screen of Total.js Code. Administrators open **Settings** in the main bar. Click **APPLY** to save your changes. ![The Settings screen with all its fields](/files/JanvtA3WR61f.webp) | Field | What it does | |---|---| | **Code name** | The name in the title of the browser window | | **URL address to the control panel** | Adds a link to this address in the main bar | | **URL address for login** | The address of an external service that signs users in. Code sends the credentials to it and the service returns a user profile or an error | | **Allow insecure SSL for requests** | Accepts invalid SSL certificates in requests that Code makes | | **API Access token** | The token of the Code API. **Generate token** creates one | | **Total.js API Token** | Turns on Code Review and the AI functions. You get the token at [account.totaljs.com](https://account.totaljs.com) | --- title: Project options project: Code version: 2.0 section: reference language: en license: MIT url: https://totaljs.es/docs/code/2-0/reference/project-options/ updated: 2026-11-19T04:32:09.378Z --- # Project options > Every field of the project form of Total.js Code. Open **Projects** in the main bar and click a project to see these options. ## Location and addresses | Field | What it does | |---|---| | **Path** | The folder of the project on the server. **Browse server** helps you find it | | **Path for synchronization** | A second folder, for example for production. See [Download and synchronize](../../guides/bundles-sync/) | | **Name** | The name of the project | | **URL to application** | The address that **Preview** opens | | **Documentation URL** | The address of the **Documentation** icon in the main bar | | **Support URL** | The support address of the project | | **Folder name** | The folder where the desktop version stores files locally | | **A path to log file** | The log to show. By default `logs/debug.log` in the project | | **Hostnames** | Extra host names, separated by commas. Works only with Docker | ## Display and files | Option | Default | What it does | |---|---|---| | **Pin the project on top** | Off | Puts the project at the top of the list | | **Hide project** | Off | Hides the project from the project lists | | **Backup all modified files** | On | Keeps a [backup](../../guides/backups/) at each save | | **Skip tmp directory** | On | Leaves `tmp` out of the file tree | | **Skip .src directory** | On | Leaves `.src` out of the file tree | | **Skip all FileStorage directories** | Off | Leaves FileStorage folders out of the file tree | | **Skip node_modules directory** | On | Leaves `node_modules` out of the file tree | | **Allow bundle making** | On | Offers the download of bundles and source code | ## Docker | Option | Default | What it does | |---|---|---| | **Docker: enable release mode** | Off | Runs the application in release mode | | **Docker: enable custom docker-compose.yaml** | Off | Uses the compose file of the project | | **Docker: use logs directly from the docker container** | Off | Shows the logs of the container | | **Custom SSL certificate name** | Empty | The domain name of your own certificate | ## Running code | Option | Default | What it does | |---|---|---| | **Enable service mode** | On | Lets you [run scripts](../../guides/run-scripts/) from the editor | | **Allow live reload** | Off | Turns on live reload for the project | | **Allow scripts** | Off | Allows scripts to run in this project | ## Users and permissions | Field | What it does | |---|---| | **Users** | The people who work on the project | | **Permissions** | Rules for the folders each person sees. See [Give users access to a project](../../guides/project-access/) | | **Custom project reference** | Your own reference for the project | ## Internal stats These options appear when you edit a project. Each one clears its data when you save. - **Reset combo scoreboard** - **Reset time spent** - **Reset changelog** --- title: Keyboard shortcuts project: Code version: 2.0 section: reference language: en license: MIT url: https://totaljs.es/docs/code/2-0/reference/keyboard-shortcuts/ updated: 2026-11-19T04:32:09.378Z --- # Keyboard shortcuts > The keys you can use in the Total.js Code editor. On macOS, use `Cmd` where the table says `Ctrl`. ## Files and panels | Keys | Action | |---|---| | `F1` | Open the command palette | | `F2` | Open **Used parts** | | `F5` | Reload the current file | | `F8` | Choose a project | | `F9` | Open the chat | | `F10` | Open the log file | | `F11` | Open the clipboard | | `Ctrl+S` | Save the file | | `Alt+W` | Close the current tab | ## Search | Keys | Action | |---|---| | `Ctrl+F` | Go to the search box of the file | | `Ctrl+Shift+F` | Search in all the files of the project | ## Editing | Keys | Action | |---|---| | `Ctrl+D` | Select the next match of the selected text | | `Ctrl+/` | Comment or uncomment the line | | `Alt+Enter` | Insert today's date | | `Ctrl+B` | Run the script, or send the selected request of an `.api` file | ## Command palette Type these in the palette that `F1` opens: | Text | Action | |---|---| | `:12` | Go to line 12 | | `hours 2` | Add two hours to your [time](../../guides/time-tracking/) | --- title: Editor menus project: Code version: 2.0 section: reference language: en license: MIT url: https://totaljs.es/docs/code/2-0/reference/editor-menus/ updated: 2026-11-19T04:32:09.378Z --- # Editor menus > What the editor options and the right-click menu of the code offer. The editor has two menus. The items change with the type of file and with your selection. ## Editor options Click the gear icon to the left of the tabs. ![The editor options menu](/files/Janvt13OR61f.webp) | Item | What it does | |---|---| | **Reload** | Loads the file from the server again | | **Find** | Goes to the search box of the file | | **Localize current file** | Copies the marked texts of the file. See [Translate an application](../../guides/translate/) | | **Restore from backup** | Opens the [backups](../../guides/backups/) of the file | | **To-Do list** | Opens the [to-do list](../../guides/todo/) | | **Output panel** | Opens the results of your requests | | **Show log file** | Opens the [log](../../guides/logs/) | | **Clipboard** | Opens your [notes](../../guides/clipboard/) | | **Localize files** | Collects the marked texts of the project | | **Diff resource tool** | Compares two resource files | | **Download source-code** | Downloads the project. See [Download and synchronize](../../guides/bundles-sync/) | | **Create Wiki** | Creates a [wiki page](../../guides/wiki/) | | **Download bundle locally** | Downloads a bundle of the application | ## Right-click menu Select some text and right-click it. ![The right-click menu of a selection](/files/Janvt33PR60f.webp) ### Encode Replaces the selection with its encoded form: **Base64**, **Hex**, **Encode URI**, **Escape**, **Slug**, **HASH**, **Localize**, **MD5**, **SHA-1**, **SHA-256**, **SHA-512**, **CRC-32**, **CRC-32 unsigned**, **JSON escape** and **Optimize for search**. ### Decode Replaces the selection with its decoded form: **Hex**, **Base64** and **Decode URI**. ### Minify code Makes the selection shorter: **JavaScript**, **HTML**, **CSS** and **JSON**. ### Tools | Item | What it does | |---|---| | **Upper Case** | Changes the selection to capital letters | | **Lower Case** | Changes the selection to small letters | ### Insert Adds a value at the cursor: **UID**, **UID random**, **UID16**, **GUID**, **Token**, **Password**, **URL / Hostname**, **IP address - my** and **Date / Time**. ### Other items | Item | What it does | |---|---| | **Comment** | Turns the selected lines into comments | | **Sort** | Sorts the selected lines | | **Run script** | [Runs](../../guides/run-scripts/) the current `.js` or `.sh` file | | **Open DB viewer** | Opens the [DB viewer](../../guides/db-viewer/) for the selected connection | The **AI** items and **Code review** need a **Total.js API Token** in [Settings](../settings/). --- title: Signing in project: Code version: 2.0 section: faq language: en license: MIT url: https://totaljs.es/docs/code/2-0/faq/signing-in/ updated: 2026-11-19T04:32:04.377Z --- # Signing in > Answers to common questions about signing in to Total.js Code. ## Why does Code say "Your IP has been blocked"? Code counts the sign-in attempts from each address. After five attempts, the next one is refused with this message. Wait 15 minutes and try again. ## I forgot my password. What can I do? Ask an administrator to open **Users**, click your account, enter a new password and click **SAVE**. ## Why does Code say "Your account has been blocked"? An administrator has checked **User is blocked** on your account. Ask an administrator to clear the option. ## Why did Code stop and show "Paused coding"? Code pauses after about eight minutes without a click or a key press. Click **PLAY WITH CODE** or press any key to continue. ## Why can't I see the sign-up form? The form appears only while Code has no users. After the [first administrator](../../guides/first-administrator/) exists, an administrator [creates the other accounts](../../guides/manage-users/). --- title: Projects and Docker project: Code version: 2.0 section: faq language: en license: MIT url: https://totaljs.es/docs/code/2-0/faq/projects/ updated: 2026-11-19T04:32:04.377Z --- # Projects and Docker > Answers to common questions about projects in Total.js Code. ## Do I need a database? No. Code keeps its own data in files. PostgreSQL is only needed if you want to [browse your own database](../../guides/db-viewer/). ## Why does Code say "Docker engine is not activated"? `FOLDER_WWW` and `FOLDER_NPM` are not set. Add them to the environment of Code and restart it. See the [configuration](../../reference/configuration/). ## Why did a project I unregistered come back? Its folder is still in the applications folder, so the automatic scan added it again. Move the folder elsewhere. See [Unregister or remove a project](../../guides/remove-project/). ## Why does nothing happen when I press Ctrl+B on a script? The project needs **Enable service mode** and **Allow scripts**. See [Run scripts](../../guides/run-scripts/).