Im using homestead with NFS, too, using the default config for sessions in homestead, file driver in /var/lib/php5/sessions, outside of the NFS mount point, with no issues at all.
You need to do it in the NFS ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Today I ran into a weird issue where session data would randomly get lost between redirects. I eventually tracked it down to using a File session driver over a shared drive between my host machine and a Homestead box. I've opted to use NFS to speed up the mapped drive so I'm not sure if this happens with the standard network mapping as well.
I think the problem is caused due to a race condition in that the new page is redirected to and requested by the browser before the session is written to file, hence the randomness of it all. Changing the session and cache driver to memcached for example solves the problem.
I'm a seasoned developer (new to Laravel though) so I was able to solve the problem within minutes, but a beginner would potentially struggle for hours or even days given the inconsistency of the problem. Is there a way that perhaps new sites generated with the laravel new command could configure the default "file" cache and session driver with memcached or redis in the .env file? If not, then the issue I think should be displayed more prominently somewhere.
Please or to participate in this conversation.