Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
webapp-config - for easy local installation of nextcloud?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Wed Mar 20, 2019 11:46 am    Post subject: webapp-config - for easy local installation of nextcloud? Reply with quote

I've been looking to install Nextcloud into my (headless) server. I hate to fight with php, so I'm hoping webapp-config may be the route.

Can I use webapp-config to simplify installation of Nextcloud? Or is it the wrong tool for the job?
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1270

PostPosted: Wed Mar 20, 2019 8:08 pm    Post subject: Reply with quote

Yes, it's possible. I update my nextcloud on my vps just issuing
Code:
webapp-config -U nextcloud [VERSION] -h [HOST] -d [DIR]
after an emerge upgrade.

See:
https://wiki.gentoo.org/wiki/Webapp-config
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 259

PostPosted: Wed Mar 20, 2019 10:34 pm    Post subject: Reply with quote

I think for this it is the wrong tool, as nextcloud brings its own installer and updater. Plus a package as nextcloud must be very current to avoid security problems.

Now here comes the problem with the webapp-config:
1. It needs to be packaged to work. Nextcloud updates relatively frequent and the gentoo packages lag behind.
2. When you login as admin then nextcloud will want to update itself. If you do that it gets out of sync with the webapp-config.
3. And webapp-config is generally not overly convenient to use. It works, but is a command line hack.
4. The internal updater of nextcloud does also update all plugin apps, check for compatibility and change the sql database structure if needed. webapp-config does not do anything like this, so you need to do manual steps from within nextclouds admin interface anyway.

Thus I would use webapp-config only for web packages that
1. Bring no own updater
2. Require and are updated quite slowly
3. That are not too complex. The more complex the more likely will be serious security loopholes. Nextcloud is quite complex. I need to stress again that nextcloud needs to be kept very current. The internal updater with its check is not there without a reason.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Mar 20, 2019 10:47 pm    Post subject: Reply with quote

You could say the same about firefox and chromium.

Does Nextcloud's internal updater have any way to operate normally without leaving all its code files read-write-execute by the PHP userid?
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Thu Mar 21, 2019 1:35 pm    Post subject: Reply with quote

Nextcloud ebuild does use webapp-config by default. No need to run it manually.

msst wrote:
Nextcloud updates relatively frequent and the gentoo packages lag behind.

Really ?

https://nextcloud.com/changelog/
https://gitweb.gentoo.org/repo/gentoo.git/log/www-apps/nextcloud?showmsg=1

Quote:
When you login as admin then nextcloud will want to update itself. If you do that it gets out of sync with the webapp-config.

I think you didn't understand how webapp-config works and how Nexcloud updates itself.

First, nextcloud is slotted. When you "update" nextcloud, portage merges the new version to its own directory, but doesn't uninstall the already installed previous ones.
Then, portage calls webapp-config, to switch to this new version.
And last, when you launch the nexcloud web interface, _it is_ the new version. And this new version detects it must update the database schema, the extensions, and so on.

It's not either webapp-config or nextcloud internal update. Twice are used. And that works well.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Fri Mar 22, 2019 9:23 am    Post subject: Reply with quote

I wouldn't want anything (especially web related) to update itself without package manager knowing about it.
webapp-config and portage are (or can be) tightly integrated so I'll use them.

Only inside some container (or vm) I'd let those apps update themselves.

I'm RTFM'ing webapp-config docs whenever I have time now. Mainly the configuration docs.

msst wrote:
Plus a package as nextcloud must be very current to avoid security problems.
I'll propably access it trough vpn anyways. ;)
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1558
Location: Adelaide/Australia

PostPosted: Sat Mar 23, 2019 5:31 am    Post subject: Reply with quote

Personally, I have nextcloud running on my Gentoo at home.
I do the updates via portage rather than using the nextcloud updater.
I use the nextcloud updater to update the 'apps', however.
I then test, tweak config if necessary due to updates, etc.

To update my hosting provider,

  • I tar/gzip the entire nextcloud folder,
  • scp it up to my hosting provider
  • put nextcloud in maintenance mode
  • backup mysql database using hosting providers cpanel
  • rename the nextcloud folder to nextcloud.old
  • extract my tar/gzip archive
  • update config and .htaccess (generally by copying from the .old folder if no changes are required)
  • use occ to do the database and config version update update rather than the web UI (occ doesn't timeout)
  • re-enable nextcloud (out of maintenance mode)
  • re-enable apps
  • verify all is working

It leaves a couple of files that are used by webapp-config that the admin screens whine about not being valid but I am fine with that.

I guess, not the most efficient method, but it has worked for me since I migrated from owncloud, when nextcloud came into being.
_________________
...Lyall
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sat Mar 23, 2019 2:31 pm    Post subject: Reply with quote

I'm looking for something far more simple. :D

But before I start with Nextcloud I try with Venus, because I'll install it eventually anyways.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1270

PostPosted: Sat Mar 23, 2019 7:30 pm    Post subject: Reply with quote

I run nextcloud installed by portage since some time now on my vps, and keeping it up-to-date is as simple as emerging, issuing webapp-config, and finally opening the page on brower and hitting update button, which then updates what is still needed (apps n stuff). Then page reloads and thats about it.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sat Mar 23, 2019 10:48 pm    Post subject: Reply with quote

Elleni wrote:
I run nextcloud installed by portage since some time now on my vps, and keeping it up-to-date is as simple as emerging, issuing webapp-config, and finally opening the page on brower and hitting update button, which then updates what is still needed (apps n stuff). Then page reloads and thats about it.
Now that sounds like the way I want it.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1558
Location: Adelaide/Australia

PostPosted: Sat Mar 23, 2019 11:54 pm    Post subject: Reply with quote

Nice and simple but if something goes to hell in a handbasket, you have no recovery recourse.
Things liked timeout during the update, occ doesn't timeout whereas the web page can.
The database update might have a problem (had one of those in the past).
If anything goes wrong, you have to find and fix manually rather than simply reverting to the working version and trying again after resolving any issues.
Still, if all goes well, which it has mostly, in the years I have been using *cloud, you should be fine :)
_________________
...Lyall
Back to top
View user's profile Send private message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1270

PostPosted: Sun Mar 24, 2019 12:31 am    Post subject: Reply with quote

You are right, I occasionally run into a problem while updating but could solve it by temporary changing apache user in password file to allow login (/bin/bash instead of /sbin/nologin) and issuing the correct occ command there. And as its just my personal cloud a bit of downtime was not critical :)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sun Mar 24, 2019 4:49 pm    Post subject: Reply with quote

Elleni wrote:
I occasionally run into a problem while updating but could solve it by temporary changing apache user in password file to allow login (/bin/bash instead of /sbin/nologin)
If you log in by running /bin/su - apache from a root shell, you can avoid changing /etc/passwd by instead adding -s /bin/bash to force use of bash, overriding /sbin/nologin from /etc/passwd. Only root can override a non-shell this way, though.
Back to top
View user's profile Send private message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1270

PostPosted: Sun Mar 24, 2019 9:59 pm    Post subject: Reply with quote

Oh, cool. Thanks for your input :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum