Skip to content
Olivier van Helden edited this page Nov 23, 2026 · 20 revisions

OpenSim CLI

The command line to set up and manage OpenSimulator, in bash.

OpenSim CLI is the installation and administration layer around OpenSimulator. OpenSimulator runs the virtual world; this project helps install it, configure grids and simulators, and manage them from the command line.

OpenSimulator is the simulation software itself. The OpenSim engine defines the configuration and management rules, and handles the underlying operations. The OpenSim command-line interface (CLI) provides an interactive interface, complete with prompts and commands.

Together, the CLI, the engine, and other components of the ecosystem complement the OpenSimulator core—which remains unchanged—and spare users from complex maintenance tasks, such as manually editing a series of INI files to perform basic configuration.

Why use it

A basic OpenSimulator setup can involve creating several configuration files, keeping their values consistent, preparing databases, and arranging files and permissions. The opensim setup wizard gathers the answers in one place, validates them, and asks the engine to prepare the setup. It supports a grid, a standalone simulator, or a simulator joining an existing grid.

The package installation keeps software separate from configuration and writable data, following the usual Linux filesystem layout. The configuration, persistent data, logs, and caches each have their own location, separate from OpenSimulator core, instead of sharing one catch-all directory.

Data Default location
Configuration /etc/opensim
Persistent state /var/lib/opensim
Grid and simulator data /var/lib/opensim/data
Logs /var/log/opensim
Cache /var/cache/opensim
Stable core /usr/share/opensim/0.9.3.0/
Development core (optional) /usr/share/opensim/unstable/
Custom core (optional) /path/to/your/opensim/dir

Each grid and simulator has its own configuration within this layout. Instances run under the configured system account, independently of the administrator who invokes the CLI.

What it does

  • Installs OpenSimulator and its management packages from APT on Debian and Ubuntu, including their dependencies.
  • Sets up grids, standalone worlds, and simulators that join another grid.
  • Starts, stops, restarts, enables, disables, and opens the console of instances.
  • Lists configured TCP and UDP ports and prints port-mapping or firewall rules for review.
  • Checks grid web services and prints web-server snippets.
  • Saves and loads IAR inventory and OAR region archives, and backs up configuration, data, and databases.
  • Prepares user-cleanup and estate-ban files for review.

Most commands work across multiple configured grids and simulators. See [Installation]] and Managing-Instances](./Installation and [[Managing-Instances) to get started.

Installation options

Kickstart (Debian, Ubuntu, macOS)

Download and execute kickstart.sh: it takes charge of downloading and installing the required packages. With the --setup option, it launches the initial setup, asks minimal questions, provides a complete configuration, and starts the grid and/or first simulator.

APT packages (Debian, Ubuntu, and other APT- and systemd-compliant Linux distributions)

Add apt.magiiic.com to the APT sources and install opensim-kit or individual packages:

  • opensim-kit — everything a grid needs: the packages below, the website and a database server.
  • w4os-cli — this command line (opensim).
  • opensim — latest stable core version (currently opensim-0.9.3.0).
  • opensim-unstable — latest development core.
  • OpenSim modules (DLLs):
    • opensim-0.9.3.0-gloebit
    • opensim-0.9.3.0-opensimsearch
  • w4os-helpers — web helpers for the core (search, currency, offline messages, and more).
  • w4os-site — the website of a grid, with its helpers.
  • w4os-engine — setup and management logic used by the CLI.
  • opensim-rest-php — REST API client used by the engine.

See Installation for repository setup, requirements, and commands.

git clone (all platforms... supposedly)

git clone https://github.com/way4os/w4os-cli.git
cd w4os-cli
composer install
./kickstart.sh # with --setup to configure the server immediately

When launched from a git clone directory, the CLI uses sibling ecosystem packages from Composer's vendor/ directory and fetches remaining third-party dependencies from their original sources (APT on Debian and Ubuntu, Homebrew on macOS).

See Installation for platform-specific steps.

Detailed instructions

Requirements

  • Bash 5+
  • PHP CLI 8.2+ with cURL, intl, mbstring, MySQL, and XML extensions
  • jq
  • MySQL or MariaDB server and client
  • Root access or sudo for package installation
  • ssh and scp for remote installation
  • dialog is optional; plain terminal prompts are supported

Supported and tested systems:

  • Debian 12/13 (on Debian 12, the website of a grid runs Grav 1.7 on PHP 8.2, supported until 31 December 2026: see the w4os plugin's README)
  • Ubuntu 24.04/26.04
  • macOS 13.7.8+

For command-specific help, run opensim COMMAND --help.