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.
tuna service
tuna service install -- tuna http 8080
tuna service list
tuna service logs -f
tuna service restart
tuna service uninstall
Subcommands
| Command | Description |
|---|---|
tuna service edit | Change the command of a service and restart it. |
tuna service install | Install and start a service. |
tuna service list | List installed services. |
tuna service logs | Show service logs. |
tuna service restart | Restart a service. |
tuna service start | Start a service. |
tuna service status | Show service status, exit code 1 if it is not running. |
tuna service stop | Stop a service. |
tuna service uninstall | Stop 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.
tuna service edit -- tuna [type] [flags]
tuna service edit -- tuna http 8081 --subdomain=web
tuna service edit --name db -- tuna tcp 5433
| Flag | Description |
|---|---|
--name string | Service name. Default: tuna. |
tuna service install
Install and start a service.
tuna service install -- tuna [type] [flags]
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
| Flag | Description |
|---|---|
--name string | Service name. Default: tuna. |
--user string | Run a system service as this user. |
tuna service list
List installed services.
Alias: ls.
tuna service list [flags]
| Flag | Description |
|---|---|
--json | Output in JSON format. |
tuna service logs
Show service logs.
tuna service logs [flags]
tuna service logs
tuna service logs --name db -f
tuna service logs -n 500
| Flag | Description |
|---|---|
-f, --follow | Follow new lines. |
-n, --lines int | Number of last lines to show. Default: 100. |
--name string | Service name. Default: tuna. |
tuna service restart
Restart a service.
tuna service restart [flags]
| Flag | Description |
|---|---|
--name string | Service name. Default: tuna. |
tuna service start
Start a service.
tuna service start [flags]
| Flag | Description |
|---|---|
--name string | Service name. Default: tuna. |
tuna service status
Show service status, exit code 1 if it is not running.
tuna service status [flags]
| Flag | Description |
|---|---|
--name string | Service name. Default: tuna. |
tuna service stop
Stop a service.
tuna service stop [flags]
| Flag | Description |
|---|---|
--name string | Service name. Default: tuna. |
tuna service uninstall
Stop and remove a service, revoke its token.
tuna service uninstall [flags]
| Flag | Description |
|---|---|
--name string | Service name. Default: tuna. |
Global flags work too.