Is it possible to install ERPNext from a snap package?

… which would be a super easy way for installation on many different linux servers without have to care about any dependencies (as they are provided in the isolated snap package (similar to a container in a way)

not sure how complex a snapped application can get actually but WeKan i.e (maybe a bit less complex) has one already.

Actually the question is more whether anybody has attempted to make a snap for ERPNext yet.

*) snap package as of https://snapcraft.io/ or https://en.wikipedia.org/wiki/Snappy_(package_manager)

2 Likes

I guess we could say goodbye to all the “error on installation” issues with such a possibility … just not 100% sure how customizations or custom Apps can be run under such a scenario but doesn’t anybody else think it would be worth to explore this as an option at least?

1 Like

@vrms we just got started with docker :slight_smile:

Now that you have opened this topic, lets see how many people show interest.

1 Like

True, it’s many options popping up. I guess they may address different type of audience.

I just started exploring snaps a bit and would say it hardly could be simpler to run a complex app. And also maintaining it for a wide range of users (including updates).

Maybe it’s a bit too much at once

In the docker thread [1] I go one step further in that implementation, I have an error, could you spare a minute? Probably a silly mistake but I do not see the solution.

[1] Official Docker for frappe - #6 by meigallodixital

We used Lxd / Lxc and worked well.

Note that systemd-nspawn, available everywhere systemd is used as init system, is an option too. machinectl can help to manager containers. A lot like LXC.

1 Like

thanks everybody. I am aware of virtual machines and containers (LXD, and docker).

Still question remains about looking at snap as a delivery system for a complex thing as ERPNExt.
Would boil down the installation and updating process to just one command (with almost no point of failure).

Maybe it’ll evolve sooner or later

I see ‘SNAP’ is a better way of packaging the ‘ERPNext’ and it handles all the version dependencies. Did anyone made progress on ‘Snapcraft’ Application?

actually today, if we talk about such a method for providing a one-command self-contained ERPNext installation, I’d be more in favour of AppImage as a format for such over snap.

why? it’s platform independent and not (like snapd) may only work well on ubuntu-friendly distributions

snapd daemon is available across many Linux distros but more importantly it works really well for those most commonly deployed for production. It is platform agnostic?

I just snap installed lxd and then snap installed open-source NextCloud in a container. The process took few minutes and have a running NextCloud server that self updates with snap releases managed by the developer. All with native Linux snapd daemon. So many apps are now distributed via SNAP

The impact for ERPNext can be dramatic. How many posts we have on this forum related to installation or improper installation? The target customer base is small companies who could use ease of installation and non resource consuming requirements like running infra for virtual machine or docker, etc.

I would definitely support a SNAPstore app development effort.

Having various issues trying to install across the different methods.

AppImages are great however they don’t end up containing everything and so issues between your machine and the user’s machine can still mean difficulty troubleshooting.

If Flatpak had a server focus it would be fine too.

Maybe talk to Martin Wimpress https://twitter.com/m_wimpress

He seems happy to help people get snaps going. I wonder if the docker images themselves could be snapped up with docker to make it so you don’t have to reproduce a lot of effort either

@Stephen - thanks for your guidance. I have found that the install script works in Ubuntu 18.04 KVM in a lxd container. Create user “frappe” first, add to sudo group, and then login as frappe and run install script for production with flags “–user frappe” and “–container”.

Just installed v13 beta recently and was without issue…

Snaps would be great - but building with docker would make it even more “heavy”… not an expert - far from it - so will leave that decision to the powers that understand it best :-), I did try the docker install method as well and the lxd container size was 18GB. In contrast install script container size around 1.4GB - so dont know if I installed it right… was quite the curve to get docker working inside lxd…

1 Like

I will give that a try, thanks!

And I don’t doubt at all that snapping up the docker containers would add extra bloat, but I figured if they went that route they would notice less support requests, and then maybe in the future trim it down a bit, but in the meantime maintaining the snapped up docker images wouldn’t be a lot of overheard.

Looking forward to getting this running! :smiley:

How did it work?

I had actually gotten ERPnext working in Docker, but it was in a very fiddly state. I decided at the time I didn’t have enough time to play with it anymore but I am back again and trying! Funny enough I may just need to try LXD since its not playing nice with Apache

I use LXC. It’s more performant and easier than the Docker.

yes yes erpnext guys, please wake up! make transition to snap installation and make your system installable with one only command! like for example Nextcloud server >> sudo snap install nextcloud!!! whole installation is done in 10-15 min and every user can do it! You are still promoting and favoring docker or lxd containers? So you are not thinking and caring about your customers/users and your future!

You can do it and just once! Then ERPnext can grow <3

wrong! snap is completely another dimension than appimage (which i use and like) but we are talking about server installation etc and there my friend appimage or flatpak etc are lost cases compared to snap.

I would appreciate snap as I expected the docker version to be easy but it seems more complicated than a manual install. With ensuring you have docker-compose-v2 now coming with docker-desktop (does that work on a gpu less server?). Do you use the apt docker or follow the docker sites install instructions on Ubuntu 22.04?

I’m a Linux expert that has never used docker before and it has been over an hour and I haven’t really got past

git clone https://github.com/frappe/frappe_docker
cd frappe_docker

Edit:
Okay after installing docker-compose-v2 via apt

docker compose version

Gives: Docker Compose version 2.20.2+ds1-0ubuntu1~22.04.

So I guess that is all good?

Edit2:
So I somehow missed the easy install script and went straight to

https://github.com/frappe/frappe_docker