<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Earboxer</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Earboxer"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Earboxer"/>
	<updated>2026-05-02T15:19:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=31947</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=31947"/>
		<updated>2026-01-12T01:46:57Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is about [https://hyprland.org Hyprland], a [[wayland]] based tiling compositor with all the eyecandy, powerful plugins and much more. &lt;br /&gt;
&lt;br /&gt;
Refer to [https://wiki.hyprland.org/Getting-Started/Master-Tutorial/ hyprland Tutorial] to get started on using Hyprland.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
{{:Include:Desktop prerequisites}}&lt;br /&gt;
* Install [[Alpine_setup_scripts#setup-wayland-base|wayland-base]].This enables [[elogind]] as [[Seat manager|seat manager]], enables [[Repositories#Community|community repository]] and enables [[eudev]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
To run the {{Pkg|hyprland|arch=}} nicely, it is likely that you will need at least those packages: {{Cmd|# apk add hyprland hyprland-plugin-manager hyprland-protocols \&lt;br /&gt;
hyprland-wallpapers wayland xwayland elogind elogind-openrc \&lt;br /&gt;
polkit-elogind polkit-openrc openrc-user-pam eudev \&lt;br /&gt;
eudev-openrc dbus dbus-openrc dbus-daemon-launch-helper pipewire \&lt;br /&gt;
pipewire-openrc pipewire-pulse pipewire-pulse-openrc \&lt;br /&gt;
wireplumber wireplumber-openrc&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Optionally {{Cmd|# apk add waybar hyprland-wallpapers \&lt;br /&gt;
hyprutils hyprcursor wlroots grim slurp \&lt;br /&gt;
wofi kitty dolphin&lt;br /&gt;
}}&lt;br /&gt;
Obviously there are other choices: `rofi`, `alacritty`, etc...&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
As a bare minimum: {{Cmd|#setup-wayland-base}}&lt;br /&gt;
&lt;br /&gt;
{{Pkg|openrc|arch=}} comes with &amp;quot;user services&amp;quot; so we can use it&lt;br /&gt;
to start required services when you login.&lt;br /&gt;
&lt;br /&gt;
1) add user to &#039;&#039;seat&#039;&#039; group - required for elogind&lt;br /&gt;
&lt;br /&gt;
2) add user to &#039;&#039;audio&#039;&#039;, &#039;&#039;video&#039;&#039;, &#039;&#039;pipewire&#039;&#039;, &#039;&#039;input&#039;&#039; groups&lt;br /&gt;
&lt;br /&gt;
3) create a symbolic link for user service {{Cmd|# /etc/init.d/user.$YOUR_USERNAME_HERE -&amp;gt; /etc/init.d/user}}&lt;br /&gt;
&lt;br /&gt;
4) enable linger for your user&lt;br /&gt;
{{Cmd|# loginctl enable-linger $YOUR_USERNAME_HERE}}&lt;br /&gt;
&lt;br /&gt;
5) Add required services to your user services&lt;br /&gt;
{{Cmd|$ ls -la /etc/user/init.d/}}&lt;br /&gt;
{{Cmd|$ rc-status --user}}&lt;br /&gt;
{{Cmd|$ for service in dbus wireplumber pipewire pipewire-pulse; do rc-update --user add &amp;quot;$service&amp;quot; &amp;amp;&amp;amp; rc-service --user &amp;quot;$service&amp;quot; start; done}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
The default config is in {{Cmd|/usr/share/hypr/hyprland.conf}}&lt;br /&gt;
and based on that you may want to customize yours {{Cmd|~/.config/hypr/hyprland.conf}}&lt;br /&gt;
&lt;br /&gt;
=== consistent icon theme ===&lt;br /&gt;
&lt;br /&gt;
Depending on what applications you are running, you only need the HYPRCURSOR_THEME environment, it should work for all modern applications. But since you are reading this, you probably found an incompatible application. You have the option to disable hyprcursors, then you need only one theme. Otherwise you need to download a theme that is available as hyprcursors and xcursors (e.g. rose-pine-hyprcursor).&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;# Set the theme for most applications&lt;br /&gt;
env = HYPRCURSOR_THEME,$your_hyprcursor_theme&lt;br /&gt;
env = HYPRCURSOR_SIZE,24&lt;br /&gt;
# Set the theme for some Qt applications&lt;br /&gt;
env = XCURSOR_THEME,$your_xcursor_theme&lt;br /&gt;
env = XCURSOR_SIZE,24&lt;br /&gt;
# Set the theme for some GTK applications&lt;br /&gt;
exec-once = gsettings set org.gnome.desktop.interface cursor-theme $your_xcursor_theme&lt;br /&gt;
exec-once = gsettings set org.gnome.desktop.interface cursor-size 24&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you use gsettings make sure you have installed {{pkg|gsettings-desktop-schemas}} package.&lt;br /&gt;
&lt;br /&gt;
== Plugins ==&lt;br /&gt;
&lt;br /&gt;
=== hyprland-plugin-manager ===&lt;br /&gt;
&lt;br /&gt;
In Alpine v3.22, the &#039;&#039;hyprland-plugin-manager&#039;&#039; package is available. It installs the complete development-tree of hyprland, since it requires to compile hyprland. It is possible to uninstall &#039;&#039;hyprland-plugin-manager&#039;&#039; after the plugin is compiled. This is broken in Alpine v3.23 and is slated to be removed in the future due to trouble maintaining it. See [https://gitlab.alpinelinux.org/alpine/aports/-/issues/17576 the Gitlab issue] for more information.&lt;br /&gt;
&lt;br /&gt;
=== hyrpland-plugins ===&lt;br /&gt;
&lt;br /&gt;
From Alpine v3.23 on or on &#039;&#039;edge&#039;&#039; it is possible to install the [https://github.com/hyprwm/hyprland-plugins official plugins] as a [https://pkgs.alpinelinux.org/package/edge/community/x86_64/hyprland-plugins package]. Check out the subpackages to install individual plugins.&lt;br /&gt;
&lt;br /&gt;
=== loading plugins ===&lt;br /&gt;
&lt;br /&gt;
For example, to load the &#039;&#039;hyprland-plugins-hyprexpo&#039;&#039; plugin after installing in, edit your hyprland.conf like so:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;plugin = /usr/lib/libhyprexpo.so&lt;br /&gt;
plugin {&lt;br /&gt;
    hyprexpo {&lt;br /&gt;
            columns = 3&lt;br /&gt;
            gap_size = 0&lt;br /&gt;
            workspace_method = first 1&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This is also useful if you have uninstalled &#039;&#039;hyprland-plugin-manager&#039;&#039; and you can&#039;t load the plugin via it.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don&#039;t have their wallpapers installed.&lt;br /&gt;
&lt;br /&gt;
The ugly graphic goes away when you&#039;ve launched a [https://wiki.hyprland.org/Useful-Utilities/Wallpapers/ wallpaper utility], but the scary message remains.&lt;br /&gt;
&lt;br /&gt;
The canonical way to solve this is to install {{pkg|hyprland-wallpapers}} package using the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add hyprland-wallpapers}}&lt;br /&gt;
&lt;br /&gt;
Or you can just have some file at {{Path|/usr/share/hypr/wall0.png}} or {{Path|/usr/local/share/hypr/wall0.png}} and modify your config file to have a line as follows: {{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;misc {&lt;br /&gt;
        force_default_wallpaper = 0&lt;br /&gt;
    }&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Hyprland crashes almost immediately ===&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.46 has a bug where the default configuration will crash if Xwayland is not installed. You can either install {{pkg|xwayland}}, or  disable in your config:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;xwayland:enabled = false&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This should be fixed in the next update.&lt;br /&gt;
&lt;br /&gt;
=== warning message about hyprland-qtutils/hyprland-guiutils ===&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.46.x to 0.51.x suggest you install hyprland-qtutils, which is not available in alpine 3.22, but is available in edge onward.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Your system does not have hyprland-qtutils installed. This is a runtime dependency for some dialogs. Consider installing it.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can disable the check in your config like so:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;misc:disable_hyprland_qtutils_check = true&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.52.x and newer have changed this suggestion to install hyprland-guiutils. You can still install hyprland-qtutils to satisfy the warning, or hyprland-guiutils when it becomes available. Or you can disable the check in your config, which has been renamed:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;misc:disable_hyprland_guiutils_check = true&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== DBUS_SESSION_BUS_ADDRESS unset ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using login manager, create a copy of {{ic|/usr/share/wayland-sessions/hyprland.desktop}} that starts Hyprland within D-Bus session:&lt;br /&gt;
&lt;br /&gt;
 Exec=dbus-run-session -- Hyprland&lt;br /&gt;
&lt;br /&gt;
Also make sure that D-Bus is started as a system service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
 &lt;br /&gt;
* [https://wiki.hyprland.org Official Hyprland wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:compositor]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=31443</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=31443"/>
		<updated>2025-11-15T02:38:51Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* warning message about hyprland-qtutils */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is about [https://hyprland.org Hyprland], a [[wayland]] based tiling compositor with all the eyecandy, powerful plugins and much more. &lt;br /&gt;
&lt;br /&gt;
Refer to [https://wiki.hyprland.org/Getting-Started/Master-Tutorial/ hyprland Tutorial] to get started on using Hyprland.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
{{:Include:Desktop prerequisites}}&lt;br /&gt;
* Install [[Alpine_setup_scripts#setup-wayland-base|wayland-base]].This enables [[elogind]] as [[Seat manager|seat manager]], enables [[Repositories#Community|community repository]] and enables [[eudev]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
To run the {{Pkg|hyprland|arch=}} nicely, it is likely that you will need at least those packages: {{Cmd|# apk add hyprland hyprland-plugin-manager hyprland-protocols \&lt;br /&gt;
hyprland-wallpapers wayland xwayland elogind elogind-openrc \&lt;br /&gt;
polkit-elogind polkit-openrc openrc-user-pam eudev \&lt;br /&gt;
eudev-openrc dbus dbus-openrc dbus-daemon-launch-helper pipewire \&lt;br /&gt;
pipewire-openrc pipewire-pulse pipewire-pulse-openrc \&lt;br /&gt;
wireplumber wireplumber-openrc&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Optionally {{Cmd|# apk add waybar hyprland-wallpapers \&lt;br /&gt;
hyprutils hyprcursor wlroots grim slurp \&lt;br /&gt;
wofi kitty dolphin&lt;br /&gt;
}}&lt;br /&gt;
Obviously there are other choices: `rofi`, `alacritty`, etc...&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
As a bare minimum: {{Cmd|#setup-wayland-base}}&lt;br /&gt;
&lt;br /&gt;
{{Pkg|openrc|arch=}} comes with &amp;quot;user services&amp;quot; so we can use it&lt;br /&gt;
to start required services when you login.&lt;br /&gt;
&lt;br /&gt;
1) add user to &#039;&#039;seat&#039;&#039; group - required for elogind&lt;br /&gt;
&lt;br /&gt;
2) add user to &#039;&#039;audio&#039;&#039;, &#039;&#039;video&#039;&#039;, &#039;&#039;pipewire&#039;&#039;, &#039;&#039;input&#039;&#039; groups&lt;br /&gt;
&lt;br /&gt;
3) create a symbolic link for user service {{Cmd|# /etc/init.d/user.$YOUR_USERNAME_HERE -&amp;gt; /etc/init.d/user}}&lt;br /&gt;
&lt;br /&gt;
4) enable linger for your user&lt;br /&gt;
{{Cmd|# loginctl enable-linger $YOUR_USERNAME_HERE}}&lt;br /&gt;
&lt;br /&gt;
5) Add required services to your user services&lt;br /&gt;
{{Cmd|$ ls -la /etc/user/init.d/}}&lt;br /&gt;
{{Cmd|$ rc-status --user}}&lt;br /&gt;
{{Cmd|$ for service in dbus wireplumber pipewire pipewire-pulse; do rc-update --user add &amp;quot;$service&amp;quot; &amp;amp;&amp;amp; rc-service --user &amp;quot;$service&amp;quot; start; done}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
The default config is in {{Cmd|/usr/share/hypr/hyprland.conf}}&lt;br /&gt;
and based on that you may want to customize yours {{Cmd|~/.config/hypr/hyprland.conf}}&lt;br /&gt;
&lt;br /&gt;
=== consistent icon theme ===&lt;br /&gt;
&lt;br /&gt;
Depending on what applications you are running, you only need the HYPRCURSOR_THEME environment, it should work for all modern applications. But since you are reading this, you probably found an incompatible application. You have the option to disable hyprcursors, then you need only one theme. Otherwise you need to download a theme that is available as hyprcursors and xcursors (e.g. rose-pine-hyprcursor).&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;# Set the theme for most applications&lt;br /&gt;
env = HYPRCURSOR_THEME,$your_hyprcursor_theme&lt;br /&gt;
env = HYPRCURSOR_SIZE,24&lt;br /&gt;
# Set the theme for some Qt applications&lt;br /&gt;
env = XCURSOR_THEME,$your_xcursor_theme&lt;br /&gt;
env = XCURSOR_SIZE,24&lt;br /&gt;
# Set the theme for some GTK applications&lt;br /&gt;
exec-once = gsettings set org.gnome.desktop.interface cursor-theme $your_xcursor_theme&lt;br /&gt;
exec-once = gsettings set org.gnome.desktop.interface cursor-size 24&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you use gsettings make sure you have installed {{pkg|gsettings-desktop-schemas}} package.&lt;br /&gt;
&lt;br /&gt;
== Plugins ==&lt;br /&gt;
&lt;br /&gt;
=== hyprland-plugin-manager ===&lt;br /&gt;
&lt;br /&gt;
From Alpine v3.22 on the &#039;&#039;hyprland-plugin-manager&#039;&#039; package is available. It installs the complete development-tree of hyprland, since it requires to compile hyprland. It is possible to uninstall &#039;&#039;hyprland-plugin-manager&#039;&#039; after the plugin is compiled.&lt;br /&gt;
&lt;br /&gt;
=== hyrpland-plugins ===&lt;br /&gt;
&lt;br /&gt;
From Alpine v3.23 (not yet released) on or on &#039;&#039;edge&#039;&#039; it is possible to install the [https://github.com/hyprwm/hyprland-plugins official plugins] as a [https://pkgs.alpinelinux.org/package/edge/community/x86_64/hyprland-plugins package]. Checkout the subpackages to install individual plugins.&lt;br /&gt;
&lt;br /&gt;
=== loading plugins ===&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;plugin = /usr/lib/libhyprexpo.so&lt;br /&gt;
plugin {&lt;br /&gt;
    hyprexpo {&lt;br /&gt;
            columns = 3&lt;br /&gt;
            gap_size = 0&lt;br /&gt;
            workspace_method = first 1&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This is also useful if you have uninstalled &#039;&#039;hyprland-plugin-manager&#039;&#039; and you can&#039;t load the plugin via it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don&#039;t have their wallpapers installed.&lt;br /&gt;
&lt;br /&gt;
The ugly graphic goes away when you&#039;ve launched a [https://wiki.hyprland.org/Useful-Utilities/Wallpapers/ wallpaper utility], but the scary message remains.&lt;br /&gt;
&lt;br /&gt;
The canonical way to solve this is to install {{pkg|hyprland-wallpapers}} package using the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add hyprland-wallpapers}}&lt;br /&gt;
&lt;br /&gt;
Or you can just have some file at {{Path|/usr/share/hypr/wall0.png}} or {{Path|/usr/local/share/hypr/wall0.png}} and modify your config file to have a line as follows: {{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;misc {&lt;br /&gt;
        force_default_wallpaper = 0&lt;br /&gt;
    }&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Hyprland crashes almost immediately ===&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.46 has a bug where the default configuration will crash if Xwayland is not installed. You can either install {{pkg|xwayland}}, or  disable in your config:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;xwayland:enabled = false&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This should be fixed in the next update.&lt;br /&gt;
&lt;br /&gt;
=== warning message about hyprland-qtutils/hyprland-guiutils ===&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.46.x to 0.51.x suggest you install hyprland-qtutils, which is not available in alpine 3.22, but is available in edge onward.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Your system does not have hyprland-qtutils installed. This is a runtime dependency for some dialogs. Consider installing it.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can disable the check in your config like so:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;misc:disable_hyprland_qtutils_check = true&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.52.x and newer have changed this suggestion to install hyprland-guiutils. You can still install hyprland-qtutils to satisfy the warning, or hyprland-guiutils when it becomes available. Or you can disable the check in your config, which has been renamed:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;nowiki&amp;gt;misc:disable_hyprland_guiutils_check = true&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== DBUS_SESSION_BUS_ADDRESS unset ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using login manager, create a copy of {{ic|/usr/share/wayland-sessions/hyprland.desktop}} that starts Hyprland within D-Bus session:&lt;br /&gt;
&lt;br /&gt;
 Exec=dbus-run-session -- Hyprland&lt;br /&gt;
&lt;br /&gt;
Also make sure that D-Bus is started as a system service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
 &lt;br /&gt;
* [https://wiki.hyprland.org Official Hyprland wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:compositor]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Game_development_on_Alpine_Linux&amp;diff=29102</id>
		<title>Game development on Alpine Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Game_development_on_Alpine_Linux&amp;diff=29102"/>
		<updated>2025-02-22T21:39:40Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Game engines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Game development&#039;&#039;&#039; is possible on Alpine Linux.  &lt;br /&gt;
&lt;br /&gt;
== Learning curve ==&lt;br /&gt;
&lt;br /&gt;
For programmers, it&#039;s strongly recommended that you use a [[#Game engines|game engine]] if you are starting video game programming which will handle most of the low level setup.  If you have advanced knowledge in programming, you should see the [[#Multimedia libraries|multimedia section]] and [[#3D libraries|3D libraries]] section.&lt;br /&gt;
&lt;br /&gt;
For artists, see [[#Tools used to work with or create art assets|Tools used to work with or create art assets]] section.&lt;br /&gt;
&lt;br /&gt;
== Software libraries used in game development ==&lt;br /&gt;
&lt;br /&gt;
=== Game engines ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Package !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://plib.sourceforge.net/ PLIB] || {{pkg|plib}} || game engine&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.blender.org/ Blender] || {{pkg|blender}} || a 3D modeler and animator with a [https://upbge.org/ game engine]&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.minetest.net/ Minetest] || {{pkg|minetest}} || both a game engine and a game&lt;br /&gt;
|-&lt;br /&gt;
| [https://love2d.org/ LÖVE] || {{pkg|love}} || 2D game engine using Lua and wrapping SDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Multimedia libraries ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Package(s) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer Simple DirectMedia Layer 2.0] || {{pkg|sdl2-dev}} || has input, audio, video, opengl, touch screen, game controller support&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Simple_and_Fast_Multimedia_Library SFML (Simple and Fast Multimedia Library)] || {{pkg|sfml-dev}} {{pkg|csfml-dev}} || has input, audio, video, networking, opengl support&lt;br /&gt;
|-&lt;br /&gt;
| [http://kcat.strangesoft.net/openal.html OpenAL Soft]{{dead link}} || {{pkg|openal-soft-dev}} || can be used for 3D sound for 3D games&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.glfw.org/ GLFW] || {{pkg|glfw-dev}} || To create OpenGL context quickly with input support&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/FreeGLUT FreeGLUT] || {{pkg|freeglut-dev}} || To create OpenGL context quickly with input support&lt;br /&gt;
|-&lt;br /&gt;
| [http://pyopengl.sourceforge.net/ PyOpenGL] || {{pkg|py3-opengl}} || OpenGL on Python&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer Simple DirectMedia Layer] || &amp;lt;code&amp;gt;sdl-dev&amp;lt;/code&amp;gt; (dropped support for sdl 1.x . Use 2.0 instead) || has input, audio, video, joystick support&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 3D libraries ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Package(s) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://glm.g-truc.net/0.9.8/index.html OpenGL Mathematics] || {{pkg|glm-dev}} || for 3D calculations to transform, rotate, scale stuff&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Rendering and loading assets ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Package(s) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/OpenSceneGraph OpenSceneGraph] || {{pkg|openscenegraph-dev}} || can be used to load 3D models and handle complexities of rendering a 3d scene&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Fonts ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Package(s) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://sourceforge.net/projects/ftgl/ FTGL] || {{pkg|ftgl-dev}} || to display text in OpenGL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tools used to work with or create art assets ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Package(s) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/GIMP GIMP] || {{pkg|gimp}} || edit 2D assets&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Audacity_(audio_editor) Audacity] || {{pkg|audacity}} || edit sound assets&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Inkscape Inkscape] || {{pkg|inkscape}} || edit vector 2D assets&lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Blender_(software) Blender] || {{pkg|blender}} || edit 3D assets or models&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=28850</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=28850"/>
		<updated>2025-01-19T22:46:29Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is about [https://hyprland.org Hyprland], a [[wayland]] based tiling compositor with all the eyecandy, powerful plugins and much more. &lt;br /&gt;
&lt;br /&gt;
Refer to [https://wiki.hyprland.org/Getting-Started/Master-Tutorial/ hyprland Tutorial] to get started on using Hyprland.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Desktop prerequisites}}&lt;br /&gt;
The &amp;lt;Code&amp;gt;setup-wayland-base&amp;lt;/Code&amp;gt; script installs and enables [[elogind]] as [[Seat manager|seat manager]], enables [[Repositories#Community|community repository]] and enables [[eudev]] automatically as these are required for Wayland to work.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the package {{Pkg|hyprland|arch=}} using the command: {{Cmd|# apk add hyprland}} &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don&#039;t have their wallpapers installed.&lt;br /&gt;
&lt;br /&gt;
The ugly graphic goes away when you&#039;ve launched a [https://wiki.hyprland.org/Useful-Utilities/Wallpapers/ wallpaper utility], but the scary message remains.&lt;br /&gt;
&lt;br /&gt;
The canonical way to solve this is to install {{pkg|hyprland-wallpapers}} package using the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add hyprland-wallpapers}}&lt;br /&gt;
&lt;br /&gt;
Or you can just have some file at {{Path|/usr/share/hypr/wall0.png}} or {{Path|/usr/local/share/hypr/wall0.png}} and modify  your config file to have a line as follows:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;Pre&amp;gt;misc {&lt;br /&gt;
        force_default_wallpaper = 0&lt;br /&gt;
    }&amp;lt;/Pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Hyprland crashes almost immediately ===&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.46 has a bug where the default configuration will crash if Xwayland is not installed. You can either install {{pkg|xwayland}}, or  disable in your config:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;Pre&amp;gt;xwayland:enabled = false&amp;lt;/Pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This should be fixed in the next update.&lt;br /&gt;
&lt;br /&gt;
=== warning message about hyprland-qtutils ===&lt;br /&gt;
&lt;br /&gt;
Hyprland 0.46 and newer suggest you install hyprland-qtutils, which is currently not available in alpine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Your system does not have hyprland-qtutils installed. This is a runtime dependency for some dialogs. Consider installing it.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can disable the check in your config like so:&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.config/hypr/hyprland.conf|&amp;lt;Pre&amp;gt;misc:disable_hyprland_qtutils_check = true&amp;lt;/Pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
 &lt;br /&gt;
* [https://wiki.hyprland.org Official Hyprland wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]] &lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;br /&gt;
[[Category:compositor]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27805</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27805"/>
		<updated>2024-11-11T18:06:14Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is about [https://hyprland.org Hyprland], a tiling window manager. Hyprland is available in Alpine Linux [[Repositories#Community|community repository]] for [[Repositories#Edge|edge]] release. &lt;br /&gt;
&lt;br /&gt;
Refer to [https://wiki.hyprland.org/Getting-Started/Master-Tutorial/ hyprland Tutorial] to get started on using Hyprland.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
The package {{Pkg|hyprland|arch=}} exists in community for edge (and will be there in alpine releases &amp;gt;= 3.21)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don&#039;t have their wallpapers installed.&lt;br /&gt;
&lt;br /&gt;
The ugly graphic goes away when you&#039;ve launched a [https://wiki.hyprland.org/Useful-Utilities/Wallpapers/ wallpaper utility], but the scary message remains.&lt;br /&gt;
&lt;br /&gt;
The canonical way to solve this is to install {{pkg|hyprland-wallpapers}} package using the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add hyprland-wallpapers}}&lt;br /&gt;
&lt;br /&gt;
Or you can just have some file at {{Path|/usr/share/hypr/wall0.png}} or {{Path|/usr/local/share/hypr/wall0.png}} and have&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
    misc {&lt;br /&gt;
        force_default_wallpaper = 0&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in your Hyprland config file.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
 &lt;br /&gt;
* [https://wiki.hyprland.org Official Hyprland wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]] &lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&amp;diff=27804</id>
		<title>Desktop environments and Window managers</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&amp;diff=27804"/>
		<updated>2024-11-11T17:59:16Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Tiling window managers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
Do not add any content about specific desktop environment or window manager in this page. Please add all the content to the respective wiki pages. If wiki page does not exist for the specific window manage, please create and add the content.&lt;br /&gt;
&lt;br /&gt;
This page lists only the window managers and desktop environments for which packages are available in Alpine Linux. Do not add unsupported software here&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine Linux&#039;&#039;&#039; has no official desktop and setting up a graphical environment is not even part of [[Installation]]. All window managers and desktop environments that are available in Alpine Linux are listed in this page. Quick installation using [[Alpine_setup_scripts#setup-desktop|setup-desktop]] script is available for few [[Setup-desktop|desktops]]. For servers consider [[Alpine_Configuration_Framework_Design#Starting_ACF|Alpine Configuration Framework(ACF)]].&lt;br /&gt;
&lt;br /&gt;
== Desktop Environments ==&lt;br /&gt;
&lt;br /&gt;
* [[Xfce]]&lt;br /&gt;
* [[LXQt]]&lt;br /&gt;
* [[KDE|KDE Plasma]]&lt;br /&gt;
* [[GNOME]]&lt;br /&gt;
* [[MATE]]&lt;br /&gt;
&lt;br /&gt;
== Window Managers ==&lt;br /&gt;
&lt;br /&gt;
===  [https://en.wikipedia.org/wiki/Stacking_window_manager Stacking window managers] ===&lt;br /&gt;
(also known as &#039;&#039;&#039;floating window maanagers&#039;&#039;&#039;)&lt;br /&gt;
* X11:&lt;br /&gt;
** [[Openbox]]&lt;br /&gt;
** [[Fluxbox]]&lt;br /&gt;
&lt;br /&gt;
* Wayland:&lt;br /&gt;
** [[Weston]]&lt;br /&gt;
** [[LabWC]]&lt;br /&gt;
**  {{Pkg|wayfire|arch=}}&lt;br /&gt;
&lt;br /&gt;
=== [https://en.wikipedia.org/wiki/Tiling_window_manager Tiling window managers] ===&lt;br /&gt;
(also known as &#039;&#039;&#039;Dynamic window maanagers&#039;&#039;&#039;)&lt;br /&gt;
* X11:&lt;br /&gt;
** {{Pkg|bspwm|arch=}}&lt;br /&gt;
** {{Pkg|herbstluftwm|arch=}}&lt;br /&gt;
** [[twm]]&lt;br /&gt;
** [[dwm]]&lt;br /&gt;
** [[I3wm|i3]]&lt;br /&gt;
** [[AwesomeWM|Awesome]]&lt;br /&gt;
** {{Pkg|ratpoison|arch=}} &lt;br /&gt;
** {{Pkg|spectrwm |arch=}} &lt;br /&gt;
** {{Pkg|qtile |arch=}}  &lt;br /&gt;
&lt;br /&gt;
* Wayland:&lt;br /&gt;
** [[Sway]]&lt;br /&gt;
** [[River]]&lt;br /&gt;
** {{Pkg|cagebreak|arch=}} &lt;br /&gt;
** {{Pkg|dwl|arch=}} &lt;br /&gt;
** [[Hyprland]]&lt;br /&gt;
&lt;br /&gt;
=== Other Window Managers ===&lt;br /&gt;
&lt;br /&gt;
* Wayland&lt;br /&gt;
** {{Pkg|cage |arch=}} (&#039;&#039;&#039;kiosk&#039;&#039;&#039; mode)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[:Category:Desktop Environments|Desktop Environments]]&lt;br /&gt;
* [[:Category:Window Managers|Window Managers]]&lt;br /&gt;
* [[Installation#Post-Installation|Post Installation]]&lt;br /&gt;
* [[Seat_manager#Input_and_video_groups|Input and video groups]]&lt;br /&gt;
* [[Fonts]]&lt;br /&gt;
* [[Wayland]]&lt;br /&gt;
* [[:Category:Display Managers]]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Desktop_environment Desktop environment - Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Desktop_environment Desktop environment - Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Newbie]]&lt;br /&gt;
[[Category:Desktop Environments]]&lt;br /&gt;
[[Category:Window Managers]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27801</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27801"/>
		<updated>2024-11-11T13:51:13Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hyprland is a tiling window manager.&lt;br /&gt;
&lt;br /&gt;
https://wiki.hyprland.org/Getting-Started/Master-Tutorial/&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don&#039;t have their wallpapers installed.&lt;br /&gt;
&lt;br /&gt;
The ugly graphic goes away when you&#039;ve launched a [https://wiki.hyprland.org/Useful-Utilities/Wallpapers/ wallpaper utility], but the scary message remains.&lt;br /&gt;
&lt;br /&gt;
The canonical way to solve this is to&lt;br /&gt;
&lt;br /&gt;
    apk add hyprland-wallpaper&lt;br /&gt;
&lt;br /&gt;
Or you can just have some file at /usr/{local/,}share/hypr/wall0.png and have&lt;br /&gt;
&lt;br /&gt;
    misc {&lt;br /&gt;
        force_default_wallpaper = 0&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
in your config&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27800</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27800"/>
		<updated>2024-11-11T13:50:22Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hyprland is a tiling window manager.&lt;br /&gt;
&lt;br /&gt;
https://wiki.hyprland.org/Getting-Started/Master-Tutorial/&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don&#039;t have their wallpapers installed.&lt;br /&gt;
&lt;br /&gt;
The ugly graphic goes away when you&#039;ve launched a [https://wiki.hyprland.org/Useful-Utilities/Wallpapers/ wallpaper utility], but the scary message remains.&lt;br /&gt;
&lt;br /&gt;
The canonical way to solve this is to&lt;br /&gt;
&lt;br /&gt;
apk add hyprland-wallpaper&lt;br /&gt;
&lt;br /&gt;
Or you can just have some file at /usr/{local/,}share/hypr/wall0.png and have&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
misc {&lt;br /&gt;
    force_default_wallpaper = 0&lt;br /&gt;
}&lt;br /&gt;
```&lt;br /&gt;
in your config&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27799</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27799"/>
		<updated>2024-11-11T13:48:33Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hyprland is a tiling window manager.&lt;br /&gt;
&lt;br /&gt;
https://wiki.hyprland.org/Getting-Started/Master-Tutorial/&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
As of Hyprland 0.45.0, upstream shows a scary message (and an ugly graphic) if you don&#039;t have their wallpapers installed.&lt;br /&gt;
&lt;br /&gt;
The ugly graphic goes away when you&#039;ve launched a [https://wiki.hyprland.org/Useful-Utilities/Wallpapers/ wallpaper utility], but the scary message remains.&lt;br /&gt;
&lt;br /&gt;
The canonical way to solve this is to&lt;br /&gt;
&lt;br /&gt;
apk add hyprland-wallpaper&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27789</id>
		<title>Hyprland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hyprland&amp;diff=27789"/>
		<updated>2024-11-11T01:24:20Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: Created page with &amp;quot;Hyprland is a tiling window manager.  https://wiki.hyprland.org/Getting-Started/Master-Tutorial/  == Troubleshooting ==  === Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===  apk add hyprland-wallpaper&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hyprland is a tiling window manager.&lt;br /&gt;
&lt;br /&gt;
https://wiki.hyprland.org/Getting-Started/Master-Tutorial/&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Black/Magenta checkerboard background: Hyprland failed to load 1 essential asset ===&lt;br /&gt;
&lt;br /&gt;
apk add hyprland-wallpaper&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&amp;diff=23517</id>
		<title>Wi-Fi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&amp;diff=23517"/>
		<updated>2023-05-26T20:15:41Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: Fix URL for downloading firmware&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to set up a wireless network connection with WPA encryption.&lt;br /&gt;
&lt;br /&gt;
Choose a wireless daemon between {{Pkg|iwd}} and {{Pkg|wpa_supplicant}}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Working wireless drivers &lt;br /&gt;
{{Note|in most cases installing {{Pkg|linux-firmware}} should get you the required drivers. Installation of this package can produce errors on diskless or data disk modes. If such errors occur, switch to system disk mode.}}&lt;br /&gt;
&lt;br /&gt;
If you are using a &#039;&#039;&#039;Broadcom chipset&#039;&#039;&#039;, see the [[#Broadcom_Wi-Fi_Chipset_Users|Broadcom Wi-Fi section]].)&lt;br /&gt;
&lt;br /&gt;
== iwd ==&lt;br /&gt;
&lt;br /&gt;
[https://wiki.archlinux.org/title/Iwd iwd] (iNet wireless daemon) is a wireless daemon written by Intel and aiming at replacing {{Pkg|wpa_supplicant}}. The core goal of the project is to optimize resource utilization by not depending on any external libraries and instead utilizing features provided by the Linux Kernel to the maximum extent possible.&lt;br /&gt;
&lt;br /&gt;
{{Pkg|iwd}} is supported since [https://alpinelinux.org/posts/Alpine-3.10.0-released.html Alpine Linux 3.10].&lt;br /&gt;
&lt;br /&gt;
To get started, install {{Pkg|iwd}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add iwd}}&lt;br /&gt;
&lt;br /&gt;
To do anything with iwd, it has to be running:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service iwd start}}&lt;br /&gt;
&lt;br /&gt;
If it was not running, running &amp;lt;code&amp;gt;iwctl ..&amp;lt;/code&amp;gt; commands will print&lt;br /&gt;
&lt;br /&gt;
 The name net.connman.iwd was not provided by any .service files  &lt;br /&gt;
 Failed to retrieve IWD dbus objects, quitting...&lt;br /&gt;
&lt;br /&gt;
and running just &amp;lt;code&amp;gt;iwctl&amp;lt;/code&amp;gt; will say it is waiting for IWD to start.&lt;br /&gt;
&lt;br /&gt;
List your available wifi device(s) (you probably have &#039;&#039;wlan0&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
{{Cmd|iwctl device list}}&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t know the SSID of your network you can run a scan and retrieve a list of all the detected networks:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|iwctl station wlan0 scan &amp;amp;&amp;amp; iwctl station wlp8s0 get-networks}}&lt;br /&gt;
&lt;br /&gt;
To connect to a network:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|iwctl station wlan0 connect &amp;lt;SSID&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|iwd automatically stores network passphrases in the /var/lib/iwd directory and uses them to auto-connect in the future. If you run diskless Alpine, make sure to include this directory to the apkovl and commit:&lt;br /&gt;
{{Cmd|lbu add /var/lib/iwd &amp;amp;&amp;amp; lbu commit -d}}}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Since version 1.10, iwd supports IPv6, but it is disabled by default. To enable it, add the following to the configuration file:&lt;br /&gt;
{{Cat|/etc/iwd/main.conf|&amp;lt;nowiki&amp;gt;[Network]&lt;br /&gt;
EnableIPv6=true&amp;lt;/nowiki&amp;gt;}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, configure {{Pkg|iwd}} and its dependency {{Pkg|dbus}} to start automatically on boot:&lt;br /&gt;
{{Cmd|rc-update add iwd boot &amp;amp;&amp;amp; rc-update add dbus boot}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a entry for the desired interface (e.g. {{Path|wlan0}}):&lt;br /&gt;
{{Cat|/etc/network/interfaces|auto wlan0&lt;br /&gt;
iface wlan0 inet dhcp}}&lt;br /&gt;
&lt;br /&gt;
{{Note|You could instead use the iwd&#039;s built-in network configuration by setting {{Path|&amp;lt;nowiki&amp;gt;EnableNetworkConfiguration=true&amp;lt;/nowiki&amp;gt;}} in {{Path|/etc/iwd/main.conf}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manually restart &#039;&#039;&#039;networking&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service networking restart}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your wifi interface should now be up and have a dedicated IP adress:&lt;br /&gt;
{{Cmd|ip a show wlan0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Useful link: [https://wiki.archlinux.org/title/Iwd#Enable_built-in_network_configuration Archlinux wiki page] if you need more specific configuration.&lt;br /&gt;
&lt;br /&gt;
== wpa_supplicant  ==&lt;br /&gt;
&lt;br /&gt;
To get started install {{Pkg|wpa_supplicant}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add wpa_supplicant}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To list your available network interfaces:&lt;br /&gt;
{{Note|if you don&#039;t see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install drivers/firmware.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Cmd|ip link}}&lt;br /&gt;
or&lt;br /&gt;
{{Cmd|ip a}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bring up the desired interface:&lt;br /&gt;
{{Cmd|ip link set wlan0 up}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If this errors with &amp;lt;code&amp;gt;ioctl 0x8914 failed: No error information&amp;lt;/code&amp;gt;, that&#039;s &amp;lt;code&amp;gt;busybox ip&amp;lt;/code&amp;gt;&#039;s way of saying your wireless radio is rfkill&#039;d. See the [[#Rfkill|Rfkill section]] for information on how to unblock your wireless radio.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use this command to add your Wi-Fi network to wpa_supplicant:&lt;br /&gt;
{{Cmd|wpa_passphrase &#039;ExampleWifiSSID&#039; &#039;ExampleWifiPassword&#039; &amp;gt; /etc/wpa_supplicant/wpa_supplicant.conf}}&lt;br /&gt;
&#039;&#039;(Access point not broadcasting its SSID requires additional line &amp;lt;code&amp;gt;scan_ssid=1&amp;lt;/code&amp;gt; in the file &amp;lt;code&amp;gt;wpa_supplicant.conf&amp;lt;/code&amp;gt;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|the Wi-Fi SSID and password are case sensitive and the single quote before and after the SSID and password need to be there}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start wpa_supplicant in the foreground to make sure the connection succeeds.&lt;br /&gt;
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.&lt;br /&gt;
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure the interface with an IP address.&lt;br /&gt;
{{Cmd|udhcpc -i wlan0}}&lt;br /&gt;
&lt;br /&gt;
Sanity check: the interface should have a {{Path|inet}} address.&lt;br /&gt;
{{Cmd|ip addr show wlan0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automatic Configuration on System Boot  ===&lt;br /&gt;
&lt;br /&gt;
Add a entry for the desired interface (e.g. {{Path|wlan0}}):&lt;br /&gt;
{{Cat|/etc/network/interfaces|auto wlan0&lt;br /&gt;
iface wlan0 inet dhcp}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Dont remove or comment out the &#039;&#039;&#039;auto lo&#039;&#039;&#039; entry}}&lt;br /&gt;
&lt;br /&gt;
Sanity check: Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.&lt;br /&gt;
&lt;br /&gt;
Bring the interface down.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|ip link set wlan0 down}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manually restart (or &#039;&#039;&#039;start&#039;&#039;&#039;) &#039;&#039;&#039;networking&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/networking --quiet restart &amp;amp;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If all is well (feel free to confirm with the sanity checks), &lt;br /&gt;
&lt;br /&gt;
Configure wpa_supplicant to start automatically on boot:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rc-update add wpa_supplicant boot}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also make sure &#039;&#039;&#039;networking&#039;&#039;&#039; is set to automatically start on boot:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rc-update add networking boot}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Optional security precaution:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default {{Pkg|wpa_supplicant}} will store your Wi-Fi password in plain text:&lt;br /&gt;
&lt;br /&gt;
{{Cat|(Example) /etc/wpa_supplicant/wpa_supplicant.conf|&amp;lt;nowiki&amp;gt;network={&lt;br /&gt;
    ssid=&amp;quot;&amp;lt;YourSSIDShouldBeHere&amp;gt;&amp;quot;&lt;br /&gt;
        #psk=&amp;quot;&amp;lt;YourPasswordShouldBeHereInPlainText&amp;gt;&amp;quot;&lt;br /&gt;
    psk=&amp;lt;RandomLettersAndNumbersShouldBeHere&amp;gt;&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
this is not necessary and {{Pkg|wpa_supplicant}} should funtion just fine without it, if you dont want your stored password in plain text just delete the line with &amp;lt;code&amp;gt;#psk=&amp;quot;&amp;lt;YourPasswordShouldBeHereInPlainText&amp;gt;&amp;quot;&amp;lt;/code&amp;gt; on it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Launching udhcpc through wpa_cli actions ==&lt;br /&gt;
&lt;br /&gt;
{{Todo|Figure out if theses two sections are different or connected to one another}}&lt;br /&gt;
&lt;br /&gt;
With the above configuration, udhcpc will only run once at boot.&lt;br /&gt;
If the Wifi isn&#039;t available then, or the network changes in between, it needs to be notified.&lt;br /&gt;
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh&lt;br /&gt;
&lt;br /&gt;
== Automatic Reconnection when WIFI signal is lost  ==&lt;br /&gt;
To enable automatic reconnection when wifi signal is lost add these to config:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wpa_supplicant/wpa_supplicant.conf|&amp;lt;nowiki&amp;gt;ap_scan=1&lt;br /&gt;
autoscan=periodic:10&lt;br /&gt;
disable_scan_offload=1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add wpa_cli boot}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
==== Broadcom Wi-Fi Chipset Users  ====&lt;br /&gt;
&lt;br /&gt;
The Broadcom chipset is quite popular among older computers. The b43 driver is included in the linux-lts or linux-edge kernel packages. However, you might need to compile the firmware manually for this chipset as it is not included in linux-firmware for some cargs. &lt;br /&gt;
&lt;br /&gt;
You can check if you have a Broadcom chipset by using lspci:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lspci -nn -d 14e4:}}&lt;br /&gt;
&lt;br /&gt;
Now we need fwcutter:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add b43-fwcutter}}&lt;br /&gt;
&lt;br /&gt;
Now we have everything to download the proprietary driver and extract the firmware from it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FIRMWARE_INSTALL_DIR=&amp;quot;/lib/firmware&amp;quot;&lt;br /&gt;
wget http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2&lt;br /&gt;
tar xjf broadcom-wl-5.100.138.tar.bz2&lt;br /&gt;
sudo b43-fwcutter -w &amp;quot;$FIRMWARE_INSTALL_DIR&amp;quot; broadcom-wl-5.100.138/linux/wl_apsta.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information can be found [http://linuxwireless.sipsolutions.net/en/users/Drivers/b43/#Other_distributions_not_mentioned_above here].&lt;br /&gt;
&lt;br /&gt;
Now you need to use modprobe so the device will show up:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|modprobe b43}}&lt;br /&gt;
&lt;br /&gt;
Now continue with the normal instructions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rfkill ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See Also: [https://wiki.archlinux.org/title/Network_configuration/Wireless#Rfkill_caveat Network configuration/Wireless#Rfkill caveat - ArchLinux Wiki]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many laptops have a hardware button (or switch) to turn off wireless card, however, the card can also be blocked by kernel. This can be changed using rfkill. To show the current of your Wi-Fi: &lt;br /&gt;
&lt;br /&gt;
{{Cat|(example) $ rfkill list|0: phy0: wlan&lt;br /&gt;
    Soft blocked: no&lt;br /&gt;
    Hard blocked: no}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the card is hard-blocked, use the hardware button or switch to unblock it. If the card is not hard-blocked but soft-blocked, use the following command: &lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rfkill unblock wifi}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Installation#Post-Install|Post Install]]&lt;br /&gt;
* [[Alpine setup scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Fonts&amp;diff=23155</id>
		<title>Fonts</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Fonts&amp;diff=23155"/>
		<updated>2023-04-15T14:49:25Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: /* Changing the console font */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Fonts&#039;&#039;&#039; on Alpine Linux covers a wide range of various languages.  If you can&#039;t see your language, you need to install the font that has glyphs (little picture) created for it.  The square box called a substitute character or &amp;quot;tofu&amp;quot; that acts as a placeholder for missing a glyph usually with a two byte sequence.  Tofu is a prepared food that is a traditional part of East Asian and Southeast Asian meals. It is often served in a white rectangular appearance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|The system font directory is located at &#039;&#039;&#039;/usr/share/fonts&#039;&#039;&#039; which is reserved for the Alpine package creators and the package system. The user font location is located in &#039;&#039;&#039;~/.fonts&#039;&#039;&#039; which is the preferred install font location especially from unknown sources.  Fonts have been used as a source of security exploits [https://www.cvedetails.com/vulnerability-list/vendor_id-4535/product_id-7835/Freetype-Freetype.html (See CVEs)] so to reduce the spread of attack install fonts inside &#039;&#039;&#039;~/.fonts&#039;&#039;&#039;.  The trusted system fonts that Alpine LInux packages typically are from well known sources like corporations like Google, Adobe, open organizations like Xorg or well known font designers or projects licensed as either [https://en.wikipedia.org/wiki/SIL_Open_Font_License SIL], GPL, etc.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
 &lt;br /&gt;
Default internal fb fonts (tty console) or xorg fonts (desktops) are suitable for a default installation. {{Pkg|font-misc-misc}} is installed with Xorg, so fonts for most languages (Japanese, Korean, Latin, Cyrillic) are already covered. Exceptions are Arabic, Persian, Thai, Tamil, etc. according to the Wikipedia Page on languages for article translation. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These selections will cover most languages and are a good fit for most setups: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
apk add font-terminus font-inconsolata font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These selections add special support for &#039;&#039;&#039;cyrillic languages like Russian and Serbian, etc.&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
apk add font-vollkorn font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These selections cover special &#039;&#039;&#039;Asiatic languages like Japanese, etc.&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
apk add font-terminus font-noto font-noto-thai font-noto-tibetan font-ipa font-sony-misc font-daewoo-misc font-jis-misc&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following will add some &#039;&#039;&#039;partially supported Chinese fonts&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
apk add font-isas-misc&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These selection will cover, in general &#039;&#039;&#039;Arabic, Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana languages support&#039;&#039;&#039; for desktop setups:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
apk add font-terminus font-bitstream-* font-noto font-noto-extra font-arabic-misc &lt;br /&gt;
&lt;br /&gt;
apk add font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic&lt;br /&gt;
&lt;br /&gt;
apk add font-noto-arabic font-noto-armenian font-noto-cherokee font-noto-devanagari font-noto-ethiopic font-noto-georgian&lt;br /&gt;
&lt;br /&gt;
apk add font-noto-hebrew font-noto-lao font-noto-malayalam font-noto-tamil font-noto-thaana font-noto-thai&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;fc-cache -fv&amp;lt;/code&amp;gt; can be used to display the font locations and to update the cache.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some applications do not specify a specific font to use but rather say sans-serif [sans means without as in without tiny lines], serif, monospace [as in proportional square font].  This is where Fontconfig comes into place by substituting the general font type with a specific font that you like.  For package developers, &#039;&#039;&#039;/etc/fonts/conf.avail&#039;&#039;&#039; contains a fontconfig configuration file.  This will be symlinked into &#039;&#039;&#039;/etc/fonts/conf.d&#039;&#039;&#039;.  See &#039;&#039;&#039;/etc/fonts/conf.d/README&#039;&#039;&#039; for details about the meaning behind the priority numbers.&lt;br /&gt;
&lt;br /&gt;
For regular users, you want to create/edit your personal &#039;&#039;&#039;~/.fonts.conf&#039;&#039;&#039;.  This is in XML and describes which preferred font to use for these general types.  See [https://www.freedesktop.org/software/fontconfig/fontconfig-user.html this] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Per-user Configuration is made in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;~/.fonts.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;but it&#039;s hard to configure. An easier method is to use the&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;~/.Xresources&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The following will set up for all users, a minimal resource usage for fonts. No antialiasing. No hint, etc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat &amp;gt; /home/*/.Xresources &amp;lt;&amp;lt; EOF&lt;br /&gt;
Xft.antialias: 0&lt;br /&gt;
Xft.rgba:      rgb&lt;br /&gt;
Xft.autohint:  0&lt;br /&gt;
Xft.hinting:   1&lt;br /&gt;
Xft.hintstyle: hintslight&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of fonts in Alpine Linux ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Utopia_(typeface) Utopia] - font-adobe-utopia-*&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Noto_fonts Noto] - font-noto-* -- These fonts can cover different glyphs for your language.  If you go to https://fonts.google.com/noto , you can try to search for your language to see if it is supported.  If Alpine doesn&#039;t have it, you can download it from Google into your {{path|~/.font}} .  As hinted in the introduction, noto comes from &#039;&#039;&#039;no to&#039;&#039;&#039;fu or gradual elimination of these substitute characters off the web.&lt;br /&gt;
 font-noto&lt;br /&gt;
 font-noto-adlam&lt;br /&gt;
 font-noto-adlamunjoined&lt;br /&gt;
 font-noto-arabic&lt;br /&gt;
 font-noto-armenian&lt;br /&gt;
 font-noto-avestan&lt;br /&gt;
 font-noto-bamum&lt;br /&gt;
 font-noto-bengali&lt;br /&gt;
 font-noto-buhid&lt;br /&gt;
 font-noto-carian&lt;br /&gt;
 font-noto-chakma&lt;br /&gt;
 font-noto-cherokee&lt;br /&gt;
 font-noto-cypriot&lt;br /&gt;
 font-noto-deseret&lt;br /&gt;
 font-noto-devanagari (Hindi / Sanskrit)&lt;br /&gt;
 font-noto-emoji&lt;br /&gt;
 font-noto-ethiopic&lt;br /&gt;
 font-noto-extra&lt;br /&gt;
 font-noto-georgian&lt;br /&gt;
 font-noto-glagolitic&lt;br /&gt;
 font-noto-gothic&lt;br /&gt;
 font-noto-gujarati&lt;br /&gt;
 font-noto-gurmukhi&lt;br /&gt;
 font-noto-hebrew&lt;br /&gt;
 font-noto-kannada&lt;br /&gt;
 font-noto-kayahli&lt;br /&gt;
 font-noto-khmer&lt;br /&gt;
 font-noto-lao&lt;br /&gt;
 font-noto-lisu&lt;br /&gt;
 font-noto-malayalam&lt;br /&gt;
 font-noto-mandaic&lt;br /&gt;
 font-noto-myanmar&lt;br /&gt;
 font-noto-nko&lt;br /&gt;
 font-noto-olchiki&lt;br /&gt;
 font-noto-oldturkic&lt;br /&gt;
 font-noto-oriya&lt;br /&gt;
 font-noto-osage&lt;br /&gt;
 font-noto-osmanya&lt;br /&gt;
 font-noto-shavian&lt;br /&gt;
 font-noto-sinhala&lt;br /&gt;
 font-noto-tamil&lt;br /&gt;
 font-noto-telugu&lt;br /&gt;
 font-noto-thaana&lt;br /&gt;
 font-noto-thai&lt;br /&gt;
 font-noto-tibetan&lt;br /&gt;
 font-noto-tifinagh&lt;br /&gt;
 font-noto-vai&lt;br /&gt;
* [http://terminus-font.sourceforge.net/ Terminus] - font-terminus -- Monospace font&lt;br /&gt;
* [https://mirrors.ibiblio.org/CTAN/systems/win32/bakoma/fonts/fonts.html BaKoMa] font-bakoma-* -- Fonts for TeX typesetting system (for academics in the math and sciences and book writers) and TeX (WYSIWYG) editors&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Bitstream_Speedo_Fonts Bitstream Speedo] - font-bitstream-speedo&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bitstream Vera] font-bitstream-*&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bera (Bitstream Vera Type 1)] - font-bitstream-type1 -- Use for LaTeX&lt;br /&gt;
* [https://fontawesome.com/ Font Awesome] - font-awesome -- It was used in Twitter Bootstrap.  It is a font representing things and brands as Icons.&lt;br /&gt;
* [https://www.gnu.org/software/freefont/ GNU FreeFont] - font-freefont -- See link for support for different writing systems/languages&lt;br /&gt;
* [https://savannah.gnu.org/projects/unifont/ GNU Unifont] - unifont -- It contains glyphs of every codepoint&lt;br /&gt;
* font-misc-cyrillic -- Cyrillic fonts (Russian/Slavic Style)&lt;br /&gt;
* font-screen-cyrillic -- X.org public domain Cyrillic fonts for screen use&lt;br /&gt;
* font-misc-ethiopic -- Ethiopic fonts used in Ethiopia and Eritrea&lt;br /&gt;
* font-misc-meltho -- For the Syriac language&lt;br /&gt;
* font-misc-misc -- Bitmap fonts in PCF format (shows glyphs of many types and installed by default by xorg-server package)&lt;br /&gt;
* [https://www.rockbox.org/mail/archive/rockbox-dev-archive-2005-12/0029.shtml ClearlyU fonts] - font-mutt-misc -- Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana.  See link to changelog for full list of languages supported.&lt;br /&gt;
* [https://github.com/lucy/tewi-font tewi font] font-tewi - A tiny bitmap font that contains braille glyphs&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Overpass_(typeface) Overpass] - font-overpass&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Luxi_fonts Luxi fonts] - font-bh-* -- designed by Kris Holmes and Charles Bigelow which bh is refers to the last name&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Lucida#Lucida_Typewriter_Serif Lucida Typewriter] - font-bh-lucidatypewriter-*&lt;br /&gt;
* [https://directory.fsf.org/wiki/IPAfont IPA Font] - font-ipa -- A Japanese font&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Croscore_fonts Chrome OS core fonts] - font-croscore&lt;br /&gt;
* [http://vollkorn-typeface.com/ Vollkorn] - font-vollkorn - A serif font with glyphs for Cyrillic (Russian/Slavic), Greek, Polish, Dutch, Bulgarian, Serbian, and small capitals&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Open_Sans Open Sans] - font-opensans&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Cantarell_(typeface) Cantarell] - font-cantarell -- Designed for reading and the default GNOME font&lt;br /&gt;
* [https://en.wikipedia.org/wiki/DejaVu_fonts DejaVu] - font-dejavu -- A modified Bitstream Vera with more styles and unicode coverage&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linux_Libertine Linux Libertine] - font-linux-libertine -- A free alternative to Times New Roman&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Liberation_fonts Liberation] font-liberation -- A free alternative to Helvetica and Arial&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Inconsolata Inconsolata] - font-inconsolata -- A monospace font designed for terminals and reading source code&lt;br /&gt;
* [https://madmalik.github.io/mononoki/ mononoki] - font-mononoki -- A font for programming and code review&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Droid_fonts Droid] - font-droid / font-droid-nonlatin -- Designed for small screens and was used in older Android&lt;br /&gt;
* font-schumacher-misc -- Fixed width fonts by Dale Schumacher&lt;br /&gt;
* font-sony-misc -- Japanese Kana fonts by Sony Electronics&lt;br /&gt;
* font-daewoo-misc -- JIS (Japanese Industrial Standards) Kanji and Korean Hangul fonts by Daewoo Electronics&lt;br /&gt;
* font-cursor-misc -- A standard cursor font&lt;br /&gt;
* font-sun-misc -- Cursor and glyph fonts by Sun Microsystems&lt;br /&gt;
* font-winitzki-cyrillic -- A Cyrillic (Russian) font by Serge Winitzki designed for proofreading mixed Russian-English text&lt;br /&gt;
* font-isas-misc -- Chinese Song Ti style fonts (thinner horizontal lines compared to vertical)&lt;br /&gt;
* font-jis-misc -- A Japanese International Standard font&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Courier_(typeface)#IBM_Courier IBM Courier] font-ibm-type1&lt;br /&gt;
* font-dec-misc -- A Digital Equipment Corporation cursor and session fonts&lt;br /&gt;
* font-cronyx-cyrillic -- A Russian font for X11 by Cronyx&lt;br /&gt;
* font-arabic-misc -- A bitmap and proportional Arabic font in newspaper style [https://unicode.org/mail-arch/unicode-ml/Archives-Old/UML010/0237.html ]&lt;br /&gt;
&lt;br /&gt;
==Non-free fonts==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Core_fonts_for_the_Web Core fonts for the Web] ({{Pkg|msttcorefonts-installer}}) - For installing non-free proprietary Microsoft fonts like [https://en.wikipedia.org/wiki/Comic_Sans Comic Sans]. Not recommended for commercial or open source projects. See their [https://web.archive.org/web/20091208063245/http://www.microsoft.com/typography/fontpack/eula.htm licensing].&lt;br /&gt;
  Arial&lt;br /&gt;
  Arial Black&lt;br /&gt;
  Andalé Mono&lt;br /&gt;
  Courier New&lt;br /&gt;
  Comic Sans MS&lt;br /&gt;
  Georgia&lt;br /&gt;
  Impact&lt;br /&gt;
  Times New Roman&lt;br /&gt;
  Trebuchet MS&lt;br /&gt;
  Verdana&lt;br /&gt;
  Webdings&lt;br /&gt;
&lt;br /&gt;
== Changing the console font ==&lt;br /&gt;
&lt;br /&gt;
The default font may be too small on high-resolution monitors, e.g. 4K ones. To change the default font, e.g. to the 32px ISO Latin-1 Terminus font:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;apk add terminus-font&amp;lt;/code&amp;gt;&lt;br /&gt;
# try out fonts in a virtual console using &amp;lt;code&amp;gt;setfont /usr/share/consolefonts/ter-132n.psf.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# edit &amp;lt;code&amp;gt;/etc/conf.d/consolefont&amp;lt;/code&amp;gt;, set it to the font you choose, e.g. &amp;lt;code&amp;gt;consolefont=&amp;quot;ter-132n.psf.gz&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# enable this using &amp;lt;code&amp;gt;rc-update add consolefont boot&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Emojis]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Infographics]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=21943</id>
		<title>Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=21943"/>
		<updated>2022-05-31T14:52:06Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: Add new section for upgrading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://nextcloud.com/ Nextcloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. [http://karlitschek.de/2016/06/nextcloud/ Nextcloud is a fork of ownCloud with enterprise features included].&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
{{pkg|nextcloud}} is available from Alpine 3.5 and greater.&lt;br /&gt;
&lt;br /&gt;
Before you start installing anything, make sure you have the latest packages available. Make sure you are using an &#039;http&#039; repository in your {{path|/etc/apk/repositories}} file, then:&lt;br /&gt;
{{cmd|apk update}}&lt;br /&gt;
{{tip|Detailed information is found in [[Include:Upgrading_to_latest_release|this]] doc.}}&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
First you have to decide which database to use. Use one of the databases listed below.&lt;br /&gt;
&lt;br /&gt;
=== Sqlite ===&lt;br /&gt;
All you need to do is to install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== PostgreSQL ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-pgsql postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Next thing is to configure and start the database:&lt;br /&gt;
{{cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and temporarily grant the CREATEDB privilege:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
CREATE USER mycloud WITH PASSWORD &#039;test123&#039;;&lt;br /&gt;
ALTER ROLE mycloud CREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
Set postgresql to start on boot:&lt;br /&gt;
{{cmd|rc-update add postgresql}}&lt;br /&gt;
&lt;br /&gt;
=== MariaDB ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-mysql mariadb mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure and start {{pkg|mariadb}}:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;mysql_install_db --user=mysql --datadir=/var/lib/mysql&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
service mariadb start&lt;br /&gt;
rc-update add mariadb&lt;br /&gt;
mysql_secure_installation}}&lt;br /&gt;
Follow the wizard to setup passwords, etc.&lt;br /&gt;
{{Note|Remember the usernames/passwords that you set using the wizard. You will need them later.}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and database and set permissions:&lt;br /&gt;
{{cmd|mysql -u root -p&lt;br /&gt;
CREATE DATABASE nextcloud;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost.localdomain&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
FLUSH PRIVILEGES;&lt;br /&gt;
EXIT}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
{{pkg|mariadb-client}} is not needed anymore. Let&#039;s uninstall it:&lt;br /&gt;
{{cmd|apk del mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
== Webserver ==&lt;br /&gt;
Next thing is to choose, install, and configure a webserver. In this example we will install {{pkg|nginx}} or {{pkg|lighttpd}}. &#039;&#039;Nginx&#039;&#039; is preferred over &#039;&#039;Lighttpd&#039;&#039; since the latter will consume a lot of memory when working with large files (see [http://redmine.lighttpd.net/issues/1283 lighty bug #1283]). You are free to install any other webserver of your choice as long as it supports PHP and FastCGI. Generating an SSL certificate for your webserver is outside of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
{{pkg|nextcloud-initscript}} facilitates running the webserver with php-fpm.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add nextcloud-initscript}}&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
Install the needed packages:&lt;br /&gt;
{{cmd|apk add nginx php8-fpm}}&lt;br /&gt;
&lt;br /&gt;
Delete the default nginx website configuration:&lt;br /&gt;
{{cmd|rm /etc/nginx/http.d/default.conf}}&lt;br /&gt;
&lt;br /&gt;
Create a configuration file for your site in {{path|/etc/nginx/http.d/mysite.mydomain.com.conf}}:&lt;br /&gt;
{{Cat|/etc/nginx/http.d/mysite.mydomain.com.conf|server {&lt;br /&gt;
        #listen       [::]:80; #uncomment for IPv6 support&lt;br /&gt;
        listen       80;&lt;br /&gt;
	return 301 https://$host$request_uri;&lt;br /&gt;
	server_name mysite.mydomain.com;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:443 ssl; #uncomment for IPv6 support&lt;br /&gt;
        listen       443 ssl;&lt;br /&gt;
        server_name  mysite.mydomain.com;&lt;br /&gt;
&lt;br /&gt;
	root /usr/share/webapps/nextcloud;&lt;br /&gt;
        index  index.php index.html index.htm;&lt;br /&gt;
	disable_symlinks off;&lt;br /&gt;
&lt;br /&gt;
        ssl_certificate      /etc/ssl/cert.pem;&lt;br /&gt;
        ssl_certificate_key  /etc/ssl/key.pem;&lt;br /&gt;
        ssl_session_timeout  5m;&lt;br /&gt;
&lt;br /&gt;
        #Enable Perfect Forward Secrecy and ciphers without known vulnerabilities&lt;br /&gt;
        #Beware! It breaks compatibility with older OS and browsers (e.g. Windows XP, Android 2.x, etc.)&lt;br /&gt;
	#ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA;&lt;br /&gt;
        #ssl_prefer_server_ciphers  on;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        location / {&lt;br /&gt;
            try_files $uri $uri/ /index.html;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000&lt;br /&gt;
        location ~ [^/]\.php(/&amp;amp;#124;$) {&lt;br /&gt;
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
                if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                        return 404;&lt;br /&gt;
                }&lt;br /&gt;
                #fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;
		#fastcgi_pass unix:/run/php-fpm/socket;&lt;br /&gt;
		fastcgi_pass unix:/run/nextcloud/fastcgi.sock; # From the nextcloud-initscript package&lt;br /&gt;
                fastcgi_index index.php;&lt;br /&gt;
                include fastcgi.conf;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
        # Help pass nextcloud&#039;s configuration checks after install:&lt;br /&gt;
        # Per https://docs.nextcloud.com/server/22/admin_manual/issues/general_troubleshooting.html#service-discovery&lt;br /&gt;
        location ^~ /.well-known/carddav { return 301 /remote.php/dav/; }&lt;br /&gt;
        location ^~ /.well-known/caldav { return 301 /remote.php/dav/; }&lt;br /&gt;
        location ^~ /.well-known/webfinger { return 301 /index.php/.well-known/webfinger; }&lt;br /&gt;
        location ^~ /.well-known/nodeinfo { return 301 /index.php/.well-known/nodeinfo; }&lt;br /&gt;
}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you plan to enable uploads - and you probably do) - then you need to modify the default:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client_max_body_size 1m;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setting in {{path|/etc/nginx/nginx.conf}}. For testing purposes, I disabled the limit by changing it to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client_max_body_size 0;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enabled large file uploads and auto-uploads to work. Note, this is a file-size restriction in addition to the restriction set in {{path|/etc/php8/php-fpm.d/nextcloud.conf}}. That second restriction defaults to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Maximal size of a file that can be uploaded via web interface.&lt;br /&gt;
php_admin_value[memory_limit] = 512M&lt;br /&gt;
php_admin_value[post_max_size] = 513M&lt;br /&gt;
php_admin_value[upload_max_filesize] = 513M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another setting that may limit file-size is in configuration file {{path|/etc/php8/php.ini}}, where I set the restriction to to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
upload_max_filesize = 513M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to match the {{path|/etc/php8/php-fpm.d/nextcloud.conf}} file-size restriction.&lt;br /&gt;
&lt;br /&gt;
If you are running from RAM and you&#039;re dealing with large files you might need to move the FastCGI temp file from {{path|/tmp}} to {{path|/var/tmp}} or to a directory that is mounted on hdd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_temp_path /var/tmp/nginx/fastcgi 1 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large file uploads take some time to be processed by php-fpm, so you need to bump the Nginx default read timeout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_read_timeout 300s;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are serving several users make sure to tune the *&#039;&#039;pm.max_children&#039;&#039; setting in {{path|/etc/php8/php-fpm.d/nextcloud.conf}}}}&lt;br /&gt;
&lt;br /&gt;
{{path|/etc/nginx/nginx.conf}} should already be configured to load your site config from this directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
# Includes virtual hosts configs.&lt;br /&gt;
include /etc/nginx/http.d/*;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
{{cmd|service nginx start&lt;br /&gt;
service nextcloud start}}&lt;br /&gt;
&lt;br /&gt;
Enable automatic startup of services:&lt;br /&gt;
{{cmd|rc-update add nginx&lt;br /&gt;
rc-update add nextcloud}}&lt;br /&gt;
&lt;br /&gt;
=== Lighttpd ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add lighttpd php5-cgi}}&lt;br /&gt;
&lt;br /&gt;
Make sure you have FastCGI enabled in {{pkg|lighttpd}}:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
include &amp;quot;mod_fastcgi.conf&amp;quot;&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
Start up the webserver:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
{{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 &#039;&#039;(securing your connections to your nextcloud server)&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
Link {{pkg|nextcloud}} installation to web server directory:&lt;br /&gt;
{{cmd|ln -s /usr/share/webapps/nextcloud /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
== Other settings ==&lt;br /&gt;
=== Hardening ===&lt;br /&gt;
Consider updating the variable &amp;lt;code&amp;gt;url.access-deny&amp;lt;/code&amp;gt; in {{path|/etc/lighttpd/lighttpd.conf}} for additional security. Add &amp;lt;code&amp;gt;&amp;quot;config.php&amp;quot;&amp;lt;/code&amp;gt; to the variable &#039;&#039;(that&#039;s where the database is stored)&#039;&#039; so it looks something like this:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
url.access-deny {{=}} (&amp;quot;~&amp;quot;, &amp;quot;.inc&amp;quot;, &amp;quot;config.php&amp;quot;)&lt;br /&gt;
...}}&lt;br /&gt;
Restart {{pkg|lighttpd}} to activate the changes:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd restart}}&lt;br /&gt;
&lt;br /&gt;
=== Additional packages ===&lt;br /&gt;
Some large apps, such as pdfviewer, texteditor, notifications and videoplayer are in separate packages:&lt;br /&gt;
{{cmd|apk add nextcloud-files_pdfviewer nextcloud-text nextcloud-notifications nextcloud-files_videoplayer nextcloud-files_external}}&lt;br /&gt;
You can also install a [https://pkgs.alpinelinux.org/package/v3.15/community/x86_64/nextcloud-default-apps meta-package] which installs all 30 core Nextcloud apps (listed as dependencies under aforementioned link):&lt;br /&gt;
{{cmd|apk add nextcloud-default-apps}}&lt;br /&gt;
&lt;br /&gt;
=== How To Create a Self-Signed SSL Certificate ===&lt;br /&gt;
Install openssl:&lt;br /&gt;
{{cmd|apk add openssl}}&lt;br /&gt;
Generate your self signed certificate and its private key:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl1.1/private/nextcloud-selfsigned.key -out /etc/ssl1.1/certs/nextcloud-selfsigned.crt&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
Edit your nginx configuration:&lt;br /&gt;
{{cat|/etc/nginx/http.d/mysite.mydomain.com.conf|&lt;br /&gt;
ssl_certificate      /etc/ssl1.1/certs/nextcloud-selfsigned.crt;&lt;br /&gt;
ssl_certificate_key  /etc/ssl1.1/private/nextcloud-selfsigned.key;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== How To Install and Set Up Auto-Renewing LetsEncrypt SSL Certificate ===&lt;br /&gt;
After first setting up the Nextcloud server using the instructions in the &#039;Configure and use Nextcloud&#039; section below, I then followed the SSL-setup instructions at: [[https://techjogging.com/create-letsencrypt-certificate-alpine-nginx.html Tech Jogging]].&lt;br /&gt;
&lt;br /&gt;
I also had to add my Nextcloud servers Fully Qualified Domain Name (FQDN) to the list of trusted domains in /etc/nextcloud/config.php. In the section labelled: &#039;trusted_domains&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;trusted_domains&#039; =&amp;gt;&lt;br /&gt;
  array (&lt;br /&gt;
    0 =&amp;gt; &#039;&amp;lt;machine&#039;s local IP address&amp;gt;&#039;,&lt;br /&gt;
    1 =&amp;gt; &#039;nextcloud.mydomain.com&#039;,&lt;br /&gt;
  ),&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configure and use Nextcloud =&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
Point your browser at &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://mysite.mydomain.com&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and follow the on-screen instructions to complete the installation, supplying the database user and password created before.&lt;br /&gt;
&lt;br /&gt;
== Hardening PostgreSQL ==&lt;br /&gt;
If you have chosen PGSQL backend, revoke CREATEDB privilege from &#039;mycloud&#039; user:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
ALTER ROLE mycloud NOCREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
&lt;br /&gt;
== Increase upload size ==&lt;br /&gt;
 {{path|/etc/php8/php-fpm.d/nextcloud.conf}} has overridden default file sizes, but they can be modified further to suit your needs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Maximal size of a file that can be uploaded via web interface.&lt;br /&gt;
php_admin_value[memory_limit] = 512M&lt;br /&gt;
php_admin_value[post_max_size] = 513M&lt;br /&gt;
php_admin_value[upload_max_filesize] = 513M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== enable opcache for nginx/php8 ==&lt;br /&gt;
To increase performace install&lt;br /&gt;
{{cmd|apk add php8-opcache}}&lt;br /&gt;
&lt;br /&gt;
Now uncomment/edit lines in /etc/php8/php.ini:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
opcache.enable=1&lt;br /&gt;
opcache.enable_cli=1&lt;br /&gt;
opcache.interned_strings_buffer=8&lt;br /&gt;
opcache.max_accelerated_files=10000&lt;br /&gt;
opcache.memory_consumption=128 //you can reduce this slightly when short on RAM&lt;br /&gt;
opcache.save_comments=1&lt;br /&gt;
opcache.revalidate_freq=1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart php-fpm8&lt;br /&gt;
{{cmd|rc-service php-fpm8 restart}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
There are clients available for many platforms, Android included:&lt;br /&gt;
* http://nextcloud.org/sync-clients/ &#039;&#039;(nextcloud Sync clients)&#039;&#039;&lt;br /&gt;
* http://nextcloud.org/support/android/ &#039;&#039;(Android client)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://pkgs.alpinelinux.org/packages?name=nextcloud-client&amp;amp;branch=&amp;amp;repo=&amp;amp;arch=&amp;amp;maintainer= nextcloud-client] is currently available in the testing repo.&lt;br /&gt;
&lt;br /&gt;
= Video Communication =&lt;br /&gt;
One of the major features of Nextcloud 11, available on Alpine 3.6 (currently edge) is a [https://nextcloud.com/webrtc/ WebRTC app], which relies on Spreed WebRTC server, which is available in the Alpine testing repository. Everything is still beta, so be aware of it :-). If you want a private video conferencing server install Nextcloud using Nginx and do the following (you can use Apache as well and follow the &#039;&#039;Apache config&#039;&#039; instructions [https://nextcloud.com/webrtc/ nextcloud.com]):&lt;br /&gt;
&lt;br /&gt;
Put the following config in the &#039;&#039;server&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Spreed WebRTC&lt;br /&gt;
location ^~ /webrtc {&lt;br /&gt;
  proxy_pass http://127.0.0.1:8080;&lt;br /&gt;
  proxy_http_version 1.1;&lt;br /&gt;
  proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
  proxy_set_header Connection $connection_upgrade;&lt;br /&gt;
  proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
  proxy_set_header Host $http_host;&lt;br /&gt;
  proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
&lt;br /&gt;
  proxy_buffering             on;&lt;br /&gt;
  proxy_ignore_client_abort   off;&lt;br /&gt;
  proxy_redirect              off;&lt;br /&gt;
  proxy_connect_timeout       90;&lt;br /&gt;
  proxy_send_timeout          90;&lt;br /&gt;
  proxy_read_timeout          90;&lt;br /&gt;
  proxy_buffer_size           4k;&lt;br /&gt;
  proxy_buffers               4 32k;&lt;br /&gt;
  proxy_busy_buffers_size     64k;&lt;br /&gt;
  proxy_temp_file_write_size  64k;&lt;br /&gt;
  proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the following section in the &#039;&#039;http&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
map $http_upgrade $connection_upgrade {&lt;br /&gt;
  default upgrade;&lt;br /&gt;
  &#039;&#039;      close;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reload Nginx:&lt;br /&gt;
{{cmd|rc-service nginx reload}}&lt;br /&gt;
&lt;br /&gt;
Install Spreed WedRTC server (make sure you have the testing [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Packages_and_Repositories repository] enabled):&lt;br /&gt;
{{cmd|apk add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Using the configuration file in &#039;&#039;/etc/spreed-webrtc/spreed-webrtc-server.conf&#039;&#039; follow the instructions at [https://nextcloud.com/webrtc/ nextcloud.com] to configure Spreed WebRTC server. Then start the server:&lt;br /&gt;
{{cmd|rc-service spreed-web-server start}}&lt;br /&gt;
{{cmd|rc-update add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;Spreed video calls&#039;&#039; app in Nextcloud and enjoy your private video calls.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
&lt;br /&gt;
= Upgrading =&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using alpine stable, rather than edge, be aware when an upgrade skips a major release version: Nextcloud doesn&#039;t support skipping a major release version in its upgrade path. For this reason, alpine also packages the previous nextcloud release as a separate package.&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=AppStream&amp;diff=20239</id>
		<title>AppStream</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=AppStream&amp;diff=20239"/>
		<updated>2021-11-06T19:03:10Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: Start AppStream page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;AppStream is a collaborative effort between Linux distributions to produce shared metadata for the creation of appstores.&lt;br /&gt;
&lt;br /&gt;
Alpine&#039;s appstream data can be found at https://appstream.alpinelinux.org/&lt;br /&gt;
&lt;br /&gt;
It&#039;s generated by appstream-generator&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20163</id>
		<title>Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20163"/>
		<updated>2021-09-30T23:24:20Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: some configurations are already set in /etc/php7/php-fpm.d/nextcloud.conf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://nextcloud.com/ Nextcloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. [http://karlitschek.de/2016/06/nextcloud/ Nextcloud is a fork of ownCloud with enterprise features included].&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
{{pkg|nextcloud}} is available from Alpine 3.5 and greater.&lt;br /&gt;
&lt;br /&gt;
Before you start installing anything, make sure you have the latest packages available. Make sure you are using an &#039;http&#039; repository in your {{path|/etc/apk/repositories}} file, then:&lt;br /&gt;
{{cmd|apk update}}&lt;br /&gt;
{{tip|Detailed information is found in [[Include:Upgrading_to_latest_release|this]] doc.}}&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
First you have to decide which database to use. Use one of the databases listed below.&lt;br /&gt;
&lt;br /&gt;
=== Sqlite ===&lt;br /&gt;
All you need to do is to install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== PostgreSQL ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-pgsql postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Next thing is to configure and start the database:&lt;br /&gt;
{{cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and temporarily grant the CREATEDB privilege:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
CREATE USER mycloud WITH PASSWORD &#039;test123&#039;;&lt;br /&gt;
ALTER ROLE mycloud CREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
=== MariaDB ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-mysql mariadb mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure and start {{pkg|mariadb}}:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;mysql_install_db --user=mysql --datadir=/var/lib/mysql&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
/etc/init.d/mariadb start&lt;br /&gt;
/usr/bin/mysql_secure_installation}}&lt;br /&gt;
Follow the wizard to setup passwords, etc.&lt;br /&gt;
{{Note|Remember the usernames/passwords that you set using the wizard. You will need them later.}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and database and set permissions:&lt;br /&gt;
{{cmd|mysql -u root -p&lt;br /&gt;
CREATE DATABASE nextcloud;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost.localdomain&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
FLUSH PRIVILEGES;&lt;br /&gt;
EXIT}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
{{pkg|mariadb-client}} is not needed anymore. Let&#039;s uninstall it:&lt;br /&gt;
{{cmd|apk del mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
== Webserver ==&lt;br /&gt;
Next thing is to choose, install, and configure a webserver. In this example we will install {{pkg|nginx}} or {{pkg|lighttpd}}. &#039;&#039;Nginx&#039;&#039; is preferred over &#039;&#039;Lighttpd&#039;&#039; since the latter will consume a lot of memory when working with large files (see [http://redmine.lighttpd.net/issues/1283 lighty bug #1283]). You are free to install any other webserver of your choice as long as it supports PHP and FastCGI. Generating an SSL certificate for your webserver is outside of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
{{pkg|nextcloud-initscript}} facilitates running the webserver with php-fpm.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
Install the needed packages:&lt;br /&gt;
{{cmd|apk add nginx php7-fpm}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remove/comment&#039;&#039;&#039; any section like this in {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
server {&lt;br /&gt;
        listen ...&lt;br /&gt;
       }&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Create a configuration file for your site in {{path|/etc/nginx/http.d/mysite.mydomain.com}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:80; #uncomment for IPv6 support&lt;br /&gt;
        listen       80;&lt;br /&gt;
	return 301 https://$host$request_uri;&lt;br /&gt;
	server_name mysite.mydomain.com;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:443 ssl; #uncomment for IPv6 support&lt;br /&gt;
        listen       443 ssl;&lt;br /&gt;
        server_name  mysite.mydomain.com;&lt;br /&gt;
&lt;br /&gt;
	root /usr/share/webapps/nextcloud;&lt;br /&gt;
        index  index.php index.html index.htm;&lt;br /&gt;
	disable_symlinks off;&lt;br /&gt;
&lt;br /&gt;
        ssl_certificate      /etc/ssl/cert.pem;&lt;br /&gt;
        ssl_certificate_key  /etc/ssl/key.pem;&lt;br /&gt;
        ssl_session_timeout  5m;&lt;br /&gt;
&lt;br /&gt;
        #Enable Perfect Forward Secrecy and ciphers without known vulnerabilities&lt;br /&gt;
        #Beware! It breaks compatibility with older OS and browsers (e.g. Windows XP, Android 2.x, etc.)&lt;br /&gt;
	#ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA;&lt;br /&gt;
        #ssl_prefer_server_ciphers  on;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        location / {&lt;br /&gt;
            try_files $uri $uri/ /index.html;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
                if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                        return 404;&lt;br /&gt;
                }&lt;br /&gt;
                #fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;
		#fastcgi_pass unix:/run/php-fpm/socket;&lt;br /&gt;
		fastcgi_pass unix:/run/nextcloud/fastcgi.sock; # From the nextcloud-initscript package&lt;br /&gt;
                fastcgi_index index.php;&lt;br /&gt;
                include fastcgi.conf;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are running from RAM and you&#039;re dealing with large files you might need to move the FastCGI temp file from {{path|/tmp}} to {{path|/var/tmp}} or to a directory that is mounted on hdd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_temp_path /var/tmp/nginx/fastcgi 1 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large file uploads take some time to be processed by php-fpm, so you need to bump the Nginx default read timeout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_read_timeout 300s;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are serving serveral users make sure to tune the *&#039;&#039;pm.max_children&#039;&#039; settings in {{path|/etc/php7/php-fpm.d/nextcloud.conf}}}}&lt;br /&gt;
&lt;br /&gt;
{{path|/etc/nginx/nginx.conf}} should already be configured to load your site config from this directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
# Includes virtual hosts configs.&lt;br /&gt;
include /etc/nginx/http.d/*;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
{{cmd|rc-service php-fpm7 start&lt;br /&gt;
rc-service nginx start&lt;br /&gt;
rc-service nextcloud start}}&lt;br /&gt;
&lt;br /&gt;
Enable automatic startup of services:&lt;br /&gt;
{{cmd|rc-update add php-fpm7&lt;br /&gt;
rc-update add nginx&lt;br /&gt;
rc-update add nextcloud}}&lt;br /&gt;
&lt;br /&gt;
=== Lighttpd ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add lighttpd php5-cgi}}&lt;br /&gt;
&lt;br /&gt;
Make sure you have FastCGI enabled in {{pkg|lighttpd}}:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
include &amp;quot;mod_fastcgi.conf&amp;quot;&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
Start up the webserver:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
{{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 &#039;&#039;(securing your connections to your nextcloud server)&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
Link {{pkg|nextcloud}} installation to web server directory:&lt;br /&gt;
{{cmd|ln -s /usr/share/webapps/nextcloud /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
== Other settings ==&lt;br /&gt;
=== Hardening ===&lt;br /&gt;
Consider updating the variable &amp;lt;code&amp;gt;url.access-deny&amp;lt;/code&amp;gt; in {{path|/etc/lighttpd/lighttpd.conf}} for additional security. Add &amp;lt;code&amp;gt;&amp;quot;config.php&amp;quot;&amp;lt;/code&amp;gt; to the variable &#039;&#039;(that&#039;s where the database is stored)&#039;&#039; so it looks something like this:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
url.access-deny {{=}} (&amp;quot;~&amp;quot;, &amp;quot;.inc&amp;quot;, &amp;quot;config.php&amp;quot;)&lt;br /&gt;
...}}&lt;br /&gt;
Restart {{pkg|lighttpd}} to activate the changes:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd restart}}&lt;br /&gt;
&lt;br /&gt;
=== Additional packages ===&lt;br /&gt;
Some large apps, such as pdfviewer, texteditor, notifications and videoplayer are in separate packages:&lt;br /&gt;
{{cmd|apk add nextcloud-pdfviewer nextcloud-texteditor nextcloud-notifications nextcloud-videoplayer}}&lt;br /&gt;
&lt;br /&gt;
=== How To Create a Self-Signed SSL Certificate ===&lt;br /&gt;
Install openssl:&lt;br /&gt;
{{cmd|apk add openssl}}&lt;br /&gt;
Generate your self signed certificate and its private key:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
Edit your nginx configuration:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
ssl_certificate      /etc/ssl/certs/nginx-selfsigned.crt;&lt;br /&gt;
ssl_certificate_key  /etc/ssl/private/nginx-selfsigned.key;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Configure and use Nextcloud =&lt;br /&gt;
== Configure ==&lt;br /&gt;
Point your browser at &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://mysite.mydomain.com&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and follow the on-screen instructions to complete the installation, supplying the database user and password created before.&lt;br /&gt;
&lt;br /&gt;
== Hardening PostgreSQL ==&lt;br /&gt;
If you have chosen PGSQL backend, revoke CREATEDB privilege from &#039;mycloud&#039; user:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
ALTER ROLE mycloud NOCREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
&lt;br /&gt;
== Increase upload size ==&lt;br /&gt;
 {{path|/etc/php/php-fpm.d/nextcloud.conf}} has overridden default file sizes, but they can be modified further to suit your needs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Maximal size of a file that can be uploaded via web interface.&lt;br /&gt;
php_admin_value[memory_limit] = 512M&lt;br /&gt;
php_admin_value[post_max_size] = 513M&lt;br /&gt;
php_admin_value[upload_max_filesize] = 513M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== enable opcache for nginx/php7 ==&lt;br /&gt;
To increase performace install&lt;br /&gt;
{{cmd|apk add php7-opcache}}&lt;br /&gt;
&lt;br /&gt;
Now uncomment/edit lines in /etc/php7/php.ini:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
opcache.enable=1&lt;br /&gt;
opcache.enable_cli=1&lt;br /&gt;
opcache.interned_strings_buffer=8&lt;br /&gt;
opcache.max_accelerated_files=10000&lt;br /&gt;
opcache.memory_consumption=128&lt;br /&gt;
opcache.save_comments=1&lt;br /&gt;
opcache.revalidate_freq=1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart php-fpm7&lt;br /&gt;
{{cmd|rc-service php-fpm7 restart}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
There are clients available for many platforms, Android included:&lt;br /&gt;
* http://nextcloud.org/sync-clients/ &#039;&#039;(nextcloud Sync clients)&#039;&#039;&lt;br /&gt;
* http://nextcloud.org/support/android/ &#039;&#039;(Android client)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://pkgs.alpinelinux.org/packages?name=nextcloud-client&amp;amp;branch=&amp;amp;repo=&amp;amp;arch=&amp;amp;maintainer= nextcloud-client] is currently available in the testing repo.&lt;br /&gt;
&lt;br /&gt;
= Video Communication =&lt;br /&gt;
One of the major features of Nextcloud 11, available on Alpine 3.6 (currently edge) is a [https://nextcloud.com/webrtc/ WebRTC app], which relies on Spreed WebRTC server, which is available in the Alpine testing repository. Everything is still beta, so be aware of it :-). If you want a private video conferencing server install Nextcloud using Nginx and do the following (you can use Apache as well and follow the &#039;&#039;Apache config&#039;&#039; instructions [https://nextcloud.com/webrtc/ nextcloud.com]):&lt;br /&gt;
&lt;br /&gt;
Put the following config in the &#039;&#039;server&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Spreed WebRTC&lt;br /&gt;
location ^~ /webrtc {&lt;br /&gt;
  proxy_pass http://127.0.0.1:8080;&lt;br /&gt;
  proxy_http_version 1.1;&lt;br /&gt;
  proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
  proxy_set_header Connection $connection_upgrade;&lt;br /&gt;
  proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
  proxy_set_header Host $http_host;&lt;br /&gt;
  proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
&lt;br /&gt;
  proxy_buffering             on;&lt;br /&gt;
  proxy_ignore_client_abort   off;&lt;br /&gt;
  proxy_redirect              off;&lt;br /&gt;
  proxy_connect_timeout       90;&lt;br /&gt;
  proxy_send_timeout          90;&lt;br /&gt;
  proxy_read_timeout          90;&lt;br /&gt;
  proxy_buffer_size           4k;&lt;br /&gt;
  proxy_buffers               4 32k;&lt;br /&gt;
  proxy_busy_buffers_size     64k;&lt;br /&gt;
  proxy_temp_file_write_size  64k;&lt;br /&gt;
  proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the following section in the &#039;&#039;http&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
map $http_upgrade $connection_upgrade {&lt;br /&gt;
  default upgrade;&lt;br /&gt;
  &#039;&#039;      close;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reload Nginx:&lt;br /&gt;
{{cmd|rc-service nginx reload}}&lt;br /&gt;
&lt;br /&gt;
Install Spreed WedRTC server (make sure you have the testing [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Packages_and_Repositories repository] enabled):&lt;br /&gt;
{{cmd|apk add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Using the configuration file in &#039;&#039;/etc/spreed-webrtc/spreed-webrtc-server.conf&#039;&#039; follow the instructions at [https://nextcloud.com/webrtc/ nextcloud.com] to configure Spreed WebRTC server. Then start the server:&lt;br /&gt;
{{cmd|rc-service spreed-web-server start}}&lt;br /&gt;
{{cmd|rc-update add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;Spreed video calls&#039;&#039; app in Nextcloud and enjoy your private video calls.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20162</id>
		<title>Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20162"/>
		<updated>2021-09-30T23:16:26Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: nginx in alpine loads http.d rather than sites-enabled&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://nextcloud.com/ Nextcloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. [http://karlitschek.de/2016/06/nextcloud/ Nextcloud is a fork of ownCloud with enterprise features included].&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
{{pkg|nextcloud}} is available from Alpine 3.5 and greater.&lt;br /&gt;
&lt;br /&gt;
Before you start installing anything, make sure you have the latest packages available. Make sure you are using an &#039;http&#039; repository in your {{path|/etc/apk/repositories}} file, then:&lt;br /&gt;
{{cmd|apk update}}&lt;br /&gt;
{{tip|Detailed information is found in [[Include:Upgrading_to_latest_release|this]] doc.}}&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
First you have to decide which database to use. Use one of the databases listed below.&lt;br /&gt;
&lt;br /&gt;
=== Sqlite ===&lt;br /&gt;
All you need to do is to install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== PostgreSQL ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-pgsql postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Next thing is to configure and start the database:&lt;br /&gt;
{{cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and temporarily grant the CREATEDB privilege:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
CREATE USER mycloud WITH PASSWORD &#039;test123&#039;;&lt;br /&gt;
ALTER ROLE mycloud CREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
=== MariaDB ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-mysql mariadb mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure and start {{pkg|mariadb}}:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;mysql_install_db --user=mysql --datadir=/var/lib/mysql&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
/etc/init.d/mariadb start&lt;br /&gt;
/usr/bin/mysql_secure_installation}}&lt;br /&gt;
Follow the wizard to setup passwords, etc.&lt;br /&gt;
{{Note|Remember the usernames/passwords that you set using the wizard. You will need them later.}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and database and set permissions:&lt;br /&gt;
{{cmd|mysql -u root -p&lt;br /&gt;
CREATE DATABASE nextcloud;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost.localdomain&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
FLUSH PRIVILEGES;&lt;br /&gt;
EXIT}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
{{pkg|mariadb-client}} is not needed anymore. Let&#039;s uninstall it:&lt;br /&gt;
{{cmd|apk del mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
== Webserver ==&lt;br /&gt;
Next thing is to choose, install, and configure a webserver. In this example we will install {{pkg|nginx}} or {{pkg|lighttpd}}. &#039;&#039;Nginx&#039;&#039; is preferred over &#039;&#039;Lighttpd&#039;&#039; since the latter will consume a lot of memory when working with large files (see [http://redmine.lighttpd.net/issues/1283 lighty bug #1283]). You are free to install any other webserver of your choice as long as it supports PHP and FastCGI. Generating an SSL certificate for your webserver is outside of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
{{pkg|nextcloud-initscript}} facilitates running the webserver with php-fpm.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
Install the needed packages:&lt;br /&gt;
{{cmd|apk add nginx php7-fpm}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remove/comment&#039;&#039;&#039; any section like this in {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
server {&lt;br /&gt;
        listen ...&lt;br /&gt;
       }&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Create a configuration file for your site in {{path|/etc/nginx/http.d/mysite.mydomain.com}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:80; #uncomment for IPv6 support&lt;br /&gt;
        listen       80;&lt;br /&gt;
	return 301 https://$host$request_uri;&lt;br /&gt;
	server_name mysite.mydomain.com;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:443 ssl; #uncomment for IPv6 support&lt;br /&gt;
        listen       443 ssl;&lt;br /&gt;
        server_name  mysite.mydomain.com;&lt;br /&gt;
&lt;br /&gt;
	root /usr/share/webapps/nextcloud;&lt;br /&gt;
        index  index.php index.html index.htm;&lt;br /&gt;
	disable_symlinks off;&lt;br /&gt;
&lt;br /&gt;
        ssl_certificate      /etc/ssl/cert.pem;&lt;br /&gt;
        ssl_certificate_key  /etc/ssl/key.pem;&lt;br /&gt;
        ssl_session_timeout  5m;&lt;br /&gt;
&lt;br /&gt;
        #Enable Perfect Forward Secrecy and ciphers without known vulnerabilities&lt;br /&gt;
        #Beware! It breaks compatibility with older OS and browsers (e.g. Windows XP, Android 2.x, etc.)&lt;br /&gt;
	#ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA;&lt;br /&gt;
        #ssl_prefer_server_ciphers  on;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        location / {&lt;br /&gt;
            try_files $uri $uri/ /index.html;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
                if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                        return 404;&lt;br /&gt;
                }&lt;br /&gt;
                #fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;
		#fastcgi_pass unix:/run/php-fpm/socket;&lt;br /&gt;
		fastcgi_pass unix:/run/nextcloud/fastcgi.sock; # From the nextcloud-initscript package&lt;br /&gt;
                fastcgi_index index.php;&lt;br /&gt;
                include fastcgi.conf;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are running from RAM and you&#039;re dealing with large files you might need to move the FastCGI temp file from {{path|/tmp}} to {{path|/var/tmp}} or to a directory that is mounted on hdd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_temp_path /var/tmp/nginx/fastcgi 1 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large file uploads take some time to be processed by php-fpm, so you need to bump the Nginx default read timeout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_read_timeout 300s;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set user and group for php-fpm in {{path|/etc/php7/php-fpm.d/www.conf}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
user = nginx&lt;br /&gt;
group = www-data&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are serving serveral users make sure to tune the *&#039;&#039;children&#039;&#039; settings in {{path|/etc/php7/php-fpm.d/www.conf}}}}&lt;br /&gt;
&lt;br /&gt;
Also enable $PATH by uncommenting the following lines in {{path|/etc/php7/php-fpm.d/www.conf}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
env[HOSTNAME] = $HOSTNAME&lt;br /&gt;
env[PATH] = /usr/local/bin:/usr/bin:/bin&lt;br /&gt;
env[TMP] = /tmp&lt;br /&gt;
env[TMPDIR] = /tmp&lt;br /&gt;
env[TEMP] = /tmp&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{path|/etc/nginx/nginx.conf}} should be configured to load your site config from this directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
# Includes virtual hosts configs.&lt;br /&gt;
include /etc/nginx/http.d/*;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
{{cmd|rc-service php-fpm7 start&lt;br /&gt;
rc-service nginx start&lt;br /&gt;
rc-service nextcloud start}}&lt;br /&gt;
&lt;br /&gt;
Enable automatic startup of services:&lt;br /&gt;
{{cmd|rc-update add php-fpm7&lt;br /&gt;
rc-update add nginx&lt;br /&gt;
rc-update add nextcloud}}&lt;br /&gt;
&lt;br /&gt;
=== Lighttpd ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add lighttpd php5-cgi}}&lt;br /&gt;
&lt;br /&gt;
Make sure you have FastCGI enabled in {{pkg|lighttpd}}:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
include &amp;quot;mod_fastcgi.conf&amp;quot;&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
Start up the webserver:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
{{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 &#039;&#039;(securing your connections to your nextcloud server)&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
Link {{pkg|nextcloud}} installation to web server directory:&lt;br /&gt;
{{cmd|ln -s /usr/share/webapps/nextcloud /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
== Other settings ==&lt;br /&gt;
=== Hardening ===&lt;br /&gt;
Consider updating the variable &amp;lt;code&amp;gt;url.access-deny&amp;lt;/code&amp;gt; in {{path|/etc/lighttpd/lighttpd.conf}} for additional security. Add &amp;lt;code&amp;gt;&amp;quot;config.php&amp;quot;&amp;lt;/code&amp;gt; to the variable &#039;&#039;(that&#039;s where the database is stored)&#039;&#039; so it looks something like this:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
url.access-deny {{=}} (&amp;quot;~&amp;quot;, &amp;quot;.inc&amp;quot;, &amp;quot;config.php&amp;quot;)&lt;br /&gt;
...}}&lt;br /&gt;
Restart {{pkg|lighttpd}} to activate the changes:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd restart}}&lt;br /&gt;
&lt;br /&gt;
=== Additional packages ===&lt;br /&gt;
Some large apps, such as pdfviewer, texteditor, notifications and videoplayer are in separate packages:&lt;br /&gt;
{{cmd|apk add nextcloud-pdfviewer nextcloud-texteditor nextcloud-notifications nextcloud-videoplayer}}&lt;br /&gt;
&lt;br /&gt;
=== How To Create a Self-Signed SSL Certificate ===&lt;br /&gt;
Install openssl:&lt;br /&gt;
{{cmd|apk add openssl}}&lt;br /&gt;
Generate your self signed certificate and its private key:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
Edit your nginx configuration:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
ssl_certificate      /etc/ssl/certs/nginx-selfsigned.crt;&lt;br /&gt;
ssl_certificate_key  /etc/ssl/private/nginx-selfsigned.key;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Configure and use Nextcloud =&lt;br /&gt;
== Configure ==&lt;br /&gt;
Point your browser at &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://mysite.mydomain.com&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and follow the on-screen instructions to complete the installation, supplying the database user and password created before.&lt;br /&gt;
&lt;br /&gt;
== Hardening PostgreSQL ==&lt;br /&gt;
If you have chosen PGSQL backend, revoke CREATEDB privilege from &#039;mycloud&#039; user:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
ALTER ROLE mycloud NOCREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
&lt;br /&gt;
== Increase upload size ==&lt;br /&gt;
Default configuration for php is limited to 2Mb file size. You might want to increase that size by editing the {{path|/etc/php/php.ini}} and change the following values to something that suits you:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
upload_max_filesize = 2M&lt;br /&gt;
post_max_size = 8M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== enable opcache for nginx/php7 ==&lt;br /&gt;
To increase performace install&lt;br /&gt;
{{cmd|apk add php7-opcache}}&lt;br /&gt;
&lt;br /&gt;
Now uncomment/edit lines in /etc/php7/php.ini:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
opcache.enable=1&lt;br /&gt;
opcache.enable_cli=1&lt;br /&gt;
opcache.interned_strings_buffer=8&lt;br /&gt;
opcache.max_accelerated_files=10000&lt;br /&gt;
opcache.memory_consumption=128&lt;br /&gt;
opcache.save_comments=1&lt;br /&gt;
opcache.revalidate_freq=1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart php-fpm7&lt;br /&gt;
{{cmd|rc-service php-fpm7 restart}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
There are clients available for many platforms, Android included:&lt;br /&gt;
* http://nextcloud.org/sync-clients/ &#039;&#039;(nextcloud Sync clients)&#039;&#039;&lt;br /&gt;
* http://nextcloud.org/support/android/ &#039;&#039;(Android client)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://pkgs.alpinelinux.org/packages?name=nextcloud-client&amp;amp;branch=&amp;amp;repo=&amp;amp;arch=&amp;amp;maintainer= nextcloud-client] is currently available in the testing repo.&lt;br /&gt;
&lt;br /&gt;
= Video Communication =&lt;br /&gt;
One of the major features of Nextcloud 11, available on Alpine 3.6 (currently edge) is a [https://nextcloud.com/webrtc/ WebRTC app], which relies on Spreed WebRTC server, which is available in the Alpine testing repository. Everything is still beta, so be aware of it :-). If you want a private video conferencing server install Nextcloud using Nginx and do the following (you can use Apache as well and follow the &#039;&#039;Apache config&#039;&#039; instructions [https://nextcloud.com/webrtc/ nextcloud.com]):&lt;br /&gt;
&lt;br /&gt;
Put the following config in the &#039;&#039;server&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Spreed WebRTC&lt;br /&gt;
location ^~ /webrtc {&lt;br /&gt;
  proxy_pass http://127.0.0.1:8080;&lt;br /&gt;
  proxy_http_version 1.1;&lt;br /&gt;
  proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
  proxy_set_header Connection $connection_upgrade;&lt;br /&gt;
  proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
  proxy_set_header Host $http_host;&lt;br /&gt;
  proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
&lt;br /&gt;
  proxy_buffering             on;&lt;br /&gt;
  proxy_ignore_client_abort   off;&lt;br /&gt;
  proxy_redirect              off;&lt;br /&gt;
  proxy_connect_timeout       90;&lt;br /&gt;
  proxy_send_timeout          90;&lt;br /&gt;
  proxy_read_timeout          90;&lt;br /&gt;
  proxy_buffer_size           4k;&lt;br /&gt;
  proxy_buffers               4 32k;&lt;br /&gt;
  proxy_busy_buffers_size     64k;&lt;br /&gt;
  proxy_temp_file_write_size  64k;&lt;br /&gt;
  proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the following section in the &#039;&#039;http&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
map $http_upgrade $connection_upgrade {&lt;br /&gt;
  default upgrade;&lt;br /&gt;
  &#039;&#039;      close;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reload Nginx:&lt;br /&gt;
{{cmd|rc-service nginx reload}}&lt;br /&gt;
&lt;br /&gt;
Install Spreed WedRTC server (make sure you have the testing [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Packages_and_Repositories repository] enabled):&lt;br /&gt;
{{cmd|apk add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Using the configuration file in &#039;&#039;/etc/spreed-webrtc/spreed-webrtc-server.conf&#039;&#039; follow the instructions at [https://nextcloud.com/webrtc/ nextcloud.com] to configure Spreed WebRTC server. Then start the server:&lt;br /&gt;
{{cmd|rc-service spreed-web-server start}}&lt;br /&gt;
{{cmd|rc-update add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;Spreed video calls&#039;&#039; app in Nextcloud and enjoy your private video calls.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20161</id>
		<title>Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20161"/>
		<updated>2021-09-30T23:05:05Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: nginx is already in the www-data group&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://nextcloud.com/ Nextcloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. [http://karlitschek.de/2016/06/nextcloud/ Nextcloud is a fork of ownCloud with enterprise features included].&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
{{pkg|nextcloud}} is available from Alpine 3.5 and greater.&lt;br /&gt;
&lt;br /&gt;
Before you start installing anything, make sure you have the latest packages available. Make sure you are using an &#039;http&#039; repository in your {{path|/etc/apk/repositories}} file, then:&lt;br /&gt;
{{cmd|apk update}}&lt;br /&gt;
{{tip|Detailed information is found in [[Include:Upgrading_to_latest_release|this]] doc.}}&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
First you have to decide which database to use. Use one of the databases listed below.&lt;br /&gt;
&lt;br /&gt;
=== Sqlite ===&lt;br /&gt;
All you need to do is to install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== PostgreSQL ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-pgsql postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Next thing is to configure and start the database:&lt;br /&gt;
{{cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and temporarily grant the CREATEDB privilege:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
CREATE USER mycloud WITH PASSWORD &#039;test123&#039;;&lt;br /&gt;
ALTER ROLE mycloud CREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
=== MariaDB ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-mysql mariadb mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure and start {{pkg|mariadb}}:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;mysql_install_db --user=mysql --datadir=/var/lib/mysql&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
/etc/init.d/mariadb start&lt;br /&gt;
/usr/bin/mysql_secure_installation}}&lt;br /&gt;
Follow the wizard to setup passwords, etc.&lt;br /&gt;
{{Note|Remember the usernames/passwords that you set using the wizard. You will need them later.}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and database and set permissions:&lt;br /&gt;
{{cmd|mysql -u root -p&lt;br /&gt;
CREATE DATABASE nextcloud;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost.localdomain&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
FLUSH PRIVILEGES;&lt;br /&gt;
EXIT}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
{{pkg|mariadb-client}} is not needed anymore. Let&#039;s uninstall it:&lt;br /&gt;
{{cmd|apk del mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
== Webserver ==&lt;br /&gt;
Next thing is to choose, install, and configure a webserver. In this example we will install {{pkg|nginx}} or {{pkg|lighttpd}}. &#039;&#039;Nginx&#039;&#039; is preferred over &#039;&#039;Lighttpd&#039;&#039; since the latter will consume a lot of memory when working with large files (see [http://redmine.lighttpd.net/issues/1283 lighty bug #1283]). You are free to install any other webserver of your choice as long as it supports PHP and FastCGI. Generating an SSL certificate for your webserver is outside of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
{{pkg|nextcloud-initscript}} facilitates running the webserver with php-fpm.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
Install the needed packages:&lt;br /&gt;
{{cmd|apk add nginx php7-fpm}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remove/comment&#039;&#039;&#039; any section like this in {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
server {&lt;br /&gt;
        listen ...&lt;br /&gt;
       }&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Include the following directive in {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
http {&lt;br /&gt;
      ...&lt;br /&gt;
      include /etc/nginx/sites-enabled/*;&lt;br /&gt;
      ...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Create directories for your websites:&lt;br /&gt;
{{cmd|mkdir /etc/nginx/sites-available}}&lt;br /&gt;
{{cmd|mkdir /etc/nginx/sites-enabled}}&lt;br /&gt;
&lt;br /&gt;
Create a configuration file for your site in {{path|/etc/nginx/sites-available/mysite.mydomain.com}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:80; #uncomment for IPv6 support&lt;br /&gt;
        listen       80;&lt;br /&gt;
	return 301 https://$host$request_uri;&lt;br /&gt;
	server_name mysite.mydomain.com;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:443 ssl; #uncomment for IPv6 support&lt;br /&gt;
        listen       443 ssl;&lt;br /&gt;
        server_name  mysite.mydomain.com;&lt;br /&gt;
&lt;br /&gt;
	root /usr/share/webapps/nextcloud;&lt;br /&gt;
        index  index.php index.html index.htm;&lt;br /&gt;
	disable_symlinks off;&lt;br /&gt;
&lt;br /&gt;
        ssl_certificate      /etc/ssl/cert.pem;&lt;br /&gt;
        ssl_certificate_key  /etc/ssl/key.pem;&lt;br /&gt;
        ssl_session_timeout  5m;&lt;br /&gt;
&lt;br /&gt;
        #Enable Perfect Forward Secrecy and ciphers without known vulnerabilities&lt;br /&gt;
        #Beware! It breaks compatibility with older OS and browsers (e.g. Windows XP, Android 2.x, etc.)&lt;br /&gt;
	#ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA;&lt;br /&gt;
        #ssl_prefer_server_ciphers  on;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        location / {&lt;br /&gt;
            try_files $uri $uri/ /index.html;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
                if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                        return 404;&lt;br /&gt;
                }&lt;br /&gt;
                #fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;
		#fastcgi_pass unix:/run/php-fpm/socket;&lt;br /&gt;
		fastcgi_pass unix:/run/nextcloud/fastcgi.sock; # From the nextcloud-initscript package&lt;br /&gt;
                fastcgi_index index.php;&lt;br /&gt;
                include fastcgi.conf;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are running from RAM and you&#039;re dealing with large files you might need to move the FastCGI temp file from {{path|/tmp}} to {{path|/var/tmp}} or to a directory that is mounted on hdd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_temp_path /var/tmp/nginx/fastcgi 1 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large file uploads take some time to be processed by php-fpm, so you need to bump the Nginx default read timeout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_read_timeout 300s;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set user and group for php-fpm in {{path|/etc/php7/php-fpm.d/www.conf}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
user = nginx&lt;br /&gt;
group = www-data&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are serving serveral users make sure to tune the *&#039;&#039;children&#039;&#039; settings in {{path|/etc/php7/php-fpm.d/www.conf}}}}&lt;br /&gt;
&lt;br /&gt;
Also enable $PATH by uncommenting the following lines in {{path|/etc/php7/php-fpm.d/www.conf}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
env[HOSTNAME] = $HOSTNAME&lt;br /&gt;
env[PATH] = /usr/local/bin:/usr/bin:/bin&lt;br /&gt;
env[TMP] = /tmp&lt;br /&gt;
env[TMPDIR] = /tmp&lt;br /&gt;
env[TEMP] = /tmp&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable your website:&lt;br /&gt;
{{cmd|ln -s ../sites-available/mysite.mydomain.com /etc/nginx/sites-enabled/mysite.mydomain.com}}&lt;br /&gt;
&lt;br /&gt;
The default configuration of nginx shows a 404 page. Therefore, we have to edit {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
# Includes virtual hosts configs.&lt;br /&gt;
# include /etc/nginx/conf.d/*.conf;&lt;br /&gt;
include /etc/nginx/sites-enabled/*;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
{{cmd|rc-service php-fpm7 start&lt;br /&gt;
rc-service nginx start&lt;br /&gt;
rc-service nextcloud start}}&lt;br /&gt;
&lt;br /&gt;
Enable automatic startup of services:&lt;br /&gt;
{{cmd|rc-update add php-fpm7&lt;br /&gt;
rc-update add nginx&lt;br /&gt;
rc-update add nextcloud}}&lt;br /&gt;
&lt;br /&gt;
=== Lighttpd ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add lighttpd php5-cgi}}&lt;br /&gt;
&lt;br /&gt;
Make sure you have FastCGI enabled in {{pkg|lighttpd}}:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
include &amp;quot;mod_fastcgi.conf&amp;quot;&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
Start up the webserver:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
{{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 &#039;&#039;(securing your connections to your nextcloud server)&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
Link {{pkg|nextcloud}} installation to web server directory:&lt;br /&gt;
{{cmd|ln -s /usr/share/webapps/nextcloud /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
== Other settings ==&lt;br /&gt;
=== Hardening ===&lt;br /&gt;
Consider updating the variable &amp;lt;code&amp;gt;url.access-deny&amp;lt;/code&amp;gt; in {{path|/etc/lighttpd/lighttpd.conf}} for additional security. Add &amp;lt;code&amp;gt;&amp;quot;config.php&amp;quot;&amp;lt;/code&amp;gt; to the variable &#039;&#039;(that&#039;s where the database is stored)&#039;&#039; so it looks something like this:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
url.access-deny {{=}} (&amp;quot;~&amp;quot;, &amp;quot;.inc&amp;quot;, &amp;quot;config.php&amp;quot;)&lt;br /&gt;
...}}&lt;br /&gt;
Restart {{pkg|lighttpd}} to activate the changes:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd restart}}&lt;br /&gt;
&lt;br /&gt;
=== Additional packages ===&lt;br /&gt;
Some large apps, such as pdfviewer, texteditor, notifications and videoplayer are in separate packages:&lt;br /&gt;
{{cmd|apk add nextcloud-pdfviewer nextcloud-texteditor nextcloud-notifications nextcloud-videoplayer}}&lt;br /&gt;
&lt;br /&gt;
=== How To Create a Self-Signed SSL Certificate ===&lt;br /&gt;
Install openssl:&lt;br /&gt;
{{cmd|apk add openssl}}&lt;br /&gt;
Generate your self signed certificate and its private key:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
Edit your nginx configuration:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
ssl_certificate      /etc/ssl/certs/nginx-selfsigned.crt;&lt;br /&gt;
ssl_certificate_key  /etc/ssl/private/nginx-selfsigned.key;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Configure and use Nextcloud =&lt;br /&gt;
== Configure ==&lt;br /&gt;
Point your browser at &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://mysite.mydomain.com&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and follow the on-screen instructions to complete the installation, supplying the database user and password created before.&lt;br /&gt;
&lt;br /&gt;
== Hardening PostgreSQL ==&lt;br /&gt;
If you have chosen PGSQL backend, revoke CREATEDB privilege from &#039;mycloud&#039; user:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
ALTER ROLE mycloud NOCREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
&lt;br /&gt;
== Increase upload size ==&lt;br /&gt;
Default configuration for php is limited to 2Mb file size. You might want to increase that size by editing the {{path|/etc/php/php.ini}} and change the following values to something that suits you:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
upload_max_filesize = 2M&lt;br /&gt;
post_max_size = 8M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== enable opcache for nginx/php7 ==&lt;br /&gt;
To increase performace install&lt;br /&gt;
{{cmd|apk add php7-opcache}}&lt;br /&gt;
&lt;br /&gt;
Now uncomment/edit lines in /etc/php7/php.ini:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
opcache.enable=1&lt;br /&gt;
opcache.enable_cli=1&lt;br /&gt;
opcache.interned_strings_buffer=8&lt;br /&gt;
opcache.max_accelerated_files=10000&lt;br /&gt;
opcache.memory_consumption=128&lt;br /&gt;
opcache.save_comments=1&lt;br /&gt;
opcache.revalidate_freq=1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart php-fpm7&lt;br /&gt;
{{cmd|rc-service php-fpm7 restart}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
There are clients available for many platforms, Android included:&lt;br /&gt;
* http://nextcloud.org/sync-clients/ &#039;&#039;(nextcloud Sync clients)&#039;&#039;&lt;br /&gt;
* http://nextcloud.org/support/android/ &#039;&#039;(Android client)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://pkgs.alpinelinux.org/packages?name=nextcloud-client&amp;amp;branch=&amp;amp;repo=&amp;amp;arch=&amp;amp;maintainer= nextcloud-client] is currently available in the testing repo.&lt;br /&gt;
&lt;br /&gt;
= Video Communication =&lt;br /&gt;
One of the major features of Nextcloud 11, available on Alpine 3.6 (currently edge) is a [https://nextcloud.com/webrtc/ WebRTC app], which relies on Spreed WebRTC server, which is available in the Alpine testing repository. Everything is still beta, so be aware of it :-). If you want a private video conferencing server install Nextcloud using Nginx and do the following (you can use Apache as well and follow the &#039;&#039;Apache config&#039;&#039; instructions [https://nextcloud.com/webrtc/ nextcloud.com]):&lt;br /&gt;
&lt;br /&gt;
Put the following config in the &#039;&#039;server&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Spreed WebRTC&lt;br /&gt;
location ^~ /webrtc {&lt;br /&gt;
  proxy_pass http://127.0.0.1:8080;&lt;br /&gt;
  proxy_http_version 1.1;&lt;br /&gt;
  proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
  proxy_set_header Connection $connection_upgrade;&lt;br /&gt;
  proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
  proxy_set_header Host $http_host;&lt;br /&gt;
  proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
&lt;br /&gt;
  proxy_buffering             on;&lt;br /&gt;
  proxy_ignore_client_abort   off;&lt;br /&gt;
  proxy_redirect              off;&lt;br /&gt;
  proxy_connect_timeout       90;&lt;br /&gt;
  proxy_send_timeout          90;&lt;br /&gt;
  proxy_read_timeout          90;&lt;br /&gt;
  proxy_buffer_size           4k;&lt;br /&gt;
  proxy_buffers               4 32k;&lt;br /&gt;
  proxy_busy_buffers_size     64k;&lt;br /&gt;
  proxy_temp_file_write_size  64k;&lt;br /&gt;
  proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the following section in the &#039;&#039;http&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
map $http_upgrade $connection_upgrade {&lt;br /&gt;
  default upgrade;&lt;br /&gt;
  &#039;&#039;      close;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reload Nginx:&lt;br /&gt;
{{cmd|rc-service nginx reload}}&lt;br /&gt;
&lt;br /&gt;
Install Spreed WedRTC server (make sure you have the testing [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Packages_and_Repositories repository] enabled):&lt;br /&gt;
{{cmd|apk add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Using the configuration file in &#039;&#039;/etc/spreed-webrtc/spreed-webrtc-server.conf&#039;&#039; follow the instructions at [https://nextcloud.com/webrtc/ nextcloud.com] to configure Spreed WebRTC server. Then start the server:&lt;br /&gt;
{{cmd|rc-service spreed-web-server start}}&lt;br /&gt;
{{cmd|rc-update add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;Spreed video calls&#039;&#039; app in Nextcloud and enjoy your private video calls.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20160</id>
		<title>Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Nextcloud&amp;diff=20160"/>
		<updated>2021-09-30T23:02:55Z</updated>

		<summary type="html">&lt;p&gt;Earboxer: Add relevant info for nextcloud-initscript&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://nextcloud.com/ Nextcloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. [http://karlitschek.de/2016/06/nextcloud/ Nextcloud is a fork of ownCloud with enterprise features included].&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
{{pkg|nextcloud}} is available from Alpine 3.5 and greater.&lt;br /&gt;
&lt;br /&gt;
Before you start installing anything, make sure you have the latest packages available. Make sure you are using an &#039;http&#039; repository in your {{path|/etc/apk/repositories}} file, then:&lt;br /&gt;
{{cmd|apk update}}&lt;br /&gt;
{{tip|Detailed information is found in [[Include:Upgrading_to_latest_release|this]] doc.}}&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
First you have to decide which database to use. Use one of the databases listed below.&lt;br /&gt;
&lt;br /&gt;
=== Sqlite ===&lt;br /&gt;
All you need to do is to install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== PostgreSQL ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-pgsql postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Next thing is to configure and start the database:&lt;br /&gt;
{{cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and temporarily grant the CREATEDB privilege:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
CREATE USER mycloud WITH PASSWORD &#039;test123&#039;;&lt;br /&gt;
ALTER ROLE mycloud CREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
=== MariaDB ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add nextcloud-mysql mariadb mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure and start {{pkg|mariadb}}:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;mysql_install_db --user=mysql --datadir=/var/lib/mysql&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
/etc/init.d/mariadb start&lt;br /&gt;
/usr/bin/mysql_secure_installation}}&lt;br /&gt;
Follow the wizard to setup passwords, etc.&lt;br /&gt;
{{Note|Remember the usernames/passwords that you set using the wizard. You will need them later.}}&lt;br /&gt;
&lt;br /&gt;
Next, you need to create a user and database and set permissions:&lt;br /&gt;
{{cmd|mysql -u root -p&lt;br /&gt;
CREATE DATABASE nextcloud;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
GRANT ALL ON nextcloud.* TO &#039;mycloud&#039;@&#039;localhost.localdomain&#039; IDENTIFIED BY &#039;test123&#039;;&lt;br /&gt;
FLUSH PRIVILEGES;&lt;br /&gt;
EXIT}}&lt;br /&gt;
{{Note|Replace the above username &#039;mycloud&#039; and password &#039;test123&#039; with something secure. Remember these settings. You will need them later when setting up nextcloud.}}&lt;br /&gt;
&lt;br /&gt;
{{pkg|mariadb-client}} is not needed anymore. Let&#039;s uninstall it:&lt;br /&gt;
{{cmd|apk del mariadb-client}}&lt;br /&gt;
&lt;br /&gt;
== Webserver ==&lt;br /&gt;
Next thing is to choose, install, and configure a webserver. In this example we will install {{pkg|nginx}} or {{pkg|lighttpd}}. &#039;&#039;Nginx&#039;&#039; is preferred over &#039;&#039;Lighttpd&#039;&#039; since the latter will consume a lot of memory when working with large files (see [http://redmine.lighttpd.net/issues/1283 lighty bug #1283]). You are free to install any other webserver of your choice as long as it supports PHP and FastCGI. Generating an SSL certificate for your webserver is outside of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
{{pkg|nextcloud-initscript}} facilitates running the webserver with php-fpm.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add nextcloud-sqlite}}&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
Install the needed packages:&lt;br /&gt;
{{cmd|apk add nginx php7-fpm}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remove/comment&#039;&#039;&#039; any section like this in {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
server {&lt;br /&gt;
        listen ...&lt;br /&gt;
       }&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Include the following directive in {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
http {&lt;br /&gt;
      ...&lt;br /&gt;
      include /etc/nginx/sites-enabled/*;&lt;br /&gt;
      ...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Create directories for your websites:&lt;br /&gt;
{{cmd|mkdir /etc/nginx/sites-available}}&lt;br /&gt;
{{cmd|mkdir /etc/nginx/sites-enabled}}&lt;br /&gt;
&lt;br /&gt;
Create a configuration file for your site in {{path|/etc/nginx/sites-available/mysite.mydomain.com}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:80; #uncomment for IPv6 support&lt;br /&gt;
        listen       80;&lt;br /&gt;
	return 301 https://$host$request_uri;&lt;br /&gt;
	server_name mysite.mydomain.com;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
        #listen       [::]:443 ssl; #uncomment for IPv6 support&lt;br /&gt;
        listen       443 ssl;&lt;br /&gt;
        server_name  mysite.mydomain.com;&lt;br /&gt;
&lt;br /&gt;
	root /usr/share/webapps/nextcloud;&lt;br /&gt;
        index  index.php index.html index.htm;&lt;br /&gt;
	disable_symlinks off;&lt;br /&gt;
&lt;br /&gt;
        ssl_certificate      /etc/ssl/cert.pem;&lt;br /&gt;
        ssl_certificate_key  /etc/ssl/key.pem;&lt;br /&gt;
        ssl_session_timeout  5m;&lt;br /&gt;
&lt;br /&gt;
        #Enable Perfect Forward Secrecy and ciphers without known vulnerabilities&lt;br /&gt;
        #Beware! It breaks compatibility with older OS and browsers (e.g. Windows XP, Android 2.x, etc.)&lt;br /&gt;
	#ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA;&lt;br /&gt;
        #ssl_prefer_server_ciphers  on;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        location / {&lt;br /&gt;
            try_files $uri $uri/ /index.html;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
                if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                        return 404;&lt;br /&gt;
                }&lt;br /&gt;
                #fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;
		#fastcgi_pass unix:/run/php-fpm/socket;&lt;br /&gt;
		fastcgi_pass unix:/run/nextcloud/fastcgi.sock; # From the nextcloud-initscript package&lt;br /&gt;
                fastcgi_index index.php;&lt;br /&gt;
                include fastcgi.conf;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are running from RAM and you&#039;re dealing with large files you might need to move the FastCGI temp file from {{path|/tmp}} to {{path|/var/tmp}} or to a directory that is mounted on hdd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_temp_path /var/tmp/nginx/fastcgi 1 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large file uploads take some time to be processed by php-fpm, so you need to bump the Nginx default read timeout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fastcgi_read_timeout 300s;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set user and group for php-fpm in {{path|/etc/php7/php-fpm.d/www.conf}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
user = nginx&lt;br /&gt;
group = www-data&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are serving serveral users make sure to tune the *&#039;&#039;children&#039;&#039; settings in {{path|/etc/php7/php-fpm.d/www.conf}}}}&lt;br /&gt;
&lt;br /&gt;
Also enable $PATH by uncommenting the following lines in {{path|/etc/php7/php-fpm.d/www.conf}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
env[HOSTNAME] = $HOSTNAME&lt;br /&gt;
env[PATH] = /usr/local/bin:/usr/bin:/bin&lt;br /&gt;
env[TMP] = /tmp&lt;br /&gt;
env[TMPDIR] = /tmp&lt;br /&gt;
env[TEMP] = /tmp&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make nginx user a member of the www-data group:&lt;br /&gt;
{{cmd|addgroup nginx www-data}}&lt;br /&gt;
&lt;br /&gt;
Enable your website:&lt;br /&gt;
{{cmd|ln -s ../sites-available/mysite.mydomain.com /etc/nginx/sites-enabled/mysite.mydomain.com}}&lt;br /&gt;
&lt;br /&gt;
The default configuration of nginx shows a 404 page. Therefore, we have to edit {{path|/etc/nginx/nginx.conf}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
# Includes virtual hosts configs.&lt;br /&gt;
# include /etc/nginx/conf.d/*.conf;&lt;br /&gt;
include /etc/nginx/sites-enabled/*;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
{{cmd|rc-service php-fpm7 start&lt;br /&gt;
rc-service nginx start&lt;br /&gt;
rc-service nextcloud start}}&lt;br /&gt;
&lt;br /&gt;
Enable automatic startup of services:&lt;br /&gt;
{{cmd|rc-update add php-fpm7&lt;br /&gt;
rc-update add nginx&lt;br /&gt;
rc-update add nextcloud}}&lt;br /&gt;
&lt;br /&gt;
=== Lighttpd ===&lt;br /&gt;
Install the package:&lt;br /&gt;
{{cmd|apk add lighttpd php5-cgi}}&lt;br /&gt;
&lt;br /&gt;
Make sure you have FastCGI enabled in {{pkg|lighttpd}}:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
include &amp;quot;mod_fastcgi.conf&amp;quot;&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
Start up the webserver:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
{{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 &#039;&#039;(securing your connections to your nextcloud server)&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
Link {{pkg|nextcloud}} installation to web server directory:&lt;br /&gt;
{{cmd|ln -s /usr/share/webapps/nextcloud /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
== Other settings ==&lt;br /&gt;
=== Hardening ===&lt;br /&gt;
Consider updating the variable &amp;lt;code&amp;gt;url.access-deny&amp;lt;/code&amp;gt; in {{path|/etc/lighttpd/lighttpd.conf}} for additional security. Add &amp;lt;code&amp;gt;&amp;quot;config.php&amp;quot;&amp;lt;/code&amp;gt; to the variable &#039;&#039;(that&#039;s where the database is stored)&#039;&#039; so it looks something like this:&lt;br /&gt;
{{cat|/etc/lighttpd/lighttpd.conf|...&lt;br /&gt;
url.access-deny {{=}} (&amp;quot;~&amp;quot;, &amp;quot;.inc&amp;quot;, &amp;quot;config.php&amp;quot;)&lt;br /&gt;
...}}&lt;br /&gt;
Restart {{pkg|lighttpd}} to activate the changes:&lt;br /&gt;
{{cmd|/etc/init.d/lighttpd restart}}&lt;br /&gt;
&lt;br /&gt;
=== Additional packages ===&lt;br /&gt;
Some large apps, such as pdfviewer, texteditor, notifications and videoplayer are in separate packages:&lt;br /&gt;
{{cmd|apk add nextcloud-pdfviewer nextcloud-texteditor nextcloud-notifications nextcloud-videoplayer}}&lt;br /&gt;
&lt;br /&gt;
=== How To Create a Self-Signed SSL Certificate ===&lt;br /&gt;
Install openssl:&lt;br /&gt;
{{cmd|apk add openssl}}&lt;br /&gt;
Generate your self signed certificate and its private key:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
Edit your nginx configuration:&lt;br /&gt;
{{cat|/etc/nginx/nginx.conf|&lt;br /&gt;
ssl_certificate      /etc/ssl/certs/nginx-selfsigned.crt;&lt;br /&gt;
ssl_certificate_key  /etc/ssl/private/nginx-selfsigned.key;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Configure and use Nextcloud =&lt;br /&gt;
== Configure ==&lt;br /&gt;
Point your browser at &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://mysite.mydomain.com&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and follow the on-screen instructions to complete the installation, supplying the database user and password created before.&lt;br /&gt;
&lt;br /&gt;
== Hardening PostgreSQL ==&lt;br /&gt;
If you have chosen PGSQL backend, revoke CREATEDB privilege from &#039;mycloud&#039; user:&lt;br /&gt;
{{cmd|psql -U postgres&lt;br /&gt;
ALTER ROLE mycloud NOCREATEDB;&lt;br /&gt;
\q}}&lt;br /&gt;
&lt;br /&gt;
== Increase upload size ==&lt;br /&gt;
Default configuration for php is limited to 2Mb file size. You might want to increase that size by editing the {{path|/etc/php/php.ini}} and change the following values to something that suits you:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
upload_max_filesize = 2M&lt;br /&gt;
post_max_size = 8M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== enable opcache for nginx/php7 ==&lt;br /&gt;
To increase performace install&lt;br /&gt;
{{cmd|apk add php7-opcache}}&lt;br /&gt;
&lt;br /&gt;
Now uncomment/edit lines in /etc/php7/php.ini:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
opcache.enable=1&lt;br /&gt;
opcache.enable_cli=1&lt;br /&gt;
opcache.interned_strings_buffer=8&lt;br /&gt;
opcache.max_accelerated_files=10000&lt;br /&gt;
opcache.memory_consumption=128&lt;br /&gt;
opcache.save_comments=1&lt;br /&gt;
opcache.revalidate_freq=1&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart php-fpm7&lt;br /&gt;
{{cmd|rc-service php-fpm7 restart}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
There are clients available for many platforms, Android included:&lt;br /&gt;
* http://nextcloud.org/sync-clients/ &#039;&#039;(nextcloud Sync clients)&#039;&#039;&lt;br /&gt;
* http://nextcloud.org/support/android/ &#039;&#039;(Android client)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://pkgs.alpinelinux.org/packages?name=nextcloud-client&amp;amp;branch=&amp;amp;repo=&amp;amp;arch=&amp;amp;maintainer= nextcloud-client] is currently available in the testing repo.&lt;br /&gt;
&lt;br /&gt;
= Video Communication =&lt;br /&gt;
One of the major features of Nextcloud 11, available on Alpine 3.6 (currently edge) is a [https://nextcloud.com/webrtc/ WebRTC app], which relies on Spreed WebRTC server, which is available in the Alpine testing repository. Everything is still beta, so be aware of it :-). If you want a private video conferencing server install Nextcloud using Nginx and do the following (you can use Apache as well and follow the &#039;&#039;Apache config&#039;&#039; instructions [https://nextcloud.com/webrtc/ nextcloud.com]):&lt;br /&gt;
&lt;br /&gt;
Put the following config in the &#039;&#039;server&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Spreed WebRTC&lt;br /&gt;
location ^~ /webrtc {&lt;br /&gt;
  proxy_pass http://127.0.0.1:8080;&lt;br /&gt;
  proxy_http_version 1.1;&lt;br /&gt;
  proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
  proxy_set_header Connection $connection_upgrade;&lt;br /&gt;
  proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
  proxy_set_header Host $http_host;&lt;br /&gt;
  proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
&lt;br /&gt;
  proxy_buffering             on;&lt;br /&gt;
  proxy_ignore_client_abort   off;&lt;br /&gt;
  proxy_redirect              off;&lt;br /&gt;
  proxy_connect_timeout       90;&lt;br /&gt;
  proxy_send_timeout          90;&lt;br /&gt;
  proxy_read_timeout          90;&lt;br /&gt;
  proxy_buffer_size           4k;&lt;br /&gt;
  proxy_buffers               4 32k;&lt;br /&gt;
  proxy_busy_buffers_size     64k;&lt;br /&gt;
  proxy_temp_file_write_size  64k;&lt;br /&gt;
  proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the following section in the &#039;&#039;http&#039;&#039; section of Nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
map $http_upgrade $connection_upgrade {&lt;br /&gt;
  default upgrade;&lt;br /&gt;
  &#039;&#039;      close;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reload Nginx:&lt;br /&gt;
{{cmd|rc-service nginx reload}}&lt;br /&gt;
&lt;br /&gt;
Install Spreed WedRTC server (make sure you have the testing [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Packages_and_Repositories repository] enabled):&lt;br /&gt;
{{cmd|apk add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Using the configuration file in &#039;&#039;/etc/spreed-webrtc/spreed-webrtc-server.conf&#039;&#039; follow the instructions at [https://nextcloud.com/webrtc/ nextcloud.com] to configure Spreed WebRTC server. Then start the server:&lt;br /&gt;
{{cmd|rc-service spreed-web-server start}}&lt;br /&gt;
{{cmd|rc-update add spreed-web-server}}&lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;Spreed video calls&#039;&#039; app in Nextcloud and enjoy your private video calls.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>Earboxer</name></author>
	</entry>
</feed>