Nextcloud 13.0.1 for Odroid C2 (Nextcloud13.img)

OdroidC2 image with Nextcloud 13.0.1 (stable)

First download my Nextcloud 13.0.1 image for OdroidC2 from here: Nextcloud 13.0.1 image for Odroid C2 v.180319new (840 MB)

The image consists of:

  • Ubuntu 16.04.3 LTS 64 Bit
  • Nginx 1.13.9 (from now updateable using “sudo apt upgrade”)
  • Nextcloud 13.0.1 (stable)
    • Nextcloud cronjobs enabled
    • cronjob for a regulary, daily backup enabled
    • several scripts are stored in the /root directory
  • PHP 7.2.3
  • MariaDB (utf8mb4)
  • Redis
  • fail2ban
  • ufw (:80 http // :443 https // :2211 SSH)
  • letsencrypt
  • openssl 1.1.0g
  • htop
  • cronjobs
  • 1.9 GB on eMMC are in use

Updated: March, 19th, 2018:
– new Image including Nextcloud 13 and PHP 7.2

Updated: Nov., 19th, 2017:
– amendments to /etc/fstab (NGINX-cache and php-sessions moved to tmpfs)
switched from static ip to dhcp

Plug your eMMC to your Desktop and search for your eMMC via

sudo -s
fdisk -l

At my environment the eMMC is called “/dev/mmcblk0“. Extract the previously downloaded image:

unxz Nextcloud13.img.xz

Then prepare your eMMC for acting as your server, therefore clone the image to your eMMC:

dd if=Nextcloud13.img of=/dev/mmcblk0

Wait a few minutes until the prompt will be back again and the card was already written for you. Now unplug the eMMC module from your desktop and plug the card to your ODROID-C2.

From Windows you can prepare the Odroid C2 using the Win32 Disk Imager Tool

The ODROID-C2 will be reachable via ssh. Please search for the dhcp adress given by your router.

Examplarily you can connect using ssh as that (substitute to your IP!)

ssh nextcloud@ -p2211

or, if your monitor and keyboard are plugged in to your Odroid C2, connect directly.

Login as user “nextcloud” using the password “nextcloud“. Please be aware, the user “root” is disabled for security reasons, but nextcloud is a member of the sudoers group. So please use sudo -s to act as a privileged user.

First logon with the following user credentials:

user: nextcloud
password: nextcloud

Please consider to change the nextcloud password directly:

sudo passwd nextcloud

Now change from your current dhcp IP to a static IP adress. An example can be found at

cat /etc/network/interfaces.d/eth0.example

Backup your etho and substitute the network values properly

cp  /etc/network/interfaces.d/eth0 /etc/network/interfaces.d/eth0.bak
vi  /etc/network/interfaces.d/eth0

to examplarily these:

auto eth0
iface eth0 inet static

Then reboot your server

shutdown -r now

and re-connect to your server using your new static IP.

The image was written to a ~ 2.7 GB partition. Regardless of whether your eMMC has 8GB, 16GB or more GB your partition will be resized using my two scripts:

sudo -s

Your server will reboot automatically. Please login again and execute the second script by issuing:

sudo -s
cd /root/

Verify that the entire Disk space is used:

df -h

After the last automatic reboot your partition has been expanded to the entire available disk space. Your Nextcloud is already reachable at

(or https://your-ip/login)

Logon to your Nextcloud as Administrator (nextcloud_root)

user: nextcloud_root
password: nextcloud_root 

and change the password directly. Then re-logon to your Nextcloud and have a look at all the pre-enabled apps:

– activity: 2.6.1
– admin_audit: 1.3.0
– apporder: 0.4.1
– bruteforcesettings: 1.0.3
– calendar: 1.6.1
– contacts: 2.1.2
– dav: 1.4.6
– federatedfilesharing: 1.3.1
– files: 1.8.0
– files_downloadactivity: 1.2.0
– files_pdfviewer: 1.2.0
– files_sharing: 1.5.0
– files_texteditor: 2.5.1
– files_trashbin: 1.3.0
– files_videoplayer: 1.2.0
– gallery: 18.0.0
– keeweb: 0.4.0
– logreader: 2.0.0
– lookup_server_connector: 1.1.0
– nextcloud_announcements: 1.2.0
– notes: 2.3.2
– notifications: 2.1.2
– oauth2: 1.1.0
– password_policy: 1.3.0
– provisioning_api: 1.3.0
– serverinfo: 1.3.0
– sharebymail: 1.3.0
– theming: 1.4.1
– twofactor_backupcodes: 1.2.3
– updatenotification: 1.3.0
– workflowengine: 1.3.0

– two cronjobs (cron.php & preview:pre-generate) for user www-data
– one cronjob for a daily backup for user root

If you have a dyndns for your server and your router already forwards port 80 and 443 to your server, you could request ssl-certificates by running

letsencrypt certonly -a webroot --webroot-path=/var/www/letsencrypt --rsa-key-size 4096 -d YOUR.DEDYN.IO

Replace YOUR.DEDYN.IO to your DYNDNS properly!

Adjust the ssl.conf

vi /etc/nginx/ssl.conf

and replace the self-signed certificates to the letsencrypt-certificates

#ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
#ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
ssl_certificate /etc/letsencrypt/live/YOUR.DEDYN.IO/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/YOUR.DEDYN.IO/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/YOUR.DEDYN.IO/fullchain.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ecdh_curve secp384r1;
ssl_stapling on;
ssl_stapling_verify on;

Replace YOUR.DEDYN.IO to your DYNDNS properly!

Then amend your config.php

sudo -u www-data vi /var/www/nextcloud/config/config.php

with regards to the trusted domains.

array (
0 => 'odroid64',

Replace YOUR.DEDYN.IO to your DYNDNS properly!

Then restart nginx

service nginx restart

and your Nextcloud is reachable from outside and has an A+ ranking! From this point you should disable the graphical environment to release hundrets of MB RAM.

sudo -s cp /media/boot/boot.ini /media/boot/boot.ini.bak
vi /media/boot/boot.ini

Set setenv nographics from „0“ to “1”

# Server Mode (aka. No Graphics)
# Setting nographics to 1 will disable all video subsystem
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
setenv nographics "1"

Reboot your Server and the GUI will be disabled. Only round about 300MB of 1.7 GB available RAM are allocated.

The MariaDB-Root password isn’t set yet. Please perform


and set a root password as simple as that. If you want to restart all Nextcloud related services in an ordered scenario, just call

sudo /root/

and all relevant Services

will be restarted. You will either find other scripts in /root

  • (for initial usage only)
  • (for initial usage only)
  • (regulary backup, cronjob daily at 00:01)

  • (overview of ssh and nextcloud status)
  • (apply all permissions required by Nextcloud)
  • (to renew your letsencrypt-certificates)
  • (restart all relevant services)
  • (update, upgrade and cleaning)

Hope you will enjoy Nextcloud 13 on your Odroid C2!

Carsten Rieger

7 Responses

  1. Derber Mohikaner says:

    This is what the Founding Fathers meant by “concise” and “helpful”!
    This is the first “how to” I followed which worked like a charm and delivered!
    Thanks Carsten!

  2. piet says:

    Does this work on a Raspberry Pi2?

Leave a Reply

Your email address will not be published. Required fields are marked *