You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add example for running Codapi in a Lima instance #41
The motivation for making a dedicated Lima instance was based on the:
Make sure you install Codapi on a separate machine — this is a must for security reasons. Do not store any sensitive data or credentials on this machine. This way, even if someone runs malicious code that somehow escapes the isolated environment, they won't have access to your other machines and data.
The default instance is sharing the home directory, just like a Linux host
Will make a PR, also found an issue with the permission on sandboxes:
codapi@lima-codapi:~$ ./codapi-cli sandbox add lua
Downloading from https://github.com/nalgeon/sandboxes/releases/download/latest/lua.tar.gz...
##O#- # Warning: Failed to open the file sandboxes/lua.tar.gz: Permission denied
curl: (23) client returned ERROR on write of 689 bytes
ERROR: Failed to download sandbox archive from https://github.com/nalgeon/sandboxes/releases/download/latest/lua.tar.gz
Activity
[-]Add example for running Coda in a Lima instance[/-][+]Add example for running Codapi in a Lima instance[/+]afbjorklund commentedon Apr 19, 2026
The lima.yaml has been added, question is if it needs more docs?
Like comparing pros and cons between running in containers/VMs.
Or if it needs an expanded version, with running a web server too?
Container (with nerdctl)
VM (as implemented here)
Both solutions have a "codapi" user, with a separate home directory.
And each sandbox runs as a "sandbox" user, in a separate namespace.
The difference is if there are other users on the same machine - or not.
The rootful docker has full access to it, but the home directory is "empty".
https://docs.docker.com/engine/security/#docker-daemon-attack-surface
The motivation for making a dedicated Lima instance was based on the:
The default instance is sharing the home directory, just like a Linux host
https://lima-vm.io/docs/usage/#home-directory
nalgeon commentedon Apr 19, 2026
I don't know :) Sadly, I don't have the capacity to test or document this setup.
afbjorklund commentedon Apr 19, 2026
I will try to find some volunteers, to see if the docs "work" or not
Maybe I should also have mentioned how to access codapi "admin"?
It is (rather) straight-forward, and not very different to other setups.
Will make a PR, also found an issue with the permission on sandboxes:
Pretty sure that it was in codapi.tar.gz, so missing something here...
The default user has
sudoon the debian box, so easy to work around.afbjorklund commentedon Apr 19, 2026
Eventually (with some debugging logging) I remembered:
When you run
sufrom a script, it does NOT start a new shell...