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

Cdev9's avatar
Level 1

Your app key is missing GENERATE APP KEY

New to laravel, on shared hosting, can not use SSH to connect and generate key, button not working: Something went wrong. Please try refreshing the page and try again.

Am I sol?

Thanks for any help

0 likes
8 replies
tykus's avatar

How did you set the environment variables for your production server?

tykus's avatar

@Cdev9 so how do you copy the file(s) to the server; do you use git, FTP or some file manager on the shared host? By default, .env is gitignored, so it won't have been in the repo.

Anyway, upload a version of .env with an APP_KEY set, or if there is a file manager/file editor offered by the shared host, you could generate the key locally and copy it to the server

rahmat_jafari's avatar

which host for elect your host? you must laravel framwork for host not linux host or etc. for example in linux host not work ssh or any command for connect to your files in site.

Cdev9's avatar
Level 1

@tykus

i can use any of those. Where do I get the app key? I can't get the "generate app key " button to work, keep getting an error and I can't use ssh

tykus's avatar

@Cdev9 just generate an APP_KEY locally in your development environment and copy/paste it into the server's .env file using the file manager/editor

php artisan key:generate
Cdev9's avatar
Level 1

@tykus Thanks. Trying that now, apparently I need to install a bunch of things first..

Please or to participate in this conversation.