Skip to content

Installer sets APP_URL to IPv6 on OVH VPS #10

@vikaar996

Description

@vikaar996

Hi,

During installation on an OVH VPS (Ubuntu 24.04) I ran into an issue.
I haven’t tested this on other providers.

The installer sets APP_URL, REVERB_HOST and VITE_REVERB_HOST using:

curl icanhazip.com

On OVH this returns an IPv6 address, which is written directly into .env, e.g.:

This later causes Laravel to fail with:

**Invalid URI: Host is malformed**

(e.g. when running php artisan laranode:create-admin).

What I changed (works OK)

I replaced the IP detection with a safe IPv4 default and everything works correctly:

sed -i "s#DB_PASSWORD=.*#DB_PASSWORD=\"$LARANODE_RANDOM_PASS\"#" ".env"
sed -i 's#APP_URL=.*#APP_URL="http://127.0.0.1"#' ".env"
php artisan key:generate
php artisan migrate
php artisan db:seed
php artisan storage:link
php artisan reverb:install

sed -i 's#VITE_REVERB_HOST=.*#VITE_REVERB_HOST=127.0.0.1#' ".env"
sed -i 's#REVERB_HOST=.*#REVERB_HOST=127.0.0.1#' ".env"

Suggestion

Avoid using public IP detection during install and use a safe default (localhost / hostname) instead.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions