Part 1: Introduction
Part 2: Installing Debian 8
Part 3: Installing ownCloud 8
Part 4: Connecting to Active Directory
Part 5: Security
Part 6: Miscellany
Part 7: Server maintenance

In this part we’ll cover some miscellaneous topics:



Setup mail
OwnCloud sometimes needs to send out mail, for example when a user wants to share a link via e-mail or needs to use the password recovery function. OwnCloud offers three methods for mail: SMTP, sendmail and PHP. I’ll describe two of them.

Gmail via SMTP
In case your ISP doesn’t allow outgoing traffic on port 25 you can use your Gmail account to send out mail. It’s an easy workaround and the drawback is the mail have your Gmail address as sender. For private use that’s ok, or even for a small company.

oc8ad_114

The setup is pretty straightforward.
Send mode: smtp
Encryption: TLS
From address: can be anything
Authentication method: Plain [x] Authentication required
Server address: smtp.gmail.com:587
Credentials: your@gmail.address P@55w0rd -> Store credentials

Click Send email to test your settings and if the ‘Email sent’ box turns green you’re set.

Email via PHP
If you’re in a larger company or you don’t want to use a Gmail account set Send mode to php. Fill out a dedicated sender address and click the Send email button. The address doesn’t have to exist but it’s best if it does.

oc8ad_115

Document Previews
Document support is a fun feature in ownCloud but not much more than that. It’s not an Office 365 or Google Docs replacement. I use it for private purposes or to open the occasional Word document but that’s about it. Try it out if your server can handle a LibreOffice installation.

OwnCloud supports ODF documents natively. For MS Word support you need to install LibreOffice or one of the OpenOffices:

# aptitude install libreoffice

In the ownCloud web interface go to Admin > Apps…
oc8ad_116

At Productivity > Documents click Enable

oc8ad_117

On the Admin page at Documents select Local and click ‘Apply and test’. If a green button says Saved everything is in order.

oc8ad118

If not check your logfile and what ownCloud has to say about it.

To actually use the Documents feature you need to click Files (top left) > Documents. You can edit your documents from there; you can not edit them from the default file view.

oc8ad119

oc8ad120

oc8ad121

If you’ve enabled open_basedir in PHP make sure it has read access to the LibreOffice executable: /usr/bin/libreoffice.

Enable uploading of big files
By default PHP allows you to upload 2MB files max. From https://doc.owncloud.org/server/8.1/admin_manual/configuration_files/big_file_upload_configuration.html?highlight=maximum:

In /etc/php5/apache2/php.ini change:

upload_max_filesize = 16G
post_max_size = 16G
max_input_time = 3600
max_execution_time = 3600

You’ll find explanations of the values above in php.ini. I’m mostly posting it here for myself. Change the values to something sane for your environment.

Cron
For a dedicated ownCloud server I suggest you set cron to cron or. If you don’t care about the speed and you’re the only user set it to Ajax.

Part 7 will be the last part in this series. It will cover backups and restores, and updates. It is not very exciting but exciting is the last thing you need in a production server.