tarantoolctl man page

tarantoolctl — an utility to control tarantool instances


vim /etc/tarantool/instances.enabled/my_instance.lua
tarantoolctl start my_instance
tarantoolctl stop  my_instance
tarantoolctl logrotate my_instance


The script is read "/etc/sysconfig/tarantool" or "/etc/default/tarantool". The file contains common default instances options:

$ cat /etc/default/tarantool
-- Options for Tarantool
default_cfg = {
    -- will become pid_file .. instance .. '.pid'
    pid_file    =   "/var/run/tarantool",
    -- will become wal_dir/instance/
    wal_dir     =   "/var/lib/tarantool",
    -- snap_dir/instance/
    snap_dir    =   "/var/lib/tarantool",
    -- vinyl_dir/instance/
    vinyl_dir  =   "/var/lib/tarantool/vinyl",
    -- logger/instance .. '.log'
    logger      =   "/var/log/tarantool",
    username    =   "tarantool",
instance_dir = "/etc/tarantool/instances.enabled"

The file defines "instance_dir" where user can place his applications (instances).

Each instance can be controlled by "tarantoolctl":

Starting instance

tarantoolctl start instance_name

Stopping instance

tarantoolctl stop instance_name

Logrotate instance's log

tarantoolctl logrotate instance_name

Enter instance admin console

tarantoolctl enter instance_name


tarantoolctl status instance_name

Check if instance is up.

If pid file exists and control socket exists and control socket is alive returns code 0.

Return code != 0 in other cases. Can complain in log (stderr) if pid file exists and socket doesn't, etc.

separate instances control

If You use SysV init, You can use symlink from "tarantoolctl" to "/etc/init.d/instance_name[.lua]". "tarantoolctl" detects if it is started by symlink and uses instance_name as "`basename $0 .lua`".


2017-01-12 --name=tarantoolctl tarantoolctl instances control