Getting phone content to FreeNAS (iPhone, Android)

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
I searched and found a thread from 2016 with some references to OwnCloud, some Mobile 3d party App but not really anything current.

Would it be possible to get some examples on how you guys backup mostly pictures and movies to you FreeNAS from your phone or tablet - ios or android -, preferently with no interaction once set up and using pull from the FreeNAS...?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I use nextcloud for this.
 

John Doe

Guru
Joined
Aug 16, 2011
Messages
635

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
I can see NextCloud available in AppStore so from there you just connect it to the NextCloud FreeNAS instance. Hokay, will do some testing, could be a solution, I just hope file management won't be a mess, getting it from NextCloud Jail to where I really wan't those files stored, which is on a different fileshare.

I want this to replace icloud storage, or at least get a copy of pictures and mov's from the iphone (and eventually android) to my storage.
 
Last edited:

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I use nextcloud for this.
Do you have to run the app on your phone and have it be the focus and stay on to backup you pics/videos?
 

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
@NasKar
Trying on an iPhone XR but only getting 401 so far, despite being on the same network , getting 401 unauthorized, despite having verified account and pwd on the nextcloud site...

Testing with Android:
Same...

I do however get some php errors in the log...

There are some warnings regarding your setup.
  • PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response. Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.
  • Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:
    • /usr/local/www/nextcloud/apps-pkg/accessibility
    • /usr/local/www/nextcloud/apps-pkg/activity
    • /usr/local/www/nextcloud/apps-pkg/admin_audit
    • /usr/local/www/nextcloud/apps-pkg/cloud_federation_api
    • /usr/local/www/nextcloud/apps-pkg/comments
    • /usr/local/www/nextcloud/apps-pkg/contactsinteraction
    • /usr/local/www/nextcloud/apps-pkg/dav
    • /usr/local/www/nextcloud/apps-pkg/encryption
    • /usr/local/www/nextcloud/apps-pkg/federatedfilesharing
    • /usr/local/www/nextcloud/apps-pkg/federation
    • /usr/local/www/nextcloud/apps-pkg/files
    • /usr/local/www/nextcloud/apps-pkg/files_external
    • /usr/local/www/nextcloud/apps-pkg/files_pdfviewer
    • /usr/local/www/nextcloud/apps-pkg/files_rightclick
    • /usr/local/www/nextcloud/apps-pkg/files_sharing
    • /usr/local/www/nextcloud/apps-pkg/files_trashbin
    • /usr/local/www/nextcloud/apps-pkg/files_versions
    • /usr/local/www/nextcloud/apps-pkg/files_videoplayer
    • /usr/local/www/nextcloud/apps-pkg/firstrunwizard
    • /usr/local/www/nextcloud/apps-pkg/logreader
    • /usr/local/www/nextcloud/apps-pkg/lookup_server_connector
    • /usr/local/www/nextcloud/apps-pkg/nextcloud_announcements
    • /usr/local/www/nextcloud/apps-pkg/notifications
    • /usr/local/www/nextcloud/apps-pkg/oauth2
    • /usr/local/www/nextcloud/apps-pkg/password_policy
    • /usr/local/www/nextcloud/apps-pkg/photos
    • /usr/local/www/nextcloud/apps-pkg/privacy
    • /usr/local/www/nextcloud/apps-pkg/provisioning_api
    • /usr/local/www/nextcloud/apps-pkg/recommendations
    • /usr/local/www/nextcloud/apps-pkg/serverinfo
    • /usr/local/www/nextcloud/apps-pkg/settings
    • /usr/local/www/nextcloud/apps-pkg/sharebymail
    • /usr/local/www/nextcloud/apps-pkg/support
    • /usr/local/www/nextcloud/apps-pkg/survey_client
    • /usr/local/www/nextcloud/apps-pkg/systemtags
    • /usr/local/www/nextcloud/apps-pkg/text
    • /usr/local/www/nextcloud/apps-pkg/theming
    • /usr/local/www/nextcloud/apps-pkg/twofactor_backupcodes
    • /usr/local/www/nextcloud/apps-pkg/updatenotification
    • /usr/local/www/nextcloud/apps-pkg/user_ldap
    • /usr/local/www/nextcloud/apps-pkg/viewer
    • /usr/local/www/nextcloud/apps-pkg/workflowengine
  • You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read the documentation page about this.
  • Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the security tips ↗.
  • This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them.
    • imagick
Please double check the installation guides ↗, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan ↗.

Will this work in the Jail Shell for Nextcloud to install imagick?
sudo apt install php-imagick - ehm, no.
 
Last edited:

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
In freenas it’s pkg install php74-pecl-imagick if u have php 7.4
 

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
yay-it-worked-2c5e411519.jpg



It worked... yay... now for the damn file chmodding... gonna take a bit I guess, need to check if all can be 755 or what... plus recursive...
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Do you have to run the app on your phone and have it be the focus and stay on to backup you pics/videos?
Android works fine in the background but iphone the app has to be open and connected. Apple doesn't allow anything to run unattended in the background.
 

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
Android works fine in the background but iphone the app has to be open and connected. Apple doesn't allow anything to run unattended in the background.
well, won't connect. Neither. Any tips aside from what I posted above, or should I perhaps take this to Nextcloud...I fear they might refer me back here once I mention it's a plugin to FreeNAS setup...
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I just hope file management won't be a mess, getting it from NextCloud Jail to where I really wan't those files stored,
That’s not how it works... you either use nextcloud or network shares. Mixing both is really not recommended.. it will take some work to get setup correct. No reason not to use Nextcloud exclusively
 

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
I have other fileshares I have used before Nextcloud and FreeNAS and while some consolidation might be warranted I need to ensure some functionality first, my setup is as mentioned above and following Flemmings guide for setting up Nextcloud. I still have to address those directory rights in my quoted.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Okey... I’m not gonna play 20 question. Do this, it’s going to be the least pain for you
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
No that’s not correct, you can set Nextcloud to automatically upload new photos on iOS
With my nextcloud iphone app, it only works with the the app on and the phone not asleep.
Auto upload photos/videos is on. Do you have to have Auto upload in backround on? It says it uses GPS so I'm concerned it will drain the battery quickly. Can you share how you have it setup?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
No that’s not correct, you can set Nextcloud to automatically upload new photos on iOS
Yes you can as long as the app is running. It won't upload in the background on ios. The wardens android will upload as soon as she's connected to the wireless whether she's using the phone or not. My iphone has to be unlocked and the app running for photo's to automatically upload.
 

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
Okey... I’m not gonna play 20 question. Do this, it’s going to be the least pain for you
What about the prereqs specified there... I will play 20 questions since it would be great if this could work... Let's Encrypt? I might considering opening 80 and 443, since I know 2FA works,but I am rather reluctant to leave it out there on those ports... I am NOT using Cloudflare. No way. Ah wait, thats for DDNS, well I use something else.

Jeez, this is complex...
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
There is no need to open any ports unless you want it publicly accessible, let’s encrypt can be run directly against a DNS.

what’s wrong with cloudflare?
 

SecCon

Contributor
Joined
Dec 16, 2017
Messages
175
There is no need to open any ports unless you want it publicly accessible, let’s encrypt can be run directly against a DNS.

what’s wrong with cloudflare?

It's global. I keep my data in my country, but for DDNS it doesn't matter.
 
Top