Configuration

Introduction

VitoDeploy uses environment variables to configure the app.

If you've installed VitoDeploy on a VPS, You should see a .env file in the root of the project ( /home/vito/vito/.env). It is a normal Laravel env file which you can modify some of them.

If you are using the Docker version, you need to update the environment variables of your container.

App URL

It is crucial to set the APP_URL environment variable to your Vito instance URL to ensure that features like Vito Logs work properly.

Email

To enable Vito to send you emails, You need to configure your mail server. Modify the following on the .env file

DOTENV
MAIL_HOST={YOUR-SMTP-HOST}
MAIL_PORT={YOUR-SMTP-PORT}
MAIL_USERNAME={YOUR-SMTP-USERNAME}
MAIL_PASSWORD={YOUR-SMTP-PASSWORD}
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS={YOUR-SMTP-MAIL-ADDRESS}

And then run the following commands inside the root directory of the project to apply the changes

Shell
php artisan optimize:clear
php artisan optimize
sudo supervisorctl restart worker:*

For docker version you will need to restart/re-create the container.

Currently Vito supports only SMTP as the mail driver

Other Environment Variables

Beyond the basics, a few additional variables let you tune your instance. Most installs never need to change these.

VariableDefaultDescription
SSH_USERvitoThe Linux user Vito creates and uses to connect to managed servers.
APP_PORT8000The port the application listens on (Docker / local installs).
APP_DEMOfalseEnables demo mode, which disables destructive and instance-level actions (server creation, plugins, import/export).
RESTRICTED_IP_ADDRESSES(empty)Comma-separated list of IP addresses that are not allowed as server IPs.
KEY_PAIRS_DISKkey-pairsFilesystem disk used to store server SSH key pairs.
SERVER_LOGS_DISKserver-logsFilesystem disk used to store server logs.
SSH_PUBLIC_KEY_NAMEssh-public.keyFilename of the instance's SSH public key.
SSH_PRIVATE_KEY_NAMEssh-private.pemFilename of the instance's SSH private key.

Force HTTPS

To force HTTPS on your Vito instance, you need to set the FORCE_HTTPS environment variable to true in the .env file.

DOTENV
FORCE_HTTPS=true

This will activate the URL::forceScheme('https') or URL::forceHttps() in the Laravel application, ensuring that all URLs generated by the application use HTTPS.

Realtime WebSocket

In v4.x Vito uses a built-in WebSocket server to push live updates to the UI. It works out of the box, but the following environment variables let you configure and harden it.

WS_BROADCAST_SECRET is the secret used to authenticate broadcasts to the WebSocket server. If it is not set, Vito falls back to APP_KEY and logs a deprecation warning.

Setting a dedicated secret is recommended so your APP_KEY is not reused for broadcasting (which reduces the risk of it leaking through logs or monitoring tools). Set it to a long random string:

DOTENV
WS_BROADCAST_SECRET={A-LONG-RANDOM-STRING}

You can generate one with:

Shell
openssl rand -base64 32

WS_ALLOWED_ORIGINS

WS_ALLOWED_ORIGINS is a comma-separated list of origins allowed to connect to the WebSocket server, used to prevent cross-site WebSocket hijacking. It defaults to your APP_URL.

DOTENV
WS_ALLOWED_ORIGINS="${APP_URL}"

WS_URL

Set WS_URL if the WebSocket endpoint the browser connects to differs from your APP_URL, for example during local development.

DOTENV
WS_URL=http://localhost

WS_HOST and WS_PORT

These control the address the WebSocket server binds to on the host. They default to 127.0.0.1 and 8085 respectively, and usually do not need changing.

After changing any of these values, apply the changes by running the following inside the project root (or restart/re-create the container for the Docker version):

Shell
php artisan optimize:clear
php artisan optimize
sudo supervisorctl restart worker:*