Skip to main content

tuna service

Manage tuna background services.

Run as root (sudo, Administrator on Windows) to install a system service, otherwise the service runs in your user session (systemd --user on Linux, LaunchAgent on macOS). Without a subcommand in a terminal opens the list of installed services.

Alias: svc.

Guide with examples: Running in the background.

Usage
tuna service
Examples
tuna service install -- tuna http 8080
tuna service list
tuna service logs -f
tuna service restart
tuna service uninstall

Subcommands​

CommandDescription
tuna service editChange the command of a service and restart it.
tuna service installInstall and start a service.
tuna service listList installed services.
tuna service logsShow service logs.
tuna service restartRestart a service.
tuna service startStart a service.
tuna service statusShow service status, exit code 1 if it is not running.
tuna service stopStop a service.
tuna service uninstallStop and remove a service, revoke its token.

tuna service edit​

Change the command of a service and restart it.

The service keeps its name, user, environment and autostart. The tunnel type cannot change: reinstall the service for that. When the address changes (--subdomain, --domain, --port), a new key is issued from the login session and the old one is revoked.

Usage
tuna service edit -- tuna [type] [flags]
Examples
tuna service edit -- tuna http 8081 --subdomain=web
tuna service edit --name db -- tuna tcp 5433
FlagDescription
--name stringService name. Default: tuna.

tuna service install​

Install and start a service.

Usage
tuna service install -- tuna [type] [flags]
Examples
tuna service install -- tuna http 8080
tuna service install --name db -- tuna tcp 5432
tuna service install -- tuna ssh
tuna service install -- tuna trigger webhook /tmp/trigger.sh
sudo tuna service install --user www-data -- tuna http 8080
FlagDescription
--name stringService name. Default: tuna.
--user stringRun a system service as this user.

tuna service list​

List installed services.

Alias: ls.

Usage
tuna service list [flags]
FlagDescription
--jsonOutput in JSON format.

tuna service logs​

Show service logs.

Usage
tuna service logs [flags]
Examples
tuna service logs
tuna service logs --name db -f
tuna service logs -n 500
FlagDescription
-f, --followFollow new lines.
-n, --lines intNumber of last lines to show. Default: 100.
--name stringService name. Default: tuna.

tuna service restart​

Restart a service.

Usage
tuna service restart [flags]
FlagDescription
--name stringService name. Default: tuna.

tuna service start​

Start a service.

Usage
tuna service start [flags]
FlagDescription
--name stringService name. Default: tuna.

tuna service status​

Show service status, exit code 1 if it is not running.

Usage
tuna service status [flags]
FlagDescription
--name stringService name. Default: tuna.

tuna service stop​

Stop a service.

Usage
tuna service stop [flags]
FlagDescription
--name stringService name. Default: tuna.

tuna service uninstall​

Stop and remove a service, revoke its token.

Usage
tuna service uninstall [flags]
FlagDescription
--name stringService name. Default: tuna.

Global flags work too.