Skip to content
Why use
On this page
Accessing Isolated Forge Sites
With User Isolation enabled, each site runs under its own unique system user. To manage these sites via CLI, you must first identify the username and then switch to that user after connecting.
1. Find the Username in Forge
Before logging in, you need to identify which user "owns" the site:
- Log into your Laravel Forge dashboard.
- Select the Server, then click on the specific Site.
- On the Site Overview page, look for the Site User on the right hand side under details.
- Copy this username (e.g.,
site_user_123).
2. SSH into the Server
Connect to your server using the primary forge user:
bash
ssh forge@your-server-ip3. Switch to the Site User
Switch to the site-specific user using the -l (login) flag. This ensures the user's home directory, .bashrc, and environment variables (like the correct PHP version) are loaded.
bash
sudo su -l site_user_123Why use -l?
- Environment: It loads the user's specific
$PATH. - Directory: It automatically moves you to that user's home directory.
- Permissions: Any files you create (logs, cache, uploads) will be owned by the site user, not
rootorforge.
🛠 Troubleshooting & Navigation
- Verify Identity: Run
whoamito confirm you are logged in as the site user. - Exit: Type
exitto drop back to the forge user, and exit again to close the SSH connection.