Skip to main content

Manual

If you prefer to manually compile Termix from source, follow these steps.

Termix is light. It idles at about 118 MB of RAM, and 1 core with 1 GB covers most setups. See Benchmarks for measured usage and how much to allocate for larger fleets.

Prerequisites

  • Git
  • Node.js (v18 or higher)
  • NPM
  • Docker
  • Docker Compose
  • OpenSSL (required at PATH variable if using https)

Installation Steps

  1. Clone the repository:
git clone https://github.com/Termix-SSH/Termix.git
cd Termix
  1. Install dependencies and build the project:
npm install
npm run build
  1. Start the application:
npm run preview
tip

For production environments, we recommend running the website via Nginx. See the Nginx configuration in the Docker directory of the repository.

  1. Start the backend services:
npm run dev:backend

Building from Source

If you want to build Termix from source and create your own Docker image, follow these steps:

Build Steps

  1. Clone the repository:
git clone https://github.com/Termix-SSH/Termix.git
cd Termix
  1. Install dependencies:
npm install
  1. Build the frontend:
npm run build
  1. Build the Docker image:
docker build -t termix:latest -f docker/Dockerfile .
  1. Create a Docker Compose file to use your built image:
services:
termix:
image: termix:latest
container_name: termix
restart: unless-stopped
ports:
- '8080:8080'
volumes:
- termix-data:/app/data
environment:
PORT: '8080'

volumes:
termix-data:
driver: local
  1. Start the container:
docker-compose up -d

Database

Termix uses SQLite by default and creates it under db/data on first start. There is nothing to set up.

To use PostgreSQL or MySQL instead, create the database and a user for it, then set these before starting Termix:

DATABASE_DIALECT=postgres
DATABASE_URL=postgres://termix:yourpassword@localhost:5432/termix

Termix creates and updates its own tables on start, so there are no migration commands to run.

See Database for MySQL, TLS, and connection pool options.

Environment Variables

See docs.

Usage

Once compiled and running, Termix will be available at http://localhost:8080 (or whichever port you configured).