# Introducing Lima to Trellis for Faster Local Development

**URL:** https://discourse.roots.io/t/introducing-lima-to-trellis-for-faster-local-development/24928
**Category:** blog
**Tags:** lima, trellis-cli, trellis
**Created:** 2023-03-08T14:36:13Z
**Posts:** 73

## Post 1 by @swalkinshaw — 2023-03-08T14:36:13Z

We’ve added experimental support for Lima to Trellis, which allows us to drop VirtualBox/Parallels and Vagrant for faster local dev environments.

Read more on our blog: **[Introducing Lima to Trellis for Faster Local Development | Roots](https://roots.io/introducing-lima-to-trellis-for-faster-local-development/)**

---

## Post 2 by @MWDelaney — 2023-03-08T17:46:55Z

Testing this right now! If it’s functional and fast, this will easily replace Parallels for my whole team!

---

## Post 3 by @swalkinshaw — 2023-03-08T18:26:51Z

We don’t have documentation for this feature yet, but the PR description has all the details including setting up sudoers and how to change the Ubuntu version if necessary: [Add VM integration by swalkinshaw · Pull Request #346 · roots/trellis-cli · GitHub](https://github.com/roots/trellis-cli/pull/346)

---

## Post 4 by @huub — 2023-03-08T22:05:06Z

Hi, how can I connect to the database using Sequel Ace? Should I use SSH or socket?

---

## Post 5 by @swalkinshaw — 2023-03-08T22:15:21Z

Oh good question. You should use SSH. Here’s what my connection screen looks like:

 ![image](https://discourse.roots.io/uploads/default/original/2X/5/5073c60bcdde62dee60556cf074e37d628235841.png)

1. Yyou can find SSH host and port by running this command: `limactl ls` (but the host is always `127.0.0.1` so you just need to find the port)
2. the username is always your local machine’s macOS username.

I’ll have to see how we can improve the `trellis db open` command to better work with this.

---

## Post 6 by @nikitasol — 2023-03-08T23:28:21Z

Basic usage is very straight forward and works without any problem. I have tried moving my last work to the Lima VM and after manually updating (maybe not all were required) development hosts, /etc/hosts (deleting old ones) and wp-cli alias for development (I have used limactl show-ssh --format=cmd INSTANCE to check values, but then I saw that these can also be consulted in the lima inventory file) I have managed to pull down and sync production db.

I am not sure, but I think it would be great to have a couple of additional vm commands to help with initial setup and move to the new virtual machine? Maybe trellis vm init might be good so yml file can be reviewed and updated before initial provision? And maybe trellis vm aliases for rewriting wp-cli.yml with the new values?

---

## Post 7 by @nikitasol — 2023-03-08T23:39:23Z

Also, thanks for this move to Lima. It’s absolutely much faster and so much less frustrating than with the VirtualBox.

---

## Post 8 by @swalkinshaw — 2023-03-08T23:40:13Z

Thanks for testing it so quickly!

> [@nikitasol](#):
>
> I have tried moving my last work to the Lima VM and after manually updating (maybe not all were required) development hosts, /etc/hosts (deleting old ones) and wp-cli alias for development (I have used limactl show-ssh --format=cmd INSTANCE to check values, but then I saw that these can also be consulted in the lima inventory file) I have managed to pull down and sync production db.

Removing conflicting entries in `/etc/hosts` and `.ssh/config` might be necessary (though `vagrant down` might automatically remove those as well).

Did you mean Ansible hosts files like `hosts/development`? Lima generates its own inventory file as you saw so there’s no need to remove the existing ones.

For WP-CLI aliases, I’d recommend running `trellis alias` which will generate them all for you. Not sure if you had used that before or just manually defined them?

---

## Post 9 by @nikitasol — 2023-03-09T00:29:44Z

> [@swalkinshaw](#):
>
> Did you mean Ansible hosts files like `hosts/development`? Lima generates its own inventory file as you saw so there’s no need to remove the existing ones.
> 
> For WP-CLI aliases, I’d recommend running `trellis alias` which will generate them all for you. Not sure if you had used that before or just manually defined them?

Yes, I thought so, but I changed hosts/development ones manually after I tried running trellis alias and got into error:

```
[✘] Error generating config
Error creating WP-CLI aliases. Temporary playbook failed to execute:
[WARNING]: Platform darwin on host 192.168.56.5 is using the discovered Python
interpreter at /usr/local/bin/python3.10, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.13/reference_appendices/interpreter_discovery.html for more information.
```

The host in error was the one that was the original host ip, so I decided to change it manually to the new value. It had no effect on the trellis alias and it continued throwing the error (though showing the updated ip), so I changed the alias manually. The aliases were generated at first through trellis-cli.

---

## Post 10 by @MWDelaney — 2023-03-09T19:24:58Z

This is working great for local development, but my workflow struggles when I try to use Trellis aliases and ssh commands that work with Parallels and Virtualbox. Things like the [Sync Script](https://roots.io/products/sync-script/).

It seems like a some kind of flag containing the “current” or “last-brought-up” development environment (Vagrant or Lima), and a conditional around [this line](https://github.com/roots/trellis-cli/blob/b712e29cae78aa0c5100b37332eb5741f01850a0/trellis/ssh.go#L11) (and whatever the Go equivalent of `whoami` is), might get things working together?

---

## Post 11 by @huub — 2023-03-10T13:12:20Z

> [@swalkinshaw](#):
>
> limactl ls

Thanks, that’s works!

---

## Post 12 by @jokanane — 2023-03-12T18:14:54Z

Thanks, this looks promising!

Should `.trellis/lima` be in [trellis/.gitignore](https://github.com/roots/trellis/blob/92994573472fef684f4726503aab7e6dd749c735/.gitignore)? The generated files don’t look something to be committed.

---

## Post 13 by @adleviton — 2023-03-13T00:05:34Z

I’ve tested with one site. So far, so good. Note that I use neither `trellis new` or `trellis init` in case that makes a difference. I also changed the `LIMA_HOME` env variable so I’m working from an external drive. My site is running and was able to connect with Sequel Ace.

Questions/Comments for now:

- How can we trust local certificates (i.e. what is the new command for `vagrant trellis-cert trust`)?
- I tried changing settings in `$LIMA_HOME/.lima/_config/default.yml` (changing memory, cpus, disk size), but it seems to have no effect, even after deleting and reprovisioning. I can’t figure this out.
- A couple times, `trellis vm stop` didn’t completely exit back to command line.
- Not a big deal, but when I run `trellis vm shell`, the following errors appear:

```
bash: line 1: cd: /Volumes/External Drive/My Project/trellis: No such file or directory
bash: line 1: cd: /Users/adam: No such file or directory
```

---

## Post 14 by @nikitasol — 2023-03-13T08:19:04Z

I actually haven’t had any issue with Sync Script after manually adjusting wp-cli.yml to correctly establish ssh connection.

---

## Post 15 by @nikitasol — 2023-03-13T08:23:11Z

What I have noticed is that the port inside Inventroty (ansible\_port) is changed each time I start the machine.

And as @adleviton has mentioned, for me most of times if not all trellis vm stop ends on:

```
INFO[0001] [hostagent] /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/!code-!hex/vz/v3@v3.0.4/virtualization.go:160 +0xec
FATA[0180] did not receive an event with the "exiting" status
Error stopping VM
```

---

## Post 16 by @swalkinshaw — 2023-03-13T17:57:14Z

Yes it should be ignored. I need to figure out a better strategy for the `.trellis` directory since it’s not ideal right now. `.trellis/cli.yml` should be committed, but nothing else in there should be. I’ll likely gitignore `.trellis`, and offer a new root-level `cli.yml` config. Feedback welcome on that.

---

## Post 17 by @swalkinshaw — 2023-03-13T18:05:11Z

> [@adleviton](#):
>
> - How can we trust local certificates (i.e. what is the new command for `vagrant trellis-cert trust`)?

There’s no automated way to do that yet. I might wait for [SSL certificates refactor by swalkinshaw · Pull Request #1310 · roots/trellis · GitHub](https://github.com/roots/trellis/pull/1310) with [https://github.com/roots/trellis-cli/pull/311](https://github.com/roots/trellis-cli/pull/311)

> [@adleviton](#):
>
> - I tried changing settings in `$LIMA_HOME/.lima/_config/default.yml` (changing memory, cpus, disk size), but it seems to have no effect, even after deleting and reprovisioning. I can’t figure this out.

The generated Lima config is in `.trellis/lima/<name>.yml` but there’s two issues:

1. it will be re-generated each time you re-create a Lima instance
2. I don’t even know how or if Lima lets you change those params on an existing instance with re-creating it

Basically, I need to add support to the CLI config file so customizing those VM properties so they’ll be in the generated config. Right now only the defaults are supported as you found. If you want to try contributing that change, it shouldn’t be so hard and I could help out.

> [@adleviton](#):
>
> - A couple times, `trellis vm stop` didn’t completely exit back to command line.

I’d recommend posting an issue on [https://github.com/lima-vm/lima/issues](https://github.com/lima-vm/lima/issues) since that’s coming directly from the `vz` package that Lima uses for macOS virtualization.

Reminder: `trellis vm` mainly wraps underlying `limactl` commands so you can always run those manually too.

> [@adleviton](#):
>
> - Not a big deal, but when I run `trellis vm shell`, the following errors appear:

Yeah I get that too. Lima assumes those directories are mounted by default, but they aren’t in my integration. So there’s two options:

1. keep those mounted default dirs to satisfy Lima’s assumptions
2. customize the default shell dir which I’ll look into. I think a good default is to auto cd into `/srv/www/<main site>`

---

## Post 18 by @swalkinshaw — 2023-03-13T18:08:08Z

> [@nikitasol](#):
>
> What I have noticed is that the port inside Inventroty (ansible\_port) is changed each time I start the machine

I’m using Lima’s default method of auto finding a free SSH forwarding port. It’s good because you don’t have to worry about manually setting it or having conflicts with multiple machines, but it does mean the port isn’t stable.

For things that trellis-cli _can_ control (like `trellis db open`, which I’ll fix soon), it will automatically use the generated inventory file ensuring everything works. But for external tools like sync script, it does mean you need to update the port manually each time :sweat:

Maybe I could make an SSH port option if people want to hard code it?

---

## Post 19 by @adleviton — 2023-03-13T20:35:23Z

> [@swalkinshaw](#):
>
> The generated Lima config is in `.trellis/lima/<name>.yml` but there’s two issues:
> 
> 1. it will be re-generated each time you re-create a Lima instance
> 2. I don’t even know how or if Lima lets you change those params on an existing instance with re-creating it
> 
> Basically, I need to add support to the CLI config file so customizing those VM properties so they’ll be in the generated config. Right now only the defaults are supported as you found. If you want to try contributing that change, it shouldn’t be so hard and I could help out.

I’d like to help but not sure how or where to get started working on a CLI package. If there is a crash-course out there, let me know. For now, my confusion here comes from trying to follow their instructions for [default.yml](https://github.com/lima-vm/lima/blob/287dad68b992afb32c5f8a792beff62f8cfa965e/examples/default.yaml). Specifically this part:

```
# The builtin defaults can be changed globally by creating a $LIMA_HOME/_config/default.yaml
# file. It will be used by ALL instances under the same $LIMA_HOME, and it
# will be applied on each `limactl start`, so can affect instance restarts.
```

---

## Post 20 by @swalkinshaw — 2023-03-13T22:23:33Z

Oh… I’d actually think that should take affect since it’s defaults. I’ll look into that first.

---

## Post 21 by @nikitasol — 2023-03-15T15:57:13Z

So, if trellis-cli can be made into using ansible\_host and ansible\_port tags which are defined in inventory it would solve any issue with sync script as sync script uses wp-cli aliases to connect to db. I didn’t have to change anything there to make it work.

---

## Post 22 by @swalkinshaw — 2023-03-15T17:08:37Z

Sort of yeah. I wrote more about this here: [Add VM integration by swalkinshaw · Pull Request #346 · roots/trellis-cli · GitHub](https://github.com/roots/trellis-cli/pull/346#issuecomment-1467297125)

---

## Post 23 by @adleviton — 2023-03-19T17:48:44Z

Is this able to handle multiple sites yet? I hit this error and cannot figure out how to pass an argument? Also, there’s a typo “Please **specific** a site”.

`Error: Multiple sites found in development. Please specific a site`

And

`Error: too many arguments (expected exactly 0, got 1)`

---

## Post 24 by @swalkinshaw — 2023-03-19T19:41:43Z

That’s just running `trellis vm start`? I think I see what’s happening and it’s a bug in this case. The CLI just looks up the main site name to use as the default VM name, but it errors when it finds multiple sites which I’ll have to fix :thinking:

However, the VM automatically supports _all_ sites found in an environment (or it would if you didn’t run into that bug). So once fixed, you won’t have to specific a site.

---

## Post 25 by @adleviton — 2023-03-20T17:34:44Z

Yep - just running `trellis vm start`

---

## Post 26 by @joshb — 2023-03-20T19:18:55Z

Not compatible with Big Sur?

I tried testing this out straight away when I noticed this post and from what I recall, I received a notice stating Venture is required?

---

## Post 27 by @swalkinshaw — 2023-03-20T19:30:40Z

Correct, macOS’ new virtualization framework is Ventura/13.0+

---

## Post 28 by @jokanane — 2023-03-20T20:13:35Z

Does anyone else see the following? This env worked yesterday just fine…

```
❯ trellis vm start 
Running command => limactl start example.com
INFO[0000] Using the existing instance "example.com"        
INFO[0005] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/username/.lima/example.com/serial.log") 
INFO[0006] SSH Local Port: 49416                        
INFO[0006] [hostagent] new connection from to          
INFO[0006] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
INFO[0006] [hostagent] [VZ] - vm state change: running  
INFO[0009] [hostagent] 2023/03/20 20:51:49 tcpproxy: for incoming conn 127.0.0.1:49419, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: no route to host 
INFO[0019] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
INFO[0019] [hostagent] 2023/03/20 20:52:00 tcpproxy: for incoming conn 127.0.0.1:49424, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: connection was refused 
INFO[0030] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
INFO[0030] [hostagent] 2023/03/20 20:52:10 tcpproxy: for incoming conn 127.0.0.1:49428, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: connection was refused 
INFO[0040] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
INFO[0040] [hostagent] 2023/03/20 20:52:20 tcpproxy: for incoming conn 127.0.0.1:49437, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: connection was refused 
INFO[0050] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
INFO[0050] [hostagent] 2023/03/20 20:52:31 tcpproxy: for incoming conn 127.0.0.1:49442, error dialing "192.168.5.15:22": connect tcp 192.168.5.15:22: connection was refused
```

One other env starts ok, one other has the same problem.

I’ve found [vz: Has been stuck in Waiting for the essential requirement 1 of 3: "ssh" on Start lima · Issue #1200 · lima-vm/lima · GitHub](https://github.com/lima-vm/lima/issues/1200) but not a solution.

---

## Post 29 by @swalkinshaw — 2023-03-21T04:01:59Z

I’ve gotten that occasionally as well. Not sure of a real solution other than rebooting :sweat: Might be helpful to run `limactl start --debug example.com` and comment on that lima issue with the log output.

---

## Post 30 by @swalkinshaw — 2023-03-23T03:39:06Z

Sorry @adleviton I forgot about this, here’s a really brief breakdown of what would be required to add a config option:

1. A new field in the `VmConfig` struct: [trellis-cli/cli\_config.go at 4e07b6e4907de916f4690ae423b13c3932e36fd8 · roots/trellis-cli · GitHub](https://github.com/roots/trellis-cli/blob/4e07b6e4907de916f4690ae423b13c3932e36fd8/cli_config/cli_config.go#L19-L24)
2. corresponding field in Lima’s instance `Config` struct: [https://github.com/roots/trellis-cli/blob/4e07b6e4907de916f4690ae423b13c3932e36fd8/pkg/lima/instance.go#L37-L40](https://github.com/roots/trellis-cli/blob/4e07b6e4907de916f4690ae423b13c3932e36fd8/pkg/lima/instance.go#L37-L40)
3. pass the CLI config field to the Lima instance config: [https://github.com/roots/trellis-cli/blob/4e07b6e4907de916f4690ae423b13c3932e36fd8/pkg/lima/manager.go#LL229C34-L229C34](https://github.com/roots/trellis-cli/blob/4e07b6e4907de916f4690ae423b13c3932e36fd8/pkg/lima/manager.go#LL229C34-L229C34)

```
config := Config{
  Images: images,
  NewField: m.trellis.CliConfig.Vm.NewField,
}
```

1. Finally, output the new field in the Lima config template: [https://github.com/roots/trellis-cli/blob/4e07b6e4907de916f4690ae423b13c3932e36fd8/pkg/lima/files/config.yml](https://github.com/roots/trellis-cli/blob/4e07b6e4907de916f4690ae423b13c3932e36fd8/pkg/lima/files/config.yml)

---

## Post 31 by @matthew_ob — 2023-03-31T13:34:28Z

I’m running on an M2 and the vm start process hangs in various places and doesn’t complete 90% of the time. Sometimes a restart of the machine helps, sometimes it doesn’t. I haven’t been able to find much rhyme or reason as to what the affecting variables are. The virtual machine itself appears to be running (if I run the command again I get the “Your Trellis VM is ready to use!” message), so I assume it’s the provisioning not finishing? The etc/hosts file looks correct, when I ping the url it’s correct, it’s just that the site won’t connect in browser (very long load time followed by a connection error).

For the record when I run the process on my intel macbook everything works fine.

Any idea what the issue could be?

---

## Post 32 by @RobDobsonNC — 2023-03-31T17:03:23Z

Hi @nikitasol - sorry to be a pain, but could you possibly help me set up wp-cli.yml - I’m a little lost on the ssh path(s), nothing seems to connect properly. Thanks!

---

## Post 33 by @swalkinshaw — 2023-03-31T17:19:05Z

It’s hard to say without more specifics on “vm start process hangs in various places”. I’d suggest opening a new thread with specifics and log/terminal output.

---

## Post 34 by @matthew_ob — 2023-03-31T17:28:53Z

Okay cool, I’ll spend some time testing this afternoon and record the failure points (wish I did it at the time). Thanks!

---

## Post 35 by @RobDobsonNC — 2023-04-04T10:11:15Z

Lima is working fine for me at the moment, though I’ve found that the hot refresh takes a while to come through each time - maybe 3-4 seconds refresh. Is there something I should adjust/clear to speed this up?

---

## Post 36 by @ben — 2023-04-04T18:25:31Z

Are you referring to Sage/Bud’s dev server and hot reloading? Are you manually refreshing after 3-4 seconds or are you saying that’s how long it takes for the injection to complete after a build is triggered by saving a file?

For me personally, theme builds happen instantly and no longer give me any kind of trouble with delays since there isn’t NFS file syncing issues like with Vagrant.

It would be helpful to make a new topic with more details to troubleshoot that specifically so that this topic can stay more relevant to any Trellis specific issues.

---

## Post 37 by @vburlak — 2023-04-09T21:02:07Z

While starting Lima: `trellis vm start` on existing environment, you could get:

```
WARNING: This project has not been initialized with trellis-cli and may not work as expected.

You may see this warning if you are using trellis-cli on an existing project (previously created without the CLI).
To ensure you have the required dependencies, initialize the project with the following command:

  $ trellis init

If you want to manage dependencies yourself manually, you can ignore this warning.
To disable this automated check, set the 'virtualenv_integration' configuration setting to 'false'.
```

Ok, I went through the docs: [Trellis CLI | Trellis Docs | Roots](https://roots.io/trellis/docs/cli/) and created a `cli.yml`:

```
# trellis/.trellis/cli.yml

check_for_updates: true
load_plugins: true
open:
  site: "http://exanple.test"
  admin: "http://exanple.test/wp/wp-admin"
virtualenv_integration: false
```

As well, tried setting ENV variable:  
But with no luck, and I continue receiving a Warning message.  
All other Trellis CLI commands (outside `trellis vm`) are working fine without a Warning.

Any ideas about what might be wrong there?

---

## Post 38 by @swalkinshaw — 2023-04-09T22:27:43Z

I can reproduce that bug on any command, so I don’t think it’s limited to `vm start`? I’ll fix it though, thanks for reporting here. This is probably better suited for a GitHub issue though for bugs like this in the future.

---

## Post 39 by @vburlak — 2023-04-10T09:33:57Z

Oh, I actually could get the same Warnings while working with `vault` commands in CLI.  
Yep, it’s not limited to `vm`.  
Thanks for confirming!

I could create a GitHub issue for that. But I’m not sure which repo is better for this: `trellis` or `trellis-cli`?

---

## Post 40 by @swalkinshaw — 2023-04-10T12:52:29Z

I’ve already fixed it [Fix virtualenv\_integration config setting by swalkinshaw · Pull Request #384 · roots/trellis-cli · GitHub](https://github.com/roots/trellis-cli/pull/384) :smile:

It will be in the next release soon

---

## Post 41 by @swalkinshaw — 2023-04-23T01:36:26Z

v1.11.0 is out and it contains a lot of improvements and bug fixes related to Lima. Thanks for the feedback everyone.

> [@Trellis-cli v1.11.0 released](https://discourse.roots.io/t/trellis-cli-v1-11-0-released/25223):
>
> [trellis-cli v1.11.0 released](https://github.com/roots/trellis-cli/releases/tag/v1.11.0) Couple notes about this new version: it contains a lot of improvements for the new trellis vm commands and Lima integration. All commands should now be “Lima” aware instead of assuming Vagrant. This means running commands like trellis alias or trellis dotenv will support the Lima VM in development. If you have an existing .trellis/cli.yml config file, consider moving it to the new path: trellis.cli.yml (old one is still supported) Lima has a newer version so pleas…

---

## Post 42 by @Jack_Kudla — 2023-05-04T23:58:56Z

I’m having trouble accessing logs due to Vagrant being set as user. What do I have to change to get the correct user?

```
trellis logs --goaccess development
Running command => ssh vagrant@mindstomedia.test tail -f /srv/www/mindstomedia.ca/logs/*[^gz]?
vagrant@mindstomedia.test: Permission denied (publickey)
```

---

## Post 43 by @JordanC26 — 2023-06-02T09:03:57Z

I don’t seem to be able to find a clear answer on Lima docs or anywhere else, what is the minimum required OS for Lima?

I am due for a new Macbook next week, but just for a chance to play with Lima in the meantime, I am on OS Catalina still, any idea if it works fine on this version?

---

## Post 44 by @MWDelaney — 2023-06-02T12:22:24Z

Scott points out here that the MacOS virtualization framework is only in MacOS Ventura and later.

> [@Introducing Lima to Trellis for Faster Local Development](https://discourse.roots.io/t/introducing-lima-to-trellis-for-faster-local-development/24928/27):
>
> Correct, macOS’ new virtualization framework is Ventura/13.0+

---

## Post 45 by @JordanC26 — 2023-06-02T12:42:00Z

Thanks! I’ll wait until I have the new Macbook and try then.

---

## Post 46 by @adleviton — 2023-06-10T19:12:55Z

With Lima, is there a way to use synced folders, like `vagrant_synced_folders` in vagrant.default.yml?

---

## Post 47 by @swalkinshaw — 2023-06-10T20:04:13Z

I assume you mean _additional_ folders other than the site dir? Lima offers it, but the trellis-cli config doesn’t give a way to customize them yet.

---

## Post 48 by @adleviton — 2023-06-10T20:40:45Z

Thanks Scott. Correct, I do mean _additional folders_. I was expecting this to be complex, but after taking another look, manually adding an additional sync folder is simply:

- `limactl edit <instance>` will open vi editor for the _actual_ config file (I got mixed up editing the auto generated config file in .trellis/lima/yoursite.yml which has no effect).
- add a shared folder under `mounts` and save.

Worked like a charm for me.

---

## Post 49 by @swalkinshaw — 2023-06-10T22:27:05Z

Awesome! I do want to support more features eventually. But regardless, we should document editing the Lima config (and clear up the dual config confusion that you ran into).

What is your use case for extra synced folders?

---

## Post 50 by @adleviton — 2023-06-10T23:56:36Z

My additional synced folder is just a really big folder full of .PDFs that I’m continually adding to and updating. And then I manually push these files to the web server via FTP. My Wordpress site then links to the .PDFs, and has some PHP functionality that depends on this folder. That’s the short answer. In my case, it wouldn’t be feasible to store and manage these .PDFs in the WP media library.

I have another situation (project is still on vagrant, but still applies) where the synced folder is a collection of ancient HTML web pages from the early 2000’s, and it’s nice to keep that separate from the Wordpress ecosystem and just link to it.

Then in both cases, I use the Trellis [nginx includes](https://roots.io/trellis/docs/nginx-includes/) to make these additional folders accessible via HTTP.

---

## Post 51 by @swalkinshaw — 2023-06-11T14:18:42Z

That’s a very specific use case :sweat_smile: I was wondering if there was a common example I hadn’t thought of but I still do want to make customizing easier.

Instead of having to add these Lima config features separately, I might just add a field like `lima_config` which will pass through anything directly.

---

## Post 52 by @joshb — 2023-06-13T21:10:56Z

Howdy.  
I have a new MacBook M2 chip based machine and working on getting Lima setup on an existing project.

Running `trellis vm up` appears to work properly with this message:  
“Your Trellis VM is ready to use!”

I am able to run `trellis vm shell` and gain access.

Next I run `yarn bud dev` and I am provided with my proxy and server urls.

The proxy url takes me to a “Site can’t be reached” page and the server url takes me a page with this message:  
“Error occurred while trying to proxy: localhost:3000/”

---

## Post 53 by @emilime — 2023-06-23T14:40:31Z

I have your same processor and your same problems, were you able to find a fix?

---

## Post 54 by @matthew_ob — 2023-06-23T16:15:49Z

Not really. It works 100% of the time after a restart now, but it never works without the restart. I’m pretty much resigned to waiting a while to adopt Trellis on the silicone machines. Still works great on my intel machine though!

Sorry I couldn’t be more helpful.

---

## Post 55 by @emilime — 2023-06-23T16:39:55Z

Thanks for the reply.

At the moment I always have “exit with error” in one of these steps:  
TASK [common : Update apt packages]  
TASK [common : Checking essentials]

I’ll try after a restart of the Mac…

---

## Post 56 by @ben — 2023-06-24T19:38:59Z

FWIW, Parallels and Vagrant with Trellis works pretty well for me — there’s the occasional issue usually caused by something upstream that has to be fixed, like a buggy Vagrant version

I too run into issues fairly frequently with Lima and sometimes a reboot works

---

## Post 57 by @matthew_ob — 2023-06-24T20:50:47Z

Thanks for the heads up! Unfortunately regarding the silicon machines I’m looking for a solution for an agency, and Parallels would cost like $800 a year for the number of seats needed. Technically feasible but I’d rather not pitch that when our current system is totally open source. I’m sure it’ll get figured out at some point though!

---

## Post 58 by @emilime — 2023-06-27T07:11:12Z

Same situation here, Parallels has a cost that I would like my agency to avoid, I hope the Lima solution becomes stable soon.

---

## Post 59 by @cspicuzza — 2023-08-10T01:18:03Z

Can you share how you configured Lima with the sync script? I’m dealing with that currently.

---

## Post 60 by @RistoKaalma — 2023-08-10T12:07:18Z

I’m a bit late to the party but… please don’t mind me asking, haven’t you considered [Lando](https://lando.dev/)?

It’s super simple (and relatively well working) solution based on Docker containers, literally 3-5 min setup that has been working perfectly for all my latest projects - regardless the complexity, even Laravel based API-s communicating with WP sites locally, node applications, etc - everything based on Lando.

Only thing… I haven’t tried it on Windows, where it relies on WSL that I haven’t had the best experience with, then again, I don’t consider Windows as good OS for web development… unless one is programming in C(stuff) or .NET - neither of witch are really related to Roots stack anyway.

---

## Post 61 by @chrillep — 2023-08-11T17:30:11Z

Lando works gr8! But… :slight_smile: you cant provision lando with trellis as far i know.  
What Lima provides is a way to get the “exact” same server you would on staging and production.

> **[Twelve-Factor WordPress App #10: Dev/Prod Parity](https://roots.io/twelve-factor-10-dev-prod-parity/)**
>
> Factor #10: Dev/prod parity. Keep development, staging, and production as similar as possible. It’s all about automating your setup.

Sidenote:  
Maybe you can add a provision command to landos build step or do it via trellis but im not sure.  
But then going pure docker and docker-compose or even podman would be a better alternative.

---

## Post 62 by @chrillep — 2023-08-11T17:36:20Z

with this said roots new radicle adds Lando as an alternative for local development.

> **[Local Development | Radicle Docs](https://roots.io/radicle/docs/local-development/#lando)**

---

## Post 63 by @matthew_ob — 2023-08-12T00:59:34Z

Not sure if it helps in any way, but I discovered that the reason that I needed to restart before starting a new Lima server on silicon machines is that the process only works when no other Lima servers are running. So now in order to get it to work I can do so by just stopping all of the other servers instead of restarting the whole machine. Still not ideal but a little faster I guess.

---

## Post 64 by @Elliott_James — 2023-08-23T14:55:00Z

Yes I had the same issue but seems. Issue seems to be when the host machine goes to sleep port forwarding stops working. I was able to solve this buy doing a factory reset on the lima instance so that lima updates the network configs. So far I haven’t had an issue since.

---

## Post 65 by @Elliott_James — 2023-08-23T14:58:48Z

Did you figure this out? I had the same question.

---

## Post 66 by @swalkinshaw — 2023-08-23T16:53:07Z

It’s a bug that I need to fix :see_no_evil:

---

## Post 67 by @joaovpmamede — 2023-09-06T09:22:10Z

I did that factory reset but then when I run `trellis vm start` again I can’t seem to have the access to the backoffice anymore.  
Did you do something else on the `.trellis/lima/<site-host>.yml` file?

---

## Post 68 by @Elliott_James — 2023-09-06T12:21:48Z

When you say “back office” are you referring to wp-admin? Can you post the output from trellis vm start?

---

## Post 69 by @joaovpmamede — 2023-09-06T12:57:40Z

Correct, the wp-admin.

```
Running command => limactl start leafwell.dev
INFO[0000] Using the existing instance "leafwell.dev"
WARN[0000] Ignoring: vmType vz: [OS]
INFO[0000] Attempting to download the image arch=aarch64 digest= location="https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img"
INFO[0000] Using cache "/Users/joaomamede/Library/Caches/lima/download/by-url-sha256/b0292969d1625be5cb3a28bcbd6660473d29afede9d0f7b2a791e4d9891335b8/data"
INFO[0000] Converting "/Users/joaomamede/.lima/leafwell.dev/basedisk" (qcow2) to a raw disk "/Users/joaomamede/.lima/leafwell.dev/diffdisk"
2.20 GiB / 2.20 GiB [-------------------------------------] 100.00% 150.43 MiB/s
INFO[0015] Expanding to 100GiB
INFO[0015] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/joaomamede/.lima/leafwell.dev/serial*.log")
INFO[0015] [hostagent] new connection from to
INFO[0015] SSH Local Port: 55129
INFO[0015] [hostagent] [VZ] - vm state change: running
INFO[0015] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
INFO[0025] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
INFO[0026] [hostagent] The essential requirement 1 of 3 is satisfied
INFO[0026] [hostagent] Waiting for the essential requirement 2 of 3: "user session is ready for ssh"
INFO[0037] [hostagent] Waiting for the essential requirement 2 of 3: "user session is ready for ssh"
INFO[0037] [hostagent] The essential requirement 2 of 3 is satisfied
INFO[0037] [hostagent] Waiting for the essential requirement 3 of 3: "the guest agent to be running"
INFO[0037] [hostagent] The essential requirement 3 of 3 is satisfied
INFO[0037] [hostagent] Waiting for the final requirement 1 of 1: "boot scripts must have finished"
INFO[0037] [hostagent] Forwarding "/run/lima-guestagent.sock" (guest) to "/Users/joaomamede/.lima/leafwell.dev/ga.sock" (host)
INFO[0037] [hostagent] The final requirement 1 of 1 is satisfied
INFO[0037] READY. Run `limactl shell leafwell.dev` to open the shell.

Updating /etc/hosts file (sudo may be required, see `trellis vm sudoers` for more details)

Your Trellis VM is ready to use!

* Composer and WP-CLI commands need to be run on the virtual machine for any post-provision modifications.
* You can SSH into the machine with 'trellis vm shell'
* Then navigate to your WordPress sites at '/srv/www'
```

Right after running `limactl factory-reset` cmd.

---

## Post 70 by @Elliott_James — 2023-09-06T14:05:39Z

I didn’t do anything to the yml configs but what you can try is

try `curl -vv -L leafwell.dev ` and post the output.

---

## Post 71 by @joaovpmamede — 2023-09-08T09:04:34Z

> [@Elliott_James](#):
>
> curl -vv -L leafwell.dev

```
* Could not resolve host: leafwell.dev
* Closing connection 0
curl: (6) Could not resolve host: leafwell.dev
```

---

## Post 72 by @ben — 2023-09-08T15:11:31Z

Try using the `.test` TLD — `.dev` is an actual TLD now and shouldn’t be used anymore

---

## Post 73 by @ben — 2023-09-08T15:31:10Z

Thanks everyone for the feedback and participation on here! I’m going to close this original topic out, but please create new topics for anything else related to Lima and Trellis so we can more easily stay on topic for each individual issue

---

## Post 74 by @ben — 2023-09-08T15:31:13Z


