Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Mithridates's avatar

Deploy laravel with Rocketeer

I've installed Rocketeer in my vagrant machine.
Now It's time for deployment.
My vps is set to be connected via SSH.
I have IP,port, username, and the password.
And How do I deploy my app to the vps?
I'm using laravel for sure.
My problem is apparently I can't config the files.

0 likes
4 replies
fideloper's avatar

We can't guess what configuration you're using - you'll need to share any error messages you get and relevant configuration you're using.

Mithridates's avatar

@fideloper tnx for answer.
this is my config.php file for connections:

'connections' => [
        'production' => [
            'host' => 'xxx.xxx.xxx.xxx',
            'username' => 'root',
            'password' => 'password',
            'key' => '/home/vagrant/.ssh/id_rsa',
            'keyphrase' => '',
            'agent' => '',
            'db_role' => true,
        ],
    ],

I've been developing in vagrant with local VCS with no remote repository.
I'm also a windows user. I've copied that rsa key from my windows to vagrant which points is being pointed above.
when I comment
'key' => '/home/vagrant/.ssh/id_rsa', 'keyphrase' => '', 'agent' => '', 'db_role' => true, It works as it should. But if I uncomment these lines it gives me the errors that Can not connect to remote server

Mithridates's avatar

Oh! I've installed rocketeer on vagrant. Should I have installed it on vps?!
Why there isn't a good tutorial for deploy laravel app with this tool :(

fideloper's avatar

I think you have a few gaps in knowledge that's making this harder.

  1. Your Vagrant machine has an ssh key pair (~/.ssh/id_rsa and ~/.ssh/id_rsa.pub). The public key content (id_rsa.pub) on the vagrant machine needs to be in the ~/.ssh/authorized_keys file of the user you're using to connect to on your VPS (production server). Since you're connect to user root, that's the root user's .ssh/authorized_keys file. If you were going to login using another user other than root, then you'd have to add that vagrant machine's id_rsa.pub file content to that remote users's authorized_keys file as well.

  2. You're connecting as user root to your VPS. That might be fine, but Rocketeer might be expecting you to use a non-root user. I'm guessing it creates directories / puts files of your site into the home directory of the user you're connecting as (I'm not sure, perhaps that's configurable).

  3. Your web server (the vps) will need to know where your site files are, which might mean configuring your apache/nginx.

  4. Your web server (the VPS) may need access to your github repository (the ability to clone / pull from the repository)

1 like

Please or to participate in this conversation.