https://wiki.archlinux.org/api.php?action=feedcontributions&user=Tsa6&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:02:46ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Luakit&diff=508760Luakit2018-01-28T14:43:49Z<p>Tsa6: The directory Luakit readds adblock lists from is `~/.local/share/luakit/adblock/`. Saving files to `~/.local/share/luakit/` will not do anything.</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ja:Luakit]]<br />
[https://luakit.github.io/luakit/ Luakit] is an extremely fast, lightweight and flexible web browser using the webkit engine.<br />
It is customizable through lua scripts and fully usable with keyboard shortcuts.<br />
It uses GTK+ 3 and WebKit2GTK+.<br />
<br />
{{Warning|This page has been updated, but Luakit is in rapid development nowadays, and discrepancies may occur. Also, there is much more to document than found here.}}<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{AUR|luakit-git}} from the [[AUR]]. Only this development version<br />
is available for the moment.<br />
<br />
With the Unix philosophy in mind, Luakit is entirely customizable through its configuration files.<br />
Those files are written in the Lua scripting language, thus allowing virtually unlimited features.<br />
<br />
However, those configuration files are quite vital to Luakit and shouldn't be<br />
modified, unless you really know what you are doing. Actually, any module<br />
found in {{ic|~/.config/luakit}} is ignored if it has the same name as a<br />
configuration file (e.g. {{ic|binds.lua}}).<br />
<br />
You can copy {{ic|/etc/xfg/luakit/rc.lua}} to {{ic|~/.config/luakit}} if<br />
you really want to control which files are loaded. Do it as your own risk.<br />
Copying {{ic|rc.lua}} isn't the preferred way to configure Luakit anymore.<br />
See [[#Configuration]] instead.<br />
<br />
== Basic usage ==<br />
<br />
{{note|Shortcuts are listed in a special page accessible with the {{ic|:binds}} command.}}<br />
<br />
Press {{ic|:}} to access the command prompt. You can do nearly everything from there.<br />
Use {{ic|Tab}} to autocomplete commands.<br />
<br />
Use the {{ic|:help}} command to get information on the available keyboard shortcuts and what they do. (To see how the action for a particular keyboard shortcut is implemented in Lua, click anywhere in its help text.)<br />
<br />
To quit, use the {{ic|:quit}} command, or press {{ic|Shift+z}} followed by {{ic|Shift+q}}.<br />
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the {{ic|:writequit}} command instead, or pressing {{ic|Shift+z}} twice.<br />
<br />
=== Browsing ===<br />
<br />
* Press {{ic|o}} to open a prompt with the {{ic|:open}} command and enter the URI you want. Press {{ic|Shift+o}} to edit the current URI.<br />
* If it is not a recognized URI, Luakit will use the default search engine. See [[#Custom search engines]].<br />
* Specify which search engine to use by prefixing the entry with the appropriate keywork (e.g. {{ic|:open google foobar}} will search ''foobar'' on Google).<br />
* Use common shortcuts to navigate. For [[emacs]] and [[vim]] ''aficionados'', some of their regular shortcuts are provided. You can use the mouse as well.<br />
* Use {{ic|f}} to display the index of all visible links. Enter the appropriate number or a part of the string to open the link.<br />
* Use {{ic|Shift+f}} instead to open link in a new tab.<br />
* Press {{ic|Ctrl+t}} to open a new tab, {{ic|Ctrl+w}} to close it. Press {{ic|t}} to prompt for an URI to be opened in a new tab, and {{ic|Shift+t}} to edit the current URI in a new tab.<br />
* Press {{ic|w}} to prompt for an URI to be opened in a new window, and {{ic|Shift+w}} to edit the current URI in a new window.<br />
* Switch from one tab to another by pressing {{ic|g}} followed by {{ic|t}} or {{ic|Shift+t}}, or use {{ic|Ctrl+PageUp}} and {{ic|Ctrl+PageDown}}.<br />
* You can switch to a specific tab with {{ic|Alt+''number''}}.<br />
* Use {{ic|Shift+h}} to go back in the browser history.<br />
* Use {{ic|Shift+l}} to go forward in the browser history.<br />
* Reorder the tabs with {{ic|<}} and {{ic|>}}.<br />
* Reload the page with {{ic|r}}, stop the loading with {{ic|Ctrl+c}}.<br />
* Re-open last closed tab with {{ic|u}}.<br />
* Open downloads page by pressing {{ic|g}} followed by {{ic|d}} (or {{ic|Shift+d}} for a new tab).<br />
* Copy URI to primary selection with {{ic|y}}.<br />
* View page source code with {{ic|:viewsource}}. Return to normal view with {{ic|:viewsource!}}.<br />
* View image source by pressing {{ic|;}} followed by {{ic|i}} (or {{ic|Shift+i}} for new tab).<br />
* Inspect elements with {{ic|:inspect}}. Repeat to open in a new window. Disable inspector with {{ic|:inspect!}}.<br />
<br />
=== Input fields ===<br />
<br />
Many webpages have editable elements like dropdown lists, checkboxes, text fields and so on. While they work perfectly with the mouse, you may encounter some troubles using the ''follow'' commands.<br />
In such a case, pressing the arrow keys may help.<br />
Alternatively, the {{ic|g}} {{ic|i}} shortcut can be used to focus input.<br />
<br />
=== Bookmarks ===<br />
<br />
If enabled (default configuration), bookmarks can be used from within Luakit.<br />
<br />
* The {{ic|:bookmarks}} command opens the bookmarks page. (Shortcut: {{ic|g}} followed by {{ic|b}}, or {{ic|Shift+b}} for a new tab).<br />
* The {{ic|:bookmark [''URI'' [''tags'']]}} command adds the URI specified (or the current tab's URI, if omitted) to the bookmarks by specified tags. Starting from version 2012-09-13-r1, bookmarks page will be opened (new tab) in new bookmark editing mode before saving. (Shortcut: {{ic|Shift+b}}).<br />
<br />
== Configuration ==<br />
<br />
Configuration is done in {{ic|~/.config/luakit/userconf.lua}}. It is not<br />
necessary anymore to copy and modify {{ic|rc.lua}}. Some settings can also be<br />
modified with the {{ic|:settings}} command, unless you set them in {{ic|userconf.lua}} with:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
local settings = require "settings"<br />
settings.example = "some value"<br />
}}<br />
<br />
=== Key bindings ===<br />
<br />
Most bindings will require some knowledge of Luakit, but you can at least do<br />
simple things rebinding:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
local modes = require "modes"<br />
<br />
-- Creates new bindings from old ones.<br />
modes.remap_binds("normal", -- This is the mode in which the bindings are active.<br />
{<br />
-- new old removes the old binding (defaults to false)<br />
{"O", "t", true},<br />
-- define as many as you wish<br />
{"Control-=", "zi"},<br />
...<br />
})<br />
}}<br />
<br />
To bind keys to commands, you can use the following template:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
modes.add_binds("normal", {<br />
-- {"<key>",<br />
-- "<description>",<br />
-- function (w) w:enter_cmd("<command>") end}<br />
{"O", "Open URL in a new tab.",<br />
function (w) w:enter_cmd(":tabopen ") end},<br />
...<br />
})<br />
}}<br />
<br />
For inspiration, see {{ic|/usr/share/luakit/lib/binds.lua}}, where the default<br />
bindings are defined.<br />
<br />
=== Homepage ===<br />
<br />
Set your homepage as follows:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
settings.window.home_page = "www.example.com"<br />
}}<br />
<br />
=== Custom search engines ===<br />
<br />
To search with the default search engine, press {{ic|o}} and type the phrases. To search with a different engine, type it's name after {{ic|o}} and then the phrases.<br />
<br />
You can virtually add any search engine you want. Make a search on the website you want and copy paste the URI to the Luakit configuration by replacing the searched terms with an {{ic|%s}}. Example:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
local engines = settings.window.search_engines<br />
engines.aur = "<nowiki>https://aur.archlinux.org/packages.php?O=0&K=%s&do_Search=Go</nowiki>",<br />
engines.aw = "<nowiki>https://wiki.archlinux.org/index.php/Special:Search?fulltext=Search&search=%s</nowiki>",<br />
engines.googleseceng = "<nowiki>https://www.google.com/search?name=f&hl=en&q=%s</nowiki>",<br />
}}<br />
<br />
The variable is used as a keyword for the {{ic|:open}} command in Luakit.<br />
<br />
Set the defaut search engine by using this same keyword:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
engines.default = search_engines.aur<br />
}}<br />
<br />
Instead of strings, you can defined search engines as functions that return a<br />
string. For instance, here's a Wikipedia search engine that lets you specify<br />
a language (defaulting to English):<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
engines.wikipedia = function (arg)<br />
local l, s = arg:match("^(%a%a):%s*(.+)")<br />
if l then<br />
return "https://" .. l .. ".wikipedia.org/wiki/Special:Search?search=" .. s<br />
else<br />
return "https://en.wikipedia.org/wiki/Special:Search?search=" .. arg<br />
end<br />
end,<br />
}}<br />
<br />
If called as {{ic|:open wikipedia arch linux}}, this will open the Arch Linux<br />
page on the English Wikipedia; with {{ic|:open wikipedia fr: arch linux}},<br />
this will use the French Wikipedia instead.<br />
<br />
=== Download location ===<br />
<br />
To specify download location:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
require "downloads"<br />
downloads.default_dir = os.getenv("HOME") .. "/mydir"<br />
}}<br />
<br />
Default location is {{ic|$XDG_DOWNLOAD_DIR}} if it exists, {{ic|$HOME/downloads}} otherwise.<br />
<br />
=== Adblock ===<br />
<br />
Adblock is loaded by default, but you need to:<br />
<br />
* Fetch an adblock-compatible list, like [https://easylist-downloads.adblockplus.org/easylist.txt Easylist], and save it to {{ic|~/.local/share/luakit/adblock}}.<br />
* Restart Luakit to load the extension.<br />
* Use {{ic|:adblock-list-enable ''number''}} command within Luakit to turn Adblock's list(s) you downloaded on Adblock itself becomes enabled on startup.<br />
Full info on enabled lists and AdBlock state can be found using {{ic|:adblock}} or {{ic|g}} {{ic|Shift+a}} at {{ic|luakit://adblock/}} internal page, if the {{ic|adblock_chrome}} module is enabled, which is not a mandatory part.<br />
<br />
{{Note|For Adblock to run in '''normal''' mode, {{ic|easylist.txt}} and any others must be placed in {{ic|~/.local/share/luakit/adblock}}}}<br />
<br />
=== Bookmarks management ===<br />
<br />
==== Sync ====<br />
<br />
Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: {{ic|~/.local/share/luakit/bookmarks.db}}.<br />
<br />
You can put a symbolic link in place of the default file to store your bookmarks anywhere on your machine.<br />
This way if your are using a cloud sync application like Dropbox, you can keep your bookmarks synchronized between your different computers.<br />
<br />
==== Converting plain text bookmarks to SQLite format ====<br />
<br />
Bookmarks were stored in a simple plain text file: {{ic|~/.local/share/luakit/bookmarks}}. Each line is a bookmark. It is composed of 2 fields, the ''link'' and the ''group'' which are separated by a ''tab'' character.<br />
<br />
{{Warning|If spaces are inserted instead of tabulation character, the link will not be properly bookmarked.}}<br />
<br />
{{Note|Groups and links are alphabetically sorted, so there is no need to do it manually.}}<br />
<br />
To use bookmarks with the latest Luakit release, the file must be converted.<br />
A sample Lua script will do that:<br />
<br />
{{hc|bookmarks_plain_to_sqlite.lua|<nowiki><br />
local usage = [[Usage: luakit -c bookmarks_plain_to_sqlite.lua [bookmark plaintext path] [bookmark db path]<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
old_db = assert(io.open(old_db_path, "r"))<br />
local data = old_db:read("*all")<br />
assert(old_db:close())<br />
<br />
-- Init new_db, otherwise sqlite queries will fail.<br />
new_db = sqlite3{ filename = new_db_path }<br />
new_db:exec("CREATE TABLE IF NOT EXISTS bookmarks (id INTEGER PRIMARY KEY, uri TEXT NOT NULL, title TEXT NOT NULL, desc TEXT NOT NULL, tags TEXT NOT NULL, created INTEGER, modified INTEGER )")<br />
<br />
-- Fill<br />
local url,tag<br />
<br />
for line in data:gmatch("[^\n]*\n?") do<br />
<br />
if string.len(line) > 1 then<br />
<br />
print ("["..line.."]")<br />
<br />
-- Get url and tag (if present) from first line.<br />
_, _, url, tag = string.find(line, "([^\n\t]+)\t*([^\n]*)\n?")<br />
<br />
-- Optional yet convenient output.<br />
io.write(url)<br />
io.write("\t")<br />
io.write(tag)<br />
io.write("\n")<br />
<br />
-- DB insertion. Nothing will be overwritten. If URL and/or tag already exists, then a double is created.<br />
new_db:exec("INSERT INTO bookmarks VALUES (NULL, ?, ?, ?, ?, ?, ?)", <br />
{<br />
url, "", "", tag or "",<br />
os.time(), os.time()<br />
})<br />
end<br />
end<br />
<br />
print("Import finished.")<br />
print("\nVacuuming database...")<br />
new_db:exec "VACUUM"<br />
print("Vacuum done.")<br />
<br />
luakit.quit(0)<br />
</nowiki>}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmark'' ''path/to/db''<br />
<br />
The old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exists, do not worry, none of the previous bookmarks will be touched. However, this behaviour implies that you might get some doubles.<br />
<br />
==== Import from Firefox ====<br />
<br />
{{Note|This works only for Luakit versions before 2012.03.25! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as described at [[#Converting plain text bookmarks to SQLite format]].}}<br />
<br />
To import bookmarks from Firefox, first they must be exported to an HTML file using its bookmarks manager. After that the XML file can be converted to a Luakit format.<br />
<br />
The following one-line awk command will do that:<br />
<br />
{{bc|<nowiki><br />
$ cat bookmarks.html | awk '<br />
{gsub(/\"/," ")}<br />
/<\/H3>/{FS=">";gsub(/</,">");og=g;g=$(NF-2);FS=" "}<br />
/<DL>/{x++;if(x>= 3)gl[x-3]=g}<br />
/<\/DL>/{x--;if(x==2)g=og"2"}<br />
/HREF/{gsub(/</," ");gsub(/>/," ");if(g!=""){if(og!=g){printf "\n";og=g};printf "%s\t",$4;if(x>=3){for(i=0;i<=x-4;i++){printf "%s-",gl[i]}printf "%s\n",gl[x-3]}else{printf "\n"}}}'<br />
</nowiki>}}<br />
<br />
The more readable version of the script:<br />
<br />
{{hc|ff2lk.awk|<nowiki><br />
# Notes: 'folders' for Firefox bookmarks mean 'groups' for Luakit.<br />
<br />
# Put spaces where it is needed to delimit words properly.<br />
{gsub(/\"/," ")}<br />
<br />
# Since the folder name may have spaces, delimiter must be ">" here.<br />
/<\/H3>/ {<br />
FS=">"<br />
gsub(/</,">")<br />
oldgroup=group<br />
group=$(NF-2)<br />
FS=" "<br />
}<br />
<br />
# Each time a <DL> is encountered, it means we step into a subfolder.<br />
# 'count' is the depth level.<br />
# Base level starts at 2 (Firefox fault).<br />
# 'groupline' is an array of all parent folders.<br />
/<DL>/ {<br />
count++<br />
if ( count >= 3 )<br />
groupline[count-3]=group<br />
}<br />
<br />
# On </DL>, we step out.<br />
# If if return to the base level (i.e. not in a folder), then we give 'group' a fake name different<br />
# from 'oldgroup' to make sure a line will be skipped (see below).<br />
/<\/DL>/ {<br />
count--<br />
if( count == 2 )<br />
group=oldgroup"ROOT"<br />
}<br />
<br />
# The bookmark name.<br />
# If oldgroup is different than group, (i.e. folder changed) then we skip a line.<br />
# If we are in a folder, then we print the group name, i.e. all parents plus the current folder<br />
# separated by an hyphen.<br />
/HREF/ {<br />
gsub(/</," ")<br />
gsub(/>/," ")<br />
if (group != "")<br />
{<br />
if(oldgroup != group)<br />
{<br />
printf "\n"<br />
oldgroup=group<br />
}<br />
printf "%s\t",$4<br />
if ( count >= 3 )<br />
{<br />
for ( i=0 ; i <= count-4 ; i++ )<br />
{printf "%s-" , groupline[i]}<br />
printf "%s" , groupline[count-3]<br />
}<br />
printf "\n"<br />
}<br />
}</nowiki><br />
}}<br />
<br />
Run it with<br />
<br />
$ awk -f ff2lk.awk bookmarks.html >> bookmarks<br />
<br />
==== Export bookmarks ====<br />
<br />
The following script let you export Luakit bookmarks from its SQLite format to a plain text file. The resulting file may be suitable for other web browsers, or may be easily parsed by import scripts.<br />
<br />
{{hc|bookmarks_sqlite_to_plain.lua|<nowiki><br />
-- USER CONFIG<br />
<br />
local sep = " "<br />
<br />
-- END OF USER CONFIG<br />
<br />
local usage = [[Usage: luakit -c bookmarks_sqlite_to_plain.lua [bookmark db path] [bookmark plain path]<br />
<br />
DB scheme is<br />
<br />
bookmarks (<br />
id INTEGER PRIMARY KEY,<br />
uri TEXT NOT NULL,<br />
title TEXT NOT NULL,<br />
desc TEXT NOT NULL,<br />
tags TEXT NOT NULL,<br />
created INTEGER,<br />
modified INTEGER<br />
);<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
new_db = assert(io.open(new_db_path, "w"))<br />
<br />
-- Open old_db<br />
old_db = sqlite3{ filename = old_db_path }<br />
<br />
-- Load all db values to a string variable.<br />
local rows = old_db:exec [[ SELECT * FROM bookmarks ]]<br />
<br />
-- Iterate over all entries.<br />
-- Note: it could be faster to use one single concatenation for all entries, but<br />
-- it would be much more code and not so flexible. It is desirable to focus on<br />
-- clarity. After all, only a few hundred lines are handled.<br />
for _, b in ipairs(rows) do<br />
<br />
-- Change %q for %s to remove double quotes if needed.<br />
-- You can toggle the desired fields with comments.<br />
local outputstr = <br />
string.format("%q%s", b.uri or "", sep) .. <br />
string.format("%q%s", b.title or "", sep) ..<br />
string.format("%q%s", b.desc or "", sep) ..<br />
string.format("%q%s- ", b.tags or "", sep) ..<br />
((b.created or "" ) .. sep) ..<br />
((b.modified or "" ) .. sep) ..<br />
"\n"<br />
<br />
-- Write entry to file.<br />
new_db:write(outputstr)<br />
end<br />
<br />
<br />
print("Export done.")<br />
<br />
assert(new_db:close())<br />
<br />
luakit.quit(0)</nowiki><br />
}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmarks'' ''path/to/database''<br />
<br />
=== Tor ===<br />
<br />
Once [[Tor]] has been setup, simply run:<br />
<br />
$ torify luakit<br />
<br />
{{warning|To be sure of anonymity, you also need to change settings within Luakit, such as disabling Flash and changing the useragent string.}}<br />
<br />
=== Custom CSS ===<br />
<br />
Locate the {{ic|styles}} sub-directory within luakit's data storage directory.<br />
Normally, this is located at {{ic|~/.local/share/luakit/styles/}}. Create the<br />
directory if it does not already exist.<br />
Move any CSS rules to a new file within that directory. The filename must end in {{ic|.css}}.<br />
Make sure you specify which sites your stylesheet should apply to. The way to<br />
do this is to use {{ic|@-moz-document}} rules. The Stylish wiki page [https://github.com/stylish-userstyles/stylish/wiki/Applying-styles-to-specific-sites Applying styles to specific sites] may be helpful.<br />
Run {{ic|:styles-reload}} to detect new stylesheet files and reload any changes to<br />
existing stylesheet files; it isn't necessary to restart luakit.<br />
<br />
To open the styles menu, run the command {{ic|:styles-list}}. Here you can<br />
enable/disable stylesheets, open stylesheets in your text editor, and view<br />
which stylesheets are active.<br />
<br />
If a stylesheet is disabled for all pages, its state will be listed as<br />
"Disabled". If a stylesheet is enabled for all pages, but does not apply to<br />
the current page, its state will be listed as "Enabled". If a stylesheet is<br />
enbaled for all pages _and_ it applies to the current page, its state will be<br />
listed as "Active".<br />
<br />
== See also ==<br />
<br />
* [http://luakit.github.io/luakit/ Home page]<br />
* [http://shariebeth.com/computers/luakitcheatsheet.txt Cheatsheet]</div>Tsa6https://wiki.archlinux.org/index.php?title=Universal_Media_Server&diff=507565Universal Media Server2018-01-15T04:35:49Z<p>Tsa6: Added detail specifying that the config file should be copied from /opt/ums/UMS.conf, which contains very nice documentation, to ~/.config/UMS/UMS.conf, which does not contain very nice documentation originally.</p>
<hr />
<div>[[Category:Streaming]]<br />
[[ja:Universal Media Server]]<br />
[http://www.universalmediaserver.com/ Universal Media Server] is a DLNA-compliant UPnP Media Server.<br />
It is based on PS3 Media Server by shagrath. It is actually an evolution of the "SubJunk Build" of PMS.<br />
UMS was started by SubJunk, an official developer of PMS, in order to ensure greater stability and file-compatibility.<br />
<br />
Because it is written in Java, Universal Media Server supports all major operating systems, with versions for Windows, Linux and Mac OS X.<br />
The program streams or transcodes many different media formats with little or no configuration.<br />
It is powered by MEncoder, FFmpeg, tsMuxeR, AviSynth, MediaInfo and more, which combine to offer support for a wide range of media formats.<br />
<br />
== Installation ==<br />
<br />
Universal Media Server is available in the [[AUR]] via {{AUR|ums}}.<br />
<br />
== Configuration ==<br />
<br />
UMS can be run on a per-user basis. Run the executable at {{ic|/opt/ums/UMS.sh}} once, then copy the config file at {{ic|/opt/ums/UMS.conf}} to {{ic|~/.config/UMS/UMS.conf}} and edit it. The {{ic|port}}, {{ic|folders}}, and {{ic|minimized}} options in {{ic|UMS.conf}} are especially noteworthy.</div>Tsa6https://wiki.archlinux.org/index.php?title=Folding@home&diff=499078Folding@home2017-11-25T17:01:21Z<p>Tsa6: /* Installation */ Added information about the drivers needed for using a GPU for folding.</p>
<hr />
<div>[[Category:Mathematics and science]]<br />
[[ja:Folding@home]]<br />
From the project [http://folding.stanford.edu/ home page]:<br />
: ''Help Stanford University scientists studying Alzheimer's, Huntington's, Parkinson's, and many cancers by simply running a piece of software on your computer. The problems we are trying to solve require so many calculations, we ask people to donate their unused computer power to crunch some of the numbers. In just 5 minutes... Add your computer to over 333,684 others around the world to form the world's largest distributed supercomputer.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|foldingathome}} package. In order to use your GPU for folding (highly recommended), you'll need the appropriate [[GPGPU#OpenCL|OpenCL]] package for your GPU. Nvidia users can also use [[GPGPU#CUDA|CUDA]].<br />
<br />
== Configuration ==<br />
<br />
Run {{ic|/opt/fah/FAHClient --configure}} as root to generate a configuration file at {{ic|/opt/fah/config.xml}} (the Arch Linux team number is 45032). Alternately, you can write {{ic|/opt/fah/config.xml}} by hand and use {{ic|/opt/fah/sample-config.xml}} as a reference. With a config file in place, you can start the daemon, check its status, and make the daemon automatically start at boot time.<br />
<br />
$ cd /opt/fah<br />
# ./FAHClient --configure<br />
<br />
Then [[start/enable]] the {{ic|foldingathome.service}} systemd unit.<br />
<br />
=== The graphical way ===<br />
<br />
You can manage the daemon by opening a web browser and heading to http://localhost:7396/. Alternately, you can install {{AUR|fahcontrol}} and use the FAHControl program.<br />
<br />
The daemon can also be controlled remotely. Instructions for doing so are listed in {{ic|/opt/fah/sample-config.xml}}. Remember to open firewall ports if necessary.<br />
<br />
=== The terminal way ===<br />
<br />
To see the current progress of foldingathome, simply {{ic|$ tail /opt/fah/log.txt}}.<br />
<br />
The behaviour of foldingathome can be customized by editing {{ic|/opt/fah/config.xml}}. Some options that can be specified:<br />
<br />
* bigpackets, defines whether you will accept memory intensive work loads. If you have no problem with Folding@home using up more of your RAM, then set this to big. Other settings are normal and small.<br />
* passkey, to uniquely identify you. Though not needed, it provides some measure of security. For details, see [http://folding.stanford.edu/English/FAQ-passkey]<br />
<passkey v='passkey'/><br />
* Slots for CPU or GPU<br />
<slot id='0' type='CPU'/><br />
<br />
=== Run f@h with limited privileges ===<br />
It's not necessary to run folding with root privileges.<br />
<br />
Create a dedicated user {{ic|fah}} for folding without critical privileges:<br />
# useradd -u 999 -s /sbin/nologin fah<br />
<br />
{{Note|If -u 999 is already taken, choose another number below 1000 to make login managers hide the user.}}<br />
<br />
Now [[edit]] the {{ic|foldingathome.service}} to use the new user:<br />
<br />
{{hc|# systemctl edit foldingathome.service|2=<br />
[Service]<br />
User=fah<br />
WorkingDirectory=/var/opt/fah<br />
ExecStart=<br />
ExecStart=/opt/fah/FAHClient --config /var/opt/fah/config.xml --exec-directory=/opt/fah --data-directory=/var/opt/fah<br />
}}<br />
<br />
Create new working directory for this service, copy the config file generated by {{ic|FAHClient --configure}} to it, make the user {{ic|fah}} own it:<br />
# mkdir /var/opt/fah<br />
# cp /opt/fah/config.xml /var/opt/fah/<br />
# chown -R fah:fah /var/opt/fah<br />
<br />
[[Start]] {{ic|foldingathome.service}}.<br />
<br />
== Monitoring work-unit progress ==<br />
<br />
There are several ways of monitoring the progress of your FAH clients, both on the command line and by GUI.<br />
<br />
The FAHControl software distributed by folding at home provides you with efficient means to control remote hosts.<br />
Just add another client with the corresponding button "Add" and enter the name, ip address, port and password (if you set one) and hit save. The software should now try to establish<br />
a connection to the remote host and show you the progress in a seperate client tab.<br />
<br />
In AUR there is {{AUR|fahmon}}{{Broken package link|{{aur-mirror|fahmon}}}}, which provides a GUI with the ability to watch multiple clients and get info on the work-unit itself. Fahmon has a dedicated site at [http://www.fahmon.net/ http://www.fahmon.net/]<br />
<br />
On the CLI, you can add a command to your shell configuration file (e.g: ''.bashrc'' or ''.zshrc''). Replace ''fah_user'' with the actual user first.<br />
<br />
{{bc|<br />
fahstat() {<br />
echo<br />
echo $(date)<br />
echo<br />
cat /opt/fah/''fah_user''/unitinfo.txt<br />
}<br />
}}<br />
<br />
Or for multiple clients :<br />
<br />
{{bc|<br />
fahstat() {<br />
echo<br />
echo $(date)<br />
echo<br />
echo "Core 1:";cat /opt/fah/''fah_user''/unitinfo.txt<br />
echo<br />
echo "Core 2:";cat /opt/fah2/''fah_user''/unitinfo.txt<br />
}<br />
}}<br />
<br />
Also, replacing {{ic|cat}} with {{ic|tail -n1}} will give just the percentage of work unit complete.<br />
<br />
On foldingathome-smp 6.43, the ''unitinfo.txt'' file is not placed inside the user folder. The correct directory would be {{ic|/opt/fah-smp/unitinfo.txt}}.<br />
<br />
== See also ==<br />
<br />
* Folding@home [http://folding.stanford.edu/ site] <br />
* Folding@home [http://folding.stanford.edu/home/faq/ FAQ] <br />
* Folding@home [http://folding.stanford.edu/home/guide/configuration-guide/ Configuration Guide]<br />
* Folding@home [http://folding.stanford.edu/home/faq/faq-smp SMP Client FAQ]<br />
* Arch Folding@home [http://fah-web.stanford.edu/cgi-bin/main.py?qtype=teampage&teamnum=45032 team page]<br />
* Extended Arch team statistics in [http://folding.extremeoverclocking.com/team_summary.php?s=&t=45032 extremeoverclocking.com]</div>Tsa6https://wiki.archlinux.org/index.php?title=Nextcloud&diff=490818Nextcloud2017-09-20T02:05:22Z<p>Tsa6: Added instructions to install apache, and more importantly to install the php module — a required step that was previously implied, but might easily be missed.</p>
<hr />
<div>[[Category:Web applications]]<br />
[[fr:Owncloud]]<br />
[[ja:Nextcloud]]<br />
{{Related articles start}}<br />
{{Related|Apache HTTP Server}}<br />
{{Related|LAMP}}<br />
{{Related|LEMP}}<br />
{{Related|Nginx}}<br />
{{Related|OpenSSL}}<br />
{{Related|WebDAV}}<br />
{{Related articles end}}<br />
<br />
{{Out of date|OwnCloud has been droppped; Nextcloud has been added. Many sections still refer to OwnCloud.}}<br />
<br />
From [[Wikipedia:ownCloud|Wikipedia]]:<br />
<br />
:Nextcloud is a suite of client-server software for creating file hosting services and using them.<br />
It is functionally very similar to the widely used Dropbox, with the primary functional difference being<br />
that Nextcloud is free and open-source, and thereby allowing anyone to install and operate it without charge<br />
on a private server. In contrast to proprietary services like Dropbox, the open architecture allows adding<br />
additional functionality to the server in form of so-called applications.<br />
<br />
For differences between Nextcloud and ownCloud see [[wikipedia:Nextcloud#Differences from ownCloud]].<br />
<br />
== Prerequisites ==<br />
Nextcloud requires several components:<br />
* A web server: [[Apache]] or [[nginx]]<br />
* A database: [[MariaDB]] or [[PostgreSQL]]<br />
* [[PHP]] with [[#PHP_setup|additional modules]].<br />
<br />
These will be configured in [[#Setup]].<br />
<br />
Make sure the required components are installed before proceeding.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|nextcloud}} package.<br />
<br />
== Setup ==<br />
<br />
As stated above, in order to setup Nextcloud, you must set up the appropriate PHP requirements;<br />
additionally, you must configure a database and a webserver.<br />
<br />
=== Pre-install ===<br />
<br />
Arch packages Nextcloud in a way where the ''apps'' folder only has the webserver as a group without web permissions and the ''data'' folder is nonexistent.<br />
<br />
The easiest non-conflicting way is to create a new writable folder for apps and also create a writable data folder. Replace the http group with the group your webserver uses if needed.<br />
<br />
# mkdir -p /usr/share/webapps/nextcloud/data<br />
# mkdir -p /usr/share/webapps/nextcloud/apps2<br />
# chown http:http /usr/share/webapps/nextcloud/data<br />
# chown http:http /usr/share/webapps/nextcloud/apps2<br />
# chmod 700 /usr/share/webapps/nextcloud/data<br />
# chmod 700 /usr/share/webapps/nextcloud/apps2<br />
<br />
Next edit the configuration file and add following lines to the $CONFIG array.<br />
<br />
'apps_paths' => <br />
array (<br />
0 => <br />
array (<br />
'path' => '/usr/share/webapps/nextcloud/apps',<br />
'url' => '/apps',<br />
'writable' => false,<br />
),<br />
1 => <br />
array (<br />
'path' => '/usr/share/webapps/nextcloud/apps2',<br />
'url' => '/apps2',<br />
'writable' => true,<br />
),<br />
),<br />
<br />
=== PHP setup ===<br />
<br />
{{Tip|For all prerequisite PHP modules, see upstream documentation: [https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#prerequisites-label Nextcloud 12.0].}}<br />
<br />
Install [[PHP#gd]], {{pkg|php-intl}} and {{pkg|php-mcrypt}} as additional modules.<br />
<br />
Depending on which database backend will be used:<br />
* For [[MySQL]], see [[PHP#MySQL/MariaDB]].<br />
* For [[PostgreSQL]], see [[PHP#PostgreSQL]].<br />
* For [[SQLite]], see [[PHP#Sqlite]].<br />
<br />
Performance may be improved through the implementation of [[PHP#Caching|caching]], see<br />
[https://docs.nextcloud.com/server/12/admin_manual/configuration_server/caching_configuration.html Configuring Memory Caching]<br />
on the official documentation for details.<br />
<br />
=== Database setup ===<br />
<br />
An SQL database must be setup and used for your Nextcloud installation. After setting up the database here,<br />
you will be prompted for its information when you first create an administrator account.<br />
<br />
==== MariaDB ====<br />
<br />
{{Note|It's is highly recommended to set {{ic|binlog_format}} to ''mixed'' [https://docs.nextcloud.com/server/12/admin_manual/configuration_database/linux_database_configuration.html#db-binlog-label] in {{ic|/etc/mysql/my.cnf}}.}}<br />
<br />
The following is an example of setting up a [[MariaDB]] database and user:<br />
<br />
{{hc|$ mysql -u root -p|2=<br />
mysql> CREATE DATABASE `'''nextcloud'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql> CREATE USER `'''nextcloud'''`@'localhost' IDENTIFIED BY ''''password'''';<br />
mysql> GRANT ALL PRIVILEGES ON `'''nextcloud'''`.* TO `'''nextcloud'''`@`localhost`;<br />
mysql> \q<br />
}}<br />
<br />
==== PostgreSQL ====<br />
<br />
The following is an example of setting up a [[PostgreSQL]] user and database:<br />
{{hc|1=$ sudo -u postgres createuser -h localhost -P nextcloud|2=<br />
Enter password for new role:<br />
Enter it again:<br />
}}<br />
<br />
$ sudo -u postgres createdb -O nextcloud nextcloud<br />
<br />
=== Webserver setup ===<br />
<br />
{{Warning|It is recommended to use TLS/SSL (HTTPS) over plain HTTP, see [[Apache#TLS/SSL]] or [[Nginx#TLS/SSL]] for examples and implement this in the examples given below.}}<br />
<br />
Depending on which [[webserver]] you are using, further setup is required, indicated below.<br />
<br />
==== Apache ====<br />
<br />
If you haven't already, install [[Apache]] and install and enable [[Apache#PHP|Apache's PHP module]]<br />
<br />
Copy the Apache configuration file to the configuration directory:<br />
<br />
# cp /etc/webapps/nextcloud/apache.example.conf /etc/httpd/conf/extra/nextcloud.conf<br />
<br />
Modify the file according to your preferences. By default it includes an alias<br />
for {{ic|/nextcloud}} pointing to {{ic|/usr/share/webapps/nextcloud}}.<br />
<br />
And include it in {{ic|/etc/httpd/conf/httpd.conf}}:<br />
Include conf/extra/nextcloud.conf<br />
<br />
Ensure that the root location of your Nextcloud installation (e.g., {{ic|/usr/share/webapps/nextcloud}}) is accessible by the webserver's user {{ic|http}}.<br />
<br />
Now restart Apache ({{ic|httpd.service}}).<br />
<br />
===== WebDAV =====<br />
ownCloud comes with its own [[WebDAV]] implementation enabled, which may conflict with the one shipped with Apache. If you have enabled WebDAV (not enabled by default), disable the modules {{ic|mod_dav}} and {{ic|mod_dav_fs}} in {{ic|/etc/httpd/conf/httpd.conf}}. See [https://forum.owncloud.org/viewtopic.php?f=17&t=7240] for details.<br />
<br />
==== Nginx ====<br />
Create an empty directory to hold the cloud-specific config file:<br />
# mkdir /etc/nginx/conf.d/<br />
<br />
In {{ic|/etc/nginx/nginx.conf}}, add the following lines under the "http" section:<br />
<br />
http {<br />
...<br />
...<br />
server_names_hash_bucket_size 64;<br />
include conf.d/*.conf;<br />
}<br />
<br />
<br />
Create a config file {{ic|/etc/nginx/conf.d/nextcloud.conf}} according to the [https://docs.nextcloud.com/server/12/admin_manual/installation/nginx.html documentation]. You will have to change the {{ic|root}} location, as the Arch package installs to {{ic|/usr/share/webapps/nextcloud}} instead of {{ic|/var/www/nextcloud}}.<br />
<br />
Addtitionally, you change the php-handler block so it looks like this one <br />
<br />
upstream php-handler {<br />
server unix:/run/php-fpm/php-fpm.sock;<br />
}<br />
<br />
in the {{ic|/etc/nginx/conf.d/nextcloud.conf}} file.<br />
<br />
From this point on, it is recommended to obtain a secure-certificates using [[Let's Encrypt]], see [[#Security Hardening]].<br />
<br />
===== PHP-FPM configuration =====<br />
<br />
Make sure PHP-FPM has been configured correctly as described in [[Nginx#FastCGI]].<br />
<br />
Uncomment {{ic|1=env[PATH] = /usr/local/bin:/usr/bin:/bin}} in {{ic|/etc/php/php-fpm.d/www.conf}} and [[restart]] {{ic|php-fpm.service}} to apply the changes.<br />
<br />
== Initialize ==<br />
<br />
Open the address where you have installed Nextcloud in a web browser (e.g., https://www.examples.com/nextcloud).<br />
From there follow the instructions in adding an administrator account as well as selecting the database you created earlier.<br />
<br />
== Security Hardening ==<br />
<br />
The [https://docs.nextcloud.com/server/12/admin_manual/configuration_server/harden_server.html Nextcloud Hardening and Security]<br />
article guides along generic topics. See also the project's [https://scan.nextcloud.com/ Security scanner].<br />
<br />
=== Let's Encrypt ===<br />
==== nginx ====<br />
{{Move|Let's Encrypt|A simple example of configuring an 'empty' domain for Let's Encrypt should be created. The example file given is too big and could be far easier.}}<br />
1. Create the cloud configuration {{ic|/etc/nginx/conf.d/cloud-initial.conf}} using [https://github.com/graysky2/configs/blob/master/nginx/nextcloud-initial.conf this initial file] as a template. Substitute the literal "@@FQDN@@" in the template file with the actual [[wikipedia:Fully_qualified_domain_name|FQDN]] to be used. The certs for the server need to be generated using this unencrypted configuration initially. Follow the steps outlined on [[Let’s Encrypt]] to generate the server encryption certificates.<br />
<br />
2. Upon successfully generating certificates, replace {{ic|/etc/nginx/conf.d/cloud-initial.conf}} (it may be safely renamed so long as it does not end in ".conf" or simply deleted) with a new file, {{ic|/etc/nginx/conf.d/cloud.conf}} using [https://github.com/graysky2/configs/blob/master/nginx/nextcloud.conf this file] as a template. Again, substitute the literal "@@FQDN@@" in the template file with the actual [[wikipedia:Fully_qualified_domain_name|FQDN]] to be used. [[Start]] and optionally [[enable]] {{ic|nginx.service}}.<br />
<br />
=== uWSGI ===<br />
<br />
You can run ''ownCloud'' in its own process and service by using the [[uWSGI]] application server with {{pkg|uwsgi-plugin-php}}. This allows you to define a [[PHP#Configuration|PHP configuration]] only for this instance of PHP, without the need to edit the global {{ic|php.ini}} and thus keeping your web application configurations compartmentalized. ''uWSGI'' itself has a wealth of features to limit the resource use and to harden the security of the application, and by being a separate process it can run under its own user.<br />
<br />
The only part that differs from [[#php-fpm configuration]]{{Broken section link}} is the {{ic|<nowiki>location ~ \.php(?:$|/) {}</nowiki>}} block:<br />
{{bc|<nowiki><br />
location ~ \.php(?:$|/) {<br />
include uwsgi_params;<br />
uwsgi_modifier1 14;<br />
# Avoid duplicate headers confusing OC checks<br />
uwsgi_hide_header X-Frame-Options;<br />
uwsgi_hide_header X-XSS-Protection;<br />
uwsgi_hide_header X-Content-Type-Options;<br />
uwsgi_hide_header X-Robots-Tag;<br />
uwsgi_pass unix:/run/uwsgi/owncloud.sock;<br />
}<br />
</nowiki>}}<br />
<br />
Then create a config file for ''uWSGI'':<br />
<br />
{{hc|/etc/uwsgi/owncloud.ini|<nowiki><br />
[uwsgi]<br />
; load the required plugins<br />
plugins = php<br />
; force the sapi name to 'apache', this will enable the opcode cache <br />
php-sapi-name = apache<br />
<br />
; set master process name and socket<br />
; '%n' refers to the name of this configuration file without extension<br />
procname-master = uwsgi %n<br />
master = true<br />
socket = /run/uwsgi/%n.sock<br />
<br />
; drop privileges<br />
uid = http<br />
gid = http<br />
umask = 027<br />
<br />
; run with at least 1 process but increase up to 4 when needed<br />
processes = 4<br />
cheaper = 1<br />
<br />
; reload whenever this config file changes<br />
; %p is the full path of the current config file<br />
touch-reload = %p<br />
<br />
; disable uWSGI request logging<br />
;disable-logging = true<br />
<br />
; enforce a DOCUMENT_ROOT<br />
php-docroot = /usr/share/webapps/%n<br />
; limit allowed extensions<br />
php-allowed-ext = .php<br />
; and search for index.php if required<br />
php-index = index.php<br />
<br />
; set php configuration for this instance of php, no need to edit global php.ini<br />
php-set = date.timezone=Etc/UTC<br />
;php-set = open_basedir=/tmp/:/usr/share/webapps/owncloud:/etc/webapps/owncloud:/dev/urandom<br />
php-set = expose_php=false<br />
; avoid security risk of leaving sessions in world-readable /tmp<br />
php-set = session.save_path=/usr/share/webapps/owncloud/data<br />
<br />
; port of php directives set upstream in /usr/share/webapps/owncloud/.user.ini for use with PHP-FPM<br />
php-set = upload_max_filesize=513M<br />
php-set = post_max_size=513M<br />
php-set = memory_limit=512M<br />
php-set = output_buffering=off<br />
<br />
; load all extensions only in this instance of php, no need to edit global php.ini<br />
;; required core modules<br />
php-set = extension=gd.so<br />
php-set = extension=iconv.so<br />
;php-set = extension=zip.so # enabled by default in global php.ini<br />
<br />
;; database connectors<br />
;; uncomment your selected driver<br />
;php-set = extension=pdo_sqlite.so<br />
;php-set = extension=pdo_mysql.so<br />
;php-set = extension=pdo_pgsql.so<br />
<br />
;; recommended extensions<br />
;php-set = extension=curl.so # enabled by default in global php.ini<br />
php-set = extension=bz2.so<br />
php-set = extension=intl.so<br />
php-set = extension=mcrypt.so<br />
<br />
;; required for specific apps<br />
;php-set = extension=ldap.so # for LDAP integration<br />
;php-set = extension=ftp.so # for FTP storage / external user authentication<br />
;php-set = extension=imap.so # for external user authentication, requires php-imap<br />
<br />
;; recommended for specific apps<br />
;php-set = extension=exif.so # for image rotation in pictures app, requires exiv2<br />
;php-set = extension=gmp.so # for SFTP storage<br />
<br />
;; for preview generation<br />
;; provided by packages in AUR<br />
; php-set = extension=imagick.so<br />
<br />
; opcache<br />
php-set = zend_extension=opcache.so<br />
<br />
; user cache<br />
; provided by php-acpu, to be enabled **either** here **or** in /etc/php/conf.d/apcu.ini<br />
php-set = extension=apcu.so<br />
; per https://github.com/krakjoe/apcu/blob/simplify/INSTALL<br />
php-set = apc.ttl=7200<br />
php-set = apc.enable_cli=1<br />
<br />
cron2 = minute=-15,unique=1 /usr/bin/php -f /usr/share/webapps/owncloud/cron.php 1>/dev/null<br />
</nowiki>}}<br />
<br />
{{Note|<br />
* Do not forget to set your timezone and uncomment the required database connector in the uWSGI config file<br />
* Starting with PHP 7, the [[PHP#Configuration|open_basedir]] directive is [https://www.archlinux.org/news/php-70-packages-released/ no longer set by default] to keep in line with upstream. A commented out version functional until at least OC 8.2 has been left in the config for users wishing to harden security. Be aware that it may [https://github.com/owncloud/core/search?q&#61;open_basedir&type&#61;Issues&utf8&#61;%E2%9C%93 occasionally break things].<br />
* Use {{ic|php-docroot &#61; /usr/share/webapps}} if placing nextcloud in /nextcloud subdirectory. }}<br />
<br />
{{Warning|The way the [https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/background_jobs_configuration.html ownCloud background job] is currently set up with [https://uwsgi-docs.readthedocs.org/en/latest/Cron.html uWSGI cron] will make use of the default global configuration from {{ic|/etc/php/php.ini}}. This means that none of the specific parameters defined (e.g. required modules) will be enabled, [https://github.com/owncloud/core/issues/12678#issuecomment-66114448 leading to various issues]. One solution is to copy {{ic|/etc/php/php.ini}} to e.g. {{ic|/etc/uwsgi/cron-php.ini}}, make the required modifications there (mirroring {{ic|/etc/uwsgi/owncloud.ini}} parameters) and referencing it in the cron directive by adding the {{ic|-c /etc/uwsgi/cron-php.ini}} option to ''php'' invocation.}}<br />
<br />
==== Activation ====<br />
<br />
[[uWSGI]] provides a [[Systemd#Using_units|template unit]] that allows to start and enable application using their configuration file name as instance identifier. For example:<br />
# systemctl start uwsgi@owncloud.socket<br />
would start it on demand referencing the configuration file {{ic|/etc/uwsgi/owncloud.ini}}. <br />
<br />
To enable the uwsgi service by default at start-up, run:<br />
# systemctl enable uwsgi@owncloud.socket<br />
<br />
{{Note|Here we make use of [http://0pointer.de/blog/projects/socket-activation.html systemd socket activation] to prevent unnecessary resources consumption when no connections are made to the instance. If you would rather have it constantly active, simply remove the {{ic|.socket}} part to start and enable the service instead.}}<br />
<br />
See also [[UWSGI#Starting service]]{{Broken section link}}.<br />
<br />
=== Setting strong permissions for the filesystem ===<br />
<br />
From the [https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions official installation manual]:<br />
:For hardened security we recommend setting the permissions on your ownCloud directories as strictly as possible, and for proper server operations. This should be done immediately after the initial installation and before running the setup. Your HTTP user must own the {{ic|config/}}, {{ic|data/}} and {{ic|apps/}} directories so that you can configure ownCloud, create, modify and delete your data files, and install apps via the ownCloud Web interface.<br />
<br />
{{Note|The AUR package for nextcloud provides a similar script {{ic|/usr/bin/set-nc-perms}} while the owncloud package does not.}}<br />
<br />
{{hc|oc-perms|2=<nowiki><br />
#!/bin/bash<br />
ocpath='/usr/share/webapps/nextcloud'<br />
htuser='http'<br />
htgroup='http'<br />
rootuser='root'<br />
<br />
printf "Creating possible missing Directories\n"<br />
mkdir -p $ocpath/data<br />
mkdir -p $ocpath/assets<br />
<br />
printf "chmod Files and Directories\n"<br />
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640<br />
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750<br />
<br />
printf "chown Directories\n"<br />
chown -R ${rootuser}:${htgroup} ${ocpath}/<br />
chown -R ${htuser}:${htgroup} ${ocpath}/apps/<br />
chown -R ${htuser}:${htgroup} ${ocpath}/config/<br />
chown -R ${htuser}:${htgroup} ${ocpath}/data/<br />
chown -R ${htuser}:${htgroup} ${ocpath}/themes/<br />
chown -R ${htuser}:${htgroup} ${ocpath}/assets/<br />
<br />
chmod +x ${ocpath}/occ<br />
<br />
printf "chmod/chown .htaccess\n"<br />
if [ -f ${ocpath}/.htaccess ]<br />
then<br />
chmod 0644 ${ocpath}/.htaccess<br />
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess<br />
fi<br />
if [ -f ${ocpath}/data/.htaccess ]<br />
then<br />
chmod 0644 ${ocpath}/data/.htaccess<br />
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess<br />
fi<br />
</nowiki>}}<br />
<br />
If you have customized your ownCloud installation and your filepaths are different than the standard installation, then modify this script accordingly.<br />
<br />
<br />
== Maintenance associated with Arch package updates ==<br />
<br />
When the Arch nextcloud package is updated via pacman, it may become necessary to connect via the web interface<br />
to manually trigger an update of the associated files. Alternatively, one can run use {{ic|/usr/share/webapps/nextcloud/occ upgrade}} from the shell but it must be run as the ''http'' user:<br />
# sudo -u http /usr/share/webapps/nextcloud/occ upgrade<br />
<br />
{{Note|Failure to do so will render the mobile app unable to connect.}}<br />
<br />
== Synchronization ==<br />
<br />
=== Desktop ===<br />
<br />
The official client can be installed with the {{Pkg|owncloud-client}} or {{aur|nextcloud-client}} package. Alternative<br />
versions are available in the [[AUR]]: {{AUR|owncloud-client-beta}}{{Broken package link|{{aur-mirror|owncloud-client-beta}}}},<br />
{{AUR|owncloud-client-git}} and {{AUR|owncloud-client-qt5}}{{Broken package link|{{aur-mirror|owncloud-client-qt5}}}}.<br />
<br />
==== Calendar ====<br />
<br />
To access your ''ownCloud'' calendars using Mozilla [[Thunderbird]]'s [[Thunderbird#Lightning_-_Calendar|Lightning calendar]]{{Broken section link}} you would use the following URL:<br />
<br />
<nowiki>https://ADDRESS/remote.php/caldav/calendars/USERNAME/CALENDARNAME</nowiki><br />
<br />
To access your ''ownCloud'' calendars using CalDAV-compatible programs like Kontact or [[Evolution]], you would use the following URL:<br />
<br />
<nowiki>https://ADDRESS/remote.php/caldav</nowiki><br />
<br />
For details see the [http://doc.owncloud.org/server/7.0/user_manual/pim/calendar.html#synchronizing-calendars-using-caldav official documentation].<br />
<br />
==== Contacts ====<br />
<br />
To sync contacts with [[Thunderbird]] you must install the [http://www.sogo.nu/downloads/frontends.html SOGo frontend], [[Thunderbird#Lightning_-_Calendar|Lightning extension]]{{Broken section link}} and follow [http://doc.owncloud.org/server/7.0/user_manual/pim/sync_thunderbird.html those instructions] from the official doc.<br />
<br />
==== Mounting files with davfs2 ====<br />
<br />
If you want to mount your ownCloud permanently install {{Pkg|davfs2}} (as described in [[Davfs]]) first.<br />
<br />
Considering your ownCloud were at {{ic|https://own.example.com}}, your WebDAV URL would be {{ic|https://own.example.com/remote.php/webdav}} (as of ownCloud 6.0).<br />
<br />
To mount your ownCloud, use:<br />
<br />
# mount -t davfs https://own.example.com/remote.php/webdav /path/to/mount<br />
<br />
You can also create an entry for this in {{ic|/etc/fstab}}<br />
<br />
{{hc|/etc/fstab|<br />
https://own.example.com/remote.php/webdav /path/to/mount davfs rw,user,noauto 0 0<br />
}}<br />
<br />
{{Tip|In order to allow automount you can also store your username (and password if you like) in a file as described in [[Davfs#Storing credentials]].}}<br />
<br />
{{Note| If creating/copying files is not possible, while the same operations work on directories, see [[Davfs#Creating/copying files not possible and/or freezes]].}}<br />
<br />
=== Mounting files in Gnome Nautilus ===<br />
<br />
You can access the files directly in Nautilus ('+ Other Locations') through WebDAV protocol - use the link as shown in your Nextcloud installation Web GUI (typically: https://example.org/remote.php/webdav/) but replace the protocol name from 'https' to 'davs'. Nautilus will ask for user name and password when trying to connect.<br />
<br />
=== Android ===<br />
<br />
There is an official Android app available for a [https://play.google.com/store/apps/details?id=at.bitfire.davdroid small donation on the Play Store] and for free [https://f-droid.org/app/at.bitfire.davdroid on F-Droid].<br />
<br />
To enable contacts and calendar sync:<br />
* if using Android 4+:<br />
*# download [https://davdroid.bitfire.at/] ([https://play.google.com/store/apps/details?id=at.bitfire.davdroid Play Store], [https://f-droid.org/app/at.bitfire.davdroid F-Droid])<br />
*# Enable mod_rewrite.so in httpd.conf<br />
*# create a new DAVdroid account in the ''Account'' settings, and specify your "short" server address and login/password couple, e.g. {{ic|<nowiki>https://cloud.example.com</nowiki>}} (there is no need for the {{ic|<nowiki>/remote.php/{carddav,webdav}</nowiki>}} part if you configured your web server with the proper redirections, as illustrated previously in the article; ''DAVdroid'' will find itself the right URLs)<br />
:For an older version of the app but with still useful info, see [http://www.slsmk.com/sync-android-contacts-calendar-and-files-to-owncloud/ this article].<br />
<br />
* if using an Android version below 4.0 and favouring Free/Libre software solutions, give a try to [https://f-droid.org/repository/browse/?fdfilter=caldav&fdid=com.morphoss.acal aCal] for calendar and contacts sync or CalDAV Sync Adapter ([https://f-droid.org/repository/browse/?fdfilter=caldav&fdid=org.gege.caldavsyncadapter F-Droid]) for just calendar sync; if you are willing to use non-libre software, then the [http://doc.owncloud.org/server/7.0/user_manual/pim/contacts.html#synchronizing-with-android recommended solution] is to use [http://dmfs.org/ CardDAV-Sync and CalDAV-Sync].<br />
<br />
=== SABnzbd ===<br />
<br />
When using [[SABnzbd]], you might want to set<br />
folder_rename 0<br />
in your sabnzbd.ini file, because ownCloud will scan the files as soon as they get uploaded, preventing SABnzbd from removing UNPACKING prefixes etc.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Self-signed certificate not accepted ===<br />
<br />
ownCloud uses [[Wikipedia:cURL]] and [[Wikipedia:SabreDAV]] to check if WebDAV is enabled.<br />
If you use SSL/TLS with a self-signed certificate, e.g. as shown in [[LAMP]], and access ownCloud's admin panel, you will see the following error message:<br />
<br />
Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.<br />
<br />
Assuming that you followed the [[LAMP]] tutorial, execute the following steps:<br />
<br />
Create a local directory for non-distribution certificates and copy [[LAMP]]s certificate there. This will prevent {{ic|ca-certificates}}-updates from overwriting it.<br />
<br />
# cp /etc/httpd/conf/server.crt /usr/share/ca-certificates/''WWW.EXAMPLE.COM.crt''<br />
<br />
Add ''WWW.EXAMPLE.COM.crt'' to {{ic|/etc/ca-certificates.conf}}:<br />
<br />
''WWW.EXAMPLE.COM.crt''<br />
<br />
Now, regenerate your certificate store:<br />
<br />
# update-ca-certificates<br />
<br />
Restart the httpd service to activate your certificate.<br />
<br />
=== Self-signed certificate for Android devices ===<br />
<br />
Once you have followed the setup for SSL, as on [[LAMP#TLS.2FSSL|LAMP]] for example, early versions of DAVdroid will<br />
reject the connection because the certificate is not trusted. A certificate can be made as follows on your server:<br />
<br />
# openssl x509 -req -days 365 -in /etc/httpd/conf/server.csr -signkey /etc/httpd/conf/server.key -extfile android.txt -out CA.crt<br />
# openssl x509 -inform PEM -outform DER -in CA.crt -out CA.der.crt <br />
<br />
The file {{ic|android.txt}} should contain the following:<br />
<br />
basicConstraints=CA:true<br />
<br />
Then import {{ic|CA.der.crt}} to your Android device:<br />
<br />
Put the {{ic|CA.der.crt}} file onto the sdcard of your Android device (usually to the internal one, e.g. save from a mail attachment).<br />
It should be in the root directory. Go to ''Settings > Security > Credential storage'' and select ''Install from device storage''.<br />
The {{ic|.crt}} file will be detected and you will be prompted to enter a certificate name. After importing the certificate,<br />
you will find it in ''Settings > Security > Credential storage > Trusted credentials > User''.<br />
<br />
Thanks to: [http://www.leftbrainthings.com/2013/10/13/creating-and-importing-self-signed-certificate-to-android-device/]<br />
<br />
Another way is to import the certificate directly from your server via [https://play.google.com/store/apps/details?id=at.bitfire.cadroid CAdroid] and follow the instructions there.<br />
<br />
=== Cannot write into config directory! ===<br />
<br />
Check your httpd configuration file (like {{ic|owncloud.conf}}). Add your configuration directory ({{ic|/etc/webapps}} by default) to <br />
<br />
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/path/to/dir/"<br />
<br />
Restart the httpd or php-fpm service to activate the change.<br />
<br />
=== Cannot create data directory (/path/to/dir) ===<br />
<br />
Check your httpd configuration file (like {{ic|owncloud.conf}}). Add your data directory to<br />
<br />
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/path/to/dir/"<br />
<br />
Restart the httpd or php-fpm service to activate the change.<br />
<br />
Alternatively, since PHP 7 doesn't use open_basedir by default, you may work around this issue by creating the<br />
required data directory owned by root:http (replace http by the user your webserver is running under) with 770 permissions.<br />
<br />
=== CSync failed to find a specific file. ===<br />
<br />
This is most likely a certificate issue. Recreate it, and do not leave the common name empty or you will see the error again.<br />
<br />
# openssl req -new -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt<br />
<br />
=== Seeing white page after login ===<br />
<br />
The cause is probably a new app that you installed. To fix that, you can use the occ command as described<br />
[https://doc.owncloud.org/server/8.2/admin_manual/configuration_server/occ_command.html here]. So with<br />
sudo -u http php /usr/share/webapps/owncloud/occ app:list<br />
you can list all apps (if you installed owncloud in the standard directory), and with <br />
sudo -u http php /usr/share/webapps/owncloud/occ app:disable <nameOfExtension><br />
you can disable the troubling app.<br />
<br />
Alternatively, you can either use [[phpMyAdmin]] to edit the {{ic|oc_appconfig}} table (if you got lucky and the table has an edit option), or do it by hand with mysql:<br />
<br />
mysql -u root -p owncloud<br />
MariaDB [owncloud]> '''delete from''' oc_appconfig '''where''' appid='<nameOfExtension>' '''and''' configkey='enabled' '''and''' configvalue='yes';<br />
MariaDB [owncloud]> '''insert into''' oc_appconfig (appid,configkey,configvalue) '''values''' ('<nameOfExtension>','enabled','no');<br />
<br />
This should delete the relevant configuration from the table and add it again.<br />
<br />
=== GUI sync client fails to connect ===<br />
<br />
If using HTTP basic authentication, make sure to exclude "status.php", which must be publicly accessible. [https://github.com/owncloud/mirall/issues/734]<br />
<br />
=== Some files upload, but give an error 'Integrity constraint violation...' ===<br />
<br />
You may see the following error in the ownCloud sync client:<br />
<br />
SQLSTATE[23000]: Integrity constraint violation: ... Duplicate entry '...' for key 'fs_storage_path_hash')...<br />
<br />
This is caused by an issue with the File Locking app, which is often not sufficient to keep conflicts from occurring on some webserver configurations.<br />
A more complete [https://doc.owncloud.org/server/8.1/admin_manual/configuration_files/files_locking_transactional.html Transactional File Locking]<br />
is available that rids these errors, but you must be using the Redis php-caching method. Install {{Pkg|redis}} and {{AUR|php-redis}}, comment out<br />
your current php-cache mechanism, and then in {{ic|/etc/php/conf.d/redis.ini}} uncomment {{ic|1=extension=redis.so}}.<br />
Then in {{ic|config.php}} make the following changes:<br />
<br />
'memcache.local' => '\OC\Memcache\Redis',<br />
'filelocking.enabled' => 'true',<br />
'memcache.locking' => '\OC\Memcache\Redis',<br />
'redis' => array(<br />
'host' => 'localhost',<br />
'port' => 6379,<br />
'timeout' => 0.0,<br />
),<br />
<br />
and [[start/enable]] {{ic|redis.service}}.<br />
<br />
Finally, disable the File Locking App, as the Transational File Locking will take care of it (and would conflict).<br />
<br />
If everything is working, you should see 'Transactional File Locking Enabled' under Server Status on the Admin page, and syncs should no longer cause issues.<br />
<br />
=== "Cannot write into apps directory" ===<br />
<br />
As mentioned in the [https://docs.nextcloud.com/server/12/admin_manual/installation/apps_management_installation.html official admin manual],<br />
either you need an apps directory that is writable by the http user, or you need to set {{ic|appstoreenabled}} to {{ic|false}}. <br />
<br />
=== Installed apps get blocked because of MIME type error ===<br />
<br />
If you're putting your apps folder outside of the nextcloud installation directory make sure your webserver serves it properly.<br />
<br />
In nginx this is accomplished by adding a location block to the nginx configuration as the folder will not be included in it by default.<br />
<br />
location ~ /apps2/(.*)$ {<br />
alias /var/www/nextcloud/apps/$1;<br />
}<br />
<br />
=== Security warnings even though the recommended settings have been included in nginx.conf ===<br />
<br />
At the top of the admin page there might be a warning to set the {{ic|Strict-Transport-Security}}, {{ic|X-Content-Type-Options}},<br />
{{ic|X-Frame-Options}}, {{ic|X-XSS-Protection}} and {{ic|X-Robots-Tag}} according to https://doc.owncloud.org/server/8.1/admin_manual/configuration_server/harden_server.html<br />
even though they are already set like that.<br />
<br />
A possible cause could be that because owncloud sets those settings, uwsgi passed them along and nginx added them again:<br />
<br />
{{hc|$ curl -I https://domain.tld|<br />
<nowiki>...<br />
X-XSS-Protection: 1; mode=block<br />
X-Content-Type-Options: nosniff<br />
X-Frame-Options: Sameorigin<br />
X-Robots-Tag: none<br />
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;<br />
X-Content-Type-Options: nosniff<br />
X-Frame-Options: SAMEORIGIN<br />
X-XSS-Protection: 1; mode=block<br />
X-Robots-Tag: none</nowiki>}}<br />
<br />
While the fast_cgi sample config has a parameter to avoid that ( {{ic|fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice}} ), when using uwsgi and nginx the following modification of the uwsgi part in nginx.conf could help:<br />
<br />
{{hc| /etc/nginx/nginx.conf|<br />
<nowiki>...<br />
# pass all .php or .php/path urls to uWSGI<br />
location ~ ^(.+\.php)(.*)$ {<br />
include uwsgi_params;<br />
uwsgi_modifier1 14;<br />
# hode following headers received from uwsgi, because otherwise we would send them twice since we already add them in nginx itself<br />
uwsgi_hide_header X-Frame-Options;<br />
uwsgi_hide_header X-XSS-Protection;<br />
uwsgi_hide_header X-Content-Type-Options;<br />
uwsgi_hide_header X-Robots-Tag;<br />
uwsgi_hide_header X-Frame-Options;<br />
#Uncomment line below if you get connection refused error. Remember to commet out line with "uwsgi_pass 127.0.0.1:3001;" below<br />
uwsgi_pass unix:/run/uwsgi/owncloud.sock;<br />
#uwsgi_pass 127.0.0.1:3001;<br />
}<br />
...</nowiki>}}<br />
<br />
=== "Reading from keychain failed with error: 'No keychain service available'" ===<br />
<br />
Can be fixed for Gnome by installing the following 2 packages, {{Pkg|libgnome-keyring}} and {{Pkg|gnome-keyring}}.<br />
Or the following for KDE, {{Pkg|libgnome-keyring}} and {{Pkg|qtkeychain}}.<br />
<br />
=== FolderSync: "Method Not Allowed" ===<br />
<br />
FolderSync needs access to {{ic|/owncloud/remote.php/webdav}}, so you could create another alias for owncloud in your {{ic|/etc/httpd/conf/extra/nextcloud.conf}}<br />
<IfModule mod_alias.c><br />
Alias /nextcloud /usr/share/webapps/nextcloud/<br />
Alias /owncloud /usr/share/webapps/nextcloud/<br />
</IfModule><br />
<br />
== Tips and tricks ==<br />
<br />
=== Running ownCloud in a subdirectory ===<br />
<br />
By including the default {{ic|owncloud.conf}} in {{ic|httpd.conf}}, ownCloud will take control of port 80 and your localhost domain. <br />
<br />
If you would like to have ownCloud run in a subdirectory, then edit the {{ic|/etc/httpd/conf/extra/owncloud.conf}}<br />
you included and comment out the {{ic|<nowiki><VirtualHost *:80> ... </VirtualHost></nowiki>}} part of the include file.<br />
<br />
You can use the following nginx config when using owncloud with uwsgi:<br />
{{hc|head=/etc/nginx/conf.d/owncloud.conf|output=<nowiki><br />
location = /.well-known/carddav {<br />
return 301 $scheme://$host/owncloud/remote.php/dav;<br />
}<br />
<br />
location = /.well-known/caldav {<br />
return 301 $scheme://$host/owncloud/remote.php/dav;<br />
}<br />
<br />
location /.well-known/acme-challenge { }<br />
<br />
location ^~ /owncloud {<br />
<br />
root /usr/share/webapps;<br />
<br />
# set max upload size<br />
client_max_body_size 512M;<br />
fastcgi_buffers 64 4K;<br />
<br />
# Disable gzip to avoid the removal of the ETag header<br />
gzip off;<br />
<br />
# Uncomment if your server is build with the ngx_pagespeed module<br />
# This module is currently not supported.<br />
#pagespeed off;<br />
<br />
location /owncloud {<br />
rewrite ^ /owncloud/index.php$uri;<br />
}<br />
<br />
location ~ ^/owncloud/(?:build|tests|config|lib|3rdparty|templates|data)/ {<br />
deny all;<br />
}<br />
<br />
location ~ ^/owncloud/(?:\.|autotest|occ|issue|indie|db_|console) {<br />
deny all;<br />
}<br />
<br />
location ~ ^/owncloud/(?:updater|ocs-provider)(?:$|/) {<br />
try_files $uri/ =404;<br />
index index.php;<br />
}<br />
<br />
location ~ ^/owncloud/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {<br />
include uwsgi_params;<br />
uwsgi_modifier1 14;<br />
# Avoid duplicate headers confusing OC checks<br />
uwsgi_hide_header X-Frame-Options;<br />
uwsgi_hide_header X-XSS-Protection;<br />
uwsgi_hide_header X-Content-Type-Options;<br />
uwsgi_hide_header X-Robots-Tag;<br />
uwsgi_pass unix:/run/uwsgi/owncloud.sock;<br />
}<br />
<br />
# Adding the cache control header for js and css files<br />
# Make sure it is BELOW the PHP block<br />
location ~* \.(?:css|js) {<br />
try_files $uri /owncloud/index.php$uri$is_args$args;<br />
add_header Cache-Control "public, max-age=7200";<br />
# Add headers to serve security related headers (It is intended<br />
# to have those duplicated to the ones above)<br />
# Before enabling Strict-Transport-Security headers please read<br />
# into this topic first.<br />
# add_header Strict-Transport-Security "max-age=15768000;<br />
# includeSubDomains; preload;";<br />
add_header X-Content-Type-Options nosniff;<br />
add_header X-Frame-Options "SAMEORIGIN";<br />
add_header X-XSS-Protection "1; mode=block";<br />
add_header X-Robots-Tag none;<br />
add_header X-Download-Options noopen;<br />
add_header X-Permitted-Cross-Domain-Policies none;<br />
# Optional: Don't log access to assets<br />
access_log off;<br />
}<br />
<br />
location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg) {<br />
try_files $uri /owncloud/index.php$uri$is_args$args;<br />
# Optional: Don't log access to other assets<br />
access_log off;<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
=== Docker ===<br />
See the [https://hub.docker.com/_/owncloud/ ownCloud] or [https://github.com/nextcloud/docker Nextcloud] repository for [[Docker]].<br />
<br />
=== Upload and share from File Manager ===<br />
[https://github.com/schiesbn/shareLinkCreator shareLinkCreator] provides the ability to upload a file to<br />
OwnCloud via a supported file manager and receive a link to the uploaded file which can then be emailed or shared in another way.<br />
<br />
=== Defining Background Jobs ===<br />
<br />
Nextcloud requires scheduled execution of some tasks, and by default it archives this by using AJAX,<br />
however AJAX is the least reliable method, and it is recommended to use [[Cron]] instead. However,<br />
ArchLinux ships with {{Pkg|systemd}}, so the preferred way of executing scheduled tasks is a [[Systemd#Timers|systemd timer]]. <br />
<br />
First create a service:<br />
<br />
{{hc|/etc/systemd/system/nextcloudcron.service|<nowiki><br />
[Unit]<br />
Description=Nextcloud cron.php job<br />
<br />
[Service]<br />
User=http<br />
ExecStart=/usr/bin/php -f /usr/share/webapps/nextcloud/cron.php<br />
<br />
[Install]<br />
WantedBy=basic.target<br />
</nowiki>}}<br />
<br />
Then create a timer for that service:<br />
<br />
{{hc|/etc/systemd/system/nextcloudcron.timer|<nowiki><br />
[Unit]<br />
Description=Run Nextcloud cron.php every 15 minutes<br />
<br />
[Timer]<br />
OnBootSec=5min<br />
OnUnitActiveSec=15min<br />
Unit=nextcloudcron.service<br />
<br />
[Install]<br />
WantedBy=timers.target<br />
</nowiki>}}<br />
<br />
[[Start/enable]] {{ic|nextcloudcron.timer}}.<br />
<br />
Confirm that it is running by running<br />
# systemctl list-timers<br />
<br />
=== Collabora Online Office integration ===<br />
Install {{AUR|nextcloud-app-collabora-online}} from the [[AUR]].<br />
Add following reverse proxy settings to your nextcloud domain config, in this case for [[Nginx]]:<br />
<br />
# static files<br />
location ^~ /loleaflet {<br />
proxy_pass https://localhost:9980;<br />
proxy_set_header Host $http_host;<br />
}<br />
# WOPI discovery URL<br />
location ^~ /hosting/discovery {<br />
proxy_pass https://localhost:9980;<br />
proxy_set_header Host $http_host;<br />
}<br />
# websockets, download, presentation and image upload<br />
location ^~ /lool {<br />
proxy_pass https://localhost:9980;<br />
proxy_set_header Upgrade $http_upgrade;<br />
proxy_set_header Connection "upgrade";<br />
proxy_set_header Host $http_host;<br />
}<br />
<br />
There's also a [https://nextcloud.com/collaboraonline/ setup instruction] for [[Apache]]. Assuming you already have the<br />
docker daemon up and running, you can now pull the latest docker image for Collabora Online. Adjust the second command with the domain name of your Nextcloud server.<br />
docker pull collabora/code<br />
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=localhost' --net host --restart always --cap-add MKNOD collabora/code<br />
When updating the docker image you can run the same commands, but before that kill all running processes of the old image:<br />
docker ps<br />
docker stop CONTAINER_ID<br />
docker rm CONTAINER_ID<br />
Now you can enable the Collabora Online app in your Nextcloud instance. In the last step,<br />
you have to configure your domain in the administrator settings regarding the Collabora Online app.<br />
<br />
== See also ==<br />
* [http://owncloud.org/ ownCloud official website]<br />
* [http://doc.owncloud.org/server/9.2/admin_manual/ ownCloud 9.2 Admin Documentation]<br />
* [https://docs.nextcloud.com/ nextcloud official website]<br />
* [https://docs.nextcloud.com/server/12/admin_manual/ nextcloud 12.0 Admin Documentation]</div>Tsa6