envoy execute with web server privileges usually (www-data) try to execute like this
sudo su -u www-data envoy run deploy
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I created envoy file in my laravel 5.7 app, but running on my local comp it I got error :
$ envoy run deploy
PHP Warning: file_get_contents(/home/user/.ssh/config): failed to open stream: Permission denied in /home/user/.composer/vendor/laravel/envoy/src/SSHConfigFile.php on line 33
[email protected]'s password:
Are that wrong access on my local system ?
Which commands have I to run ?
Thanks!
envoy execute with web server privileges usually (www-data) try to execute like this
sudo su -u www-data envoy run deploy
I tried to run you command, but got error :
$ sudo su -u www-data envoy run deploy
su: invalid option -- 'u'
Usage: su [options] [LOGIN]
...
I made several attempts also, but failed :
$ sudo su www-data envoy run deploy
This account is currently not available.
$ sudo su lardeployer envoy run deploy
sh: 0: Can't open envoy
Could you please provide a link, where these options are described ? I do not see at https://laravel.com/docs/5.7/envoy
Can you show your .env file and your database.php?
my .env :
APP_NAME="The Box Booking"
NOREPLY_EMAIL= '[email protected]'
SUPPORT_SIGNATURE= 'Best Regards,<br> Support of The Box Booking'
APP_ENV=local
APP_KEY=base64:qtoXMAngtHCS8A+oa4DeIlGn7uTs/+HvXIRhXHy/uLo=
APP_DEBUG=true
APP_URL=local-boxbooking2.com
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=Boxbooking2_DEV
DB_USERNAME=root
DB_PASSWORD=1
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=sendgrid
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
SENDGRID_API_KEY = 'XXXX'
and config/database.php :
<?php
return [
'default' => env('DB_CONNECTION', 'mysql'),
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],
],
'migrations' => 'migrations',
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DB', 0),
],
'cache' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
],
];
Keep that DB_PASSWORD=1 as blank
DB_PASSWORD=
envoy run deploy
under root?
I did not find to these questionbs in the docs https://laravel.com/docs/5.7/envoy
If your in live server fill this in database.php. I am assuming that your are using mysql.
'database' => env('DB_DATABASE', 'Boxbooking2_DEV'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', '1'),
Please or to participate in this conversation.