OwnCloud: Difference between revisions

From Alpine Linux
(Suggest using https)
m (typo)
Tag: New redirect
 
(23 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[http://owncloud.org/ ownCloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. You can have your ownCloud instance up and running in 5 minutes with Alpine!
#REDIRECT [[Nextcloud]]
 
{{Obsolete|OwnCloud is deprecated in favor of [[Nextcloud|Nextcloud]]}}
= Installation =
{{pkg|ownCloud}} is available from Alpine 2.5 and greater.
 
Before you start installing anything, make sure you have latest packages available. Make sure you are using a 'http' repository in your {{path|/etc/apk/repositories}} and then run:
{{cmd|apk update}}
{{tip|Detailed information is found in [[Include:Upgrading_to_latest_release|this]] doc.}}
 
== Database ==
First you have to decide which database to use. Follow one of the below database alternatives.
=== sqlite ===
All you need to do is to install the package
{{cmd|apk add owncloud-sqlite}}
{{warning|{{pkg|sqlite}}+{{pkg|owncould}} is known to have some problem, so do not expect it work. This note should be removed when {{pkg|sqlite}}+{{pkg|owncould}} works. <br>''(Still a problem at 2012-11-15)''}}
=== postgresql ===
Install the package
{{cmd|apk add owncloud-pgsql}}
 
Next thing is to configure and start the database
{{cmd|/etc/init.d/postgresql setup
/etc/init.d/postgresql start}}
 
Next you need to create a user, and temporary grant CREATEDB privilege.
{{cmd|psql -U postgres
CREATE USER mycloud WITH PASSWORD 'test123';
ALTER ROLE mycloud CREATEDB;
\q}}
{{Note|Replace the above username 'mycloud' and password 'test123' to something secure. Remember these settings, you will need them later when setting up owncloud.}}
 
=== mysql ===
Install the package
{{cmd|apk add owncloud-mysql mysql-client}}
 
Now configure and start {{pkg|mysql}}
{{cmd|/etc/init.d/mysql setup
/etc/init.d/mysql start
/usr/bin/mysql_secure_installation}}
Follow the wizard to setup passwords etc.
{{Note|Remember the usernames/passwords that you set using the wizard, you will need them later.}}
 
Next you need to create a user, database and set permissions.
{{cmd|mysql -u root -p
CREATE DATABASE owncloud;
GRANT ALL ON owncloud.* TO 'mycloud'@'localhost' IDENTIFIED BY 'test123';
GRANT ALL ON owncloud.* TO 'mycloud'@'localhost.localdomain' IDENTIFIED BY 'test123';
FLUSH PRIVILEGES;
EXIT}}
{{Note|Replace the above username 'mycloud' and password 'test123' to something secure. Remember these settings, you will need them later when setting up owncloud.}}
 
{{pkg|mysql-client}} is not needed anymore. Let's uninstall it:
{{cmd|apk del mysql-client}}
 
== Webserver ==
Next thing is to choose, install and configure a webserver. Choose one alternative from below ''(or setup a webserver of your choise)''
 
=== lighttpd ===
Install the package
{{cmd|apk add lighttpd}}
 
Make sure you have FastCGI enabled in {{pkg|lighttpd}}:
{{cat|/etc/lighttpd/lighttpd.conf|...
include "mod_fastcgi.conf"
...}}
 
Start up the webserver
{{cmd|/etc/init.d/lighttpd start}}
 
{{tip|You might want to follow the [http://wiki.alpinelinux.org/wiki/Lighttpd_Https_access Lighttpd_Https_access] doc in order to configure lighttpd to use https ''(securing your connections to your owncloud server)''.}}
 
=== XYZ webserver ===
You could try installing some other webserver and document it here
* Apache2
* cherokee
* other...
 
=== Other ===
Link owncloud installation to web server directory:
{{cmd|ln -s /usr/share/webapps/owncloud /var/www/localhost/htdocs/owncloud}}
 
== Other settings ==
=== Hardening ===
Consider adding the following line for additional security to the owncloud configuration file, where the password database is stored:
{{cat|/etc/lighttpd/lighttpd.conf|...
url.access-deny {{=}} ("config.php")
...}}
 
=== Additional packages ===
Some large apps, such as texteditor and videoviewer are in separate package:
{{cmd|apk add owncloud-texteditor owncloud-videoviewer}}
 
=== Folder permissions ===
The web server user needs to have ownership on some dirs. This is fixed by running the following commands:
{{cmd|chown -R lighttpd.lighttpd /etc/owncloud
chown -R lighttpd.lighttpd /usr/share/webapps/owncloud/apps
chown -R lighttpd.lighttpd /var/lib/owncloud/data}}
 
= Configure and use ownCloud =
== Configure ==
Point your browser at <code><nowiki>http://<%MY_SERVER_IP%>/owncloud</nowiki></code> and follow the on-screen instructions to complete the installation, supplying the database user and password created before.
 
== Hardening postgresql ==
If you have chosen PGSQL backend, revoke CREATEDB privilege from 'mycloud' user:
{{cmd|psql -U postgres
ALTER ROLE mycloud NOCREATEDB;
\q}}
 
== Clients ==
There are clients available for many platforms, Android included:
* http://owncloud.org/sync-clients/ ''(ownCloud Sync clients)''
* http://owncloud.org/support/android/ ''(Android client)''
 
[[Category:Server]]

Latest revision as of 23:15, 20 December 2021

Redirect to:

This material is obsolete ...

OwnCloud is deprecated in favor of Nextcloud (Discuss)