Post

Nextcloud on Samsung Galaxy S7 edge

Hi all,

These days, smartphones are little computers that can be put in the pocket.
Their performance is increasing year by year.

I thought about which useful application may I run on it.
The idea of application to install I found in Jan C. Borchardt GitHub account, in nextcloud-scripts repository.

Today, I will describe how I ran Nextcloud on Samsung Galaxy S7 edge smartphone using the Userland app.

When started the Userland app the first time I must choosed the Linux distro,
on which I want work and connection method.
I choosed Ubuntu in 18.04 version.
By default, the Userland app uses default Android connections.

I tried to check the IP address using ifconfig command but thenet-tools package has not been installed.

To be able to establish ssh connection from my MacBook I installed openssh package.
To start ssh deamon I run sshd command.
I checked current user using whoami command.

On MacBook, I ran ssh <user>@<ipaddress>command, but I was not be able to connect.
I must add a port to command to establish connection - a little help I found on GitHub portal in the following thread: CyberpunkArmory thread

I ran the following command to prepare the environment for Nextcloud:

1
$ sudo apt update
1
$ sudo apt upgrade

I installed htop to monitor the Galaxy S7 edge performance but I met an issue that I still do not solve.

1
$ sudo apt install htop

To be able to clone Nextcloud repository I need git:

1
$ sudo apt install git

Editing files will be easier with powerful editor:

1
$ sudo apt install vim

The Nextcloud need php and a few dependencies to start so I installed them:

1
$ sudo apt install php
1
$ sudo apt install php-fpm
1
$ sudo apt install sqlite
1
$ sudo apt install coreutils
1
$ sudo apt install openssl-tool
1
$ git clone https://github.com/nextcloud/server.git nextcloud
1
$ cd nextcloud/ && git submodule update --init

After the installation of this packages Nextcloud returned a message about incorrect php version,
from the repository I installed 7.2 version, but the required is 7.3 version.

So I removed the packages which I installed,
and started again installing all packages in correct versions.

I edit sources.list file and add the new repository:

1
2
deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main
deb-src http://ppa.launchpad.net/ondrej/php/ubuntu bionic main

In the next step I tried update the repositories, but retrieved message with issue about Public GPG key.

The following command fix this issue:

1
$ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C

After successfully repositories update I installed the following packages:

1
$ sudo apt install php7.3-sqlite
1
$ sudo apt install php7.3-zip
1
$ sudo apt install php7.3-dom
1
$ sudo apt install php7.3-mbstring
1
$ sudo apt install php7.3-gd
1
$ sudo apt install php7.3-curl

After successfully packages installation, I start the Nextcloud using the following command:

1
$ php -S 0.0.0.0:8080 -t /home/<user_created_during_userland_setup>/nextcloud/

The Nextcloud has been started successfully.

It is everything that I have for today.
Everyone is a blacksmith of own fate.
Mateusz.

This post is licensed under CC BY 4.0 by the author.