I’m setting up a Linux system to build websites on. Can you tell me if the Local by Flywheel will work on a Linux computer or is it only for PC?
There is a Linux version, but it has problems just like the Windows version, and documentations is worse.
If you go to https://localwp.com/ and click on ‘Download for free’ you can choose between a Debian/Ubuntu or Red Hat/Fedora version. Unfortunately it dies for me on Linux Mint Cinnamon because it tries to write to the hosts file, which is set to read-only (for good reason!) and I am waiting for a solution from the Local devs so at the moment it is a non-starter for me.
Please keep me posted when you get an answer. I’d really like to use Local as a server for my MainWP program but I’d like to make sure it works on linux before I set it all up. I’d hate for my clients to not have their websites updated because Local isn’t working properly.
My personal machine runs Ubuntu 20.04 and Local works well for me! I’ve done QA under a few other distributions as well and haven’t encountered anything significant.
Allowing Local to write to the Hosts file is the only way that Local can notify the computer to point a browser to the WordPress site that Local manages. Without modifying the hosts file, the computer has no way of knowing that something like
example.local should go to the WordPress site on your computer.
By letting Local edit the Hosts file, you’re basically letting it handle the tedious task of updating that file manually.
You don’t have to let Local manage those site domains for you. In that case, you have two options:
Manually add each Local site’s domain to the hosts file. The lines that Local adds look something like this:
Set Local to use the
localhostRouter Mode. This basically turns off the site-domains for the Local sites, and reduces some of the functionality, but it means that Local doesn’t need to write to the Hosts file. More info on the “Router Mode” setting can be found in this help doc:
Hope that helps clarify why Local needs to be able to edit the Hosts file @PortMacOnline!
As for getting MainWP up and running – that should work within a Local site, but I’ve seen some people have issues that usually revolve around needing to get a correct path to the
openssl.cnf file. Here’s a topic that goes into that for Mac:
For your case @huskylogic – I’ve never tried setting up MainWP under Linux, so it would be cool if you posted a reply here in the forums with anything you find when taking it for a spin!
I’ve downloaded Local on my Linux Mint computer but haven’t installed it yet. I’m a college professor and we are at the end of term so I’m swamped with grading, but will be playing around with it this afternoon. I will let you know what I find.
Yes, that answers that question, but if I change the permissions to ‘Read and Write’ then every man and his dog can also access the file! So my question remains – what do I need to add to the hosts.allow file to allow Local to access the hosts file but not the bad guys?
I don’t think there’s an easy way of only allowing the Local process to edit that file with the way that Local is currently built, but I also don’t think it’s as big of a security issue under Linux.
To recap what Local is doing specifically – when you create a new site, Local will prompt for your system’s password. This is basically Local running
sudo in order to edit that hosts file and add the appropriate domains for the new site.
Since this is in the context of Linux, the user roles and permissions are in a much better place than for something like Windows where you typically are locking down everything with a third party application like an Antivirus.
Because this is Linux, usually, the hosts file is owned by root, and has read/write permissions set only for the owner, and then just regular read permissions for group and everyone else.
For example, here’s what my hosts file permissions look like under my Ubuntu 20.04 box:
ls -alh /etc/hosts -rw-r--r-- 1 root root 993 Apr 8 10:13 /etc/hosts
I suppose it might be slightly more secure to have the hosts file be read-only even for
root, but on the other hand, if the system has been compromised such that another user is able to edit a root-owned file, then you probably have bigger problems to worry about than accessing the incorrect IP address for a given domain.
The hosts file on my Ubuntu installation does get properly written by Local, but the site never downloads.
If downloading of the site files fails but the database succeeds, it could be due to the dependency on rsync. After installing rsync I was ablle to get the site clone to complete.
Thanks for your reply. That is not the issue. rsync is pre-installed and active on Ubuntu.