<?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=John3-16</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=John3-16"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/John3-16"/>
	<updated>2026-05-03T15:42:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Infinitime&amp;diff=32364</id>
		<title>Infinitime</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Infinitime&amp;diff=32364"/>
		<updated>2026-05-02T04:12:05Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Added Categories:  Embedded Systems, Hardware&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://infinitime.io/ InfiniTime] is an open source firmware for the Pinetime smartwatch written in C++ and based on [https://www.freertos.org/ FreeRTOS].&lt;br /&gt;
&lt;br /&gt;
All dependencies for compiling the firmware are packaged in the Alpine repositories, and can be installed via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apk add -t .infinitime-dev \&lt;br /&gt;
	cmake \&lt;br /&gt;
	gcc-arm-none-eabi \&lt;br /&gt;
	lv_font_conv \&lt;br /&gt;
	nrf5-sdk \&lt;br /&gt;
	py3-cbor2 \&lt;br /&gt;
	py3-cryptography \&lt;br /&gt;
	py3-intelhex&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Embedded Systems]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Infinitime&amp;diff=32362</id>
		<title>Talk:Infinitime</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Infinitime&amp;diff=32362"/>
		<updated>2026-05-02T04:10:14Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Amending page title from Infinitime to InfiniTime&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Amending page title to InfiniTime ==&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;nowiki&amp;gt;{{DISPLAYTITLE:InfiniTime}}&amp;lt;/nowiki&amp;gt; was attempted, but that does not currently amend the page title from Infinitime to InfiniTime.  Moving page is an option.&lt;br /&gt;
[[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 04:10, 2 May 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ZFS&amp;diff=32341</id>
		<title>ZFS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ZFS&amp;diff=32341"/>
		<updated>2026-04-23T01:36:49Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://openzfs.org/wiki/Main_Page ZFS] or OpenZFS is an open-source storage platform. It includes the functionality of both traditional file systems and volume manager. &lt;br /&gt;
&lt;br /&gt;
This page has instructions for creating and automounting an encrypted ZFS drive or partition on an existing encrypted Alpine Linux system using ZFS&#039;s own encryption capabilities. To do a fresh install of Alpine Linux with root partition on ZFS, see [[Root on ZFS with native encryption]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the necessary packages and utilities by using the command:{{Cmd|# apk add zfs}}&lt;br /&gt;
Ensure that the kernel modules are loaded and verify that the device nodes are present:{{Cmd|&amp;lt;nowiki&amp;gt;# modprobe zfs         &lt;br /&gt;
# mdev -s &amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
If your use of ZFS depends on volumes appearing in {{Path|/dev/zvol/$ZPOOL/$ZVOL}}, you will also need to [[Eudev|setup eudev]] and:{{Cmd|# apk add zfs-udev}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
The system will be encrypted when powered off but will not require you to type an extra password at boot, since it uses a key stored on the encrypted root partition. Alternative options are also given, such as prompting for a password at boot rather than storing the key on the root drive. The example in this guide is modeled around creating a ZFS filesystem to be used as a user&#039;s home directory, but it can be trivially modified to create a filesystem for other purposes.&lt;br /&gt;
&lt;br /&gt;
=== Create an encryption key ===&lt;br /&gt;
&lt;br /&gt;
This section can be skipped if you intend to unlock the drive by typing a password rather than unlocking automatically. You should use a password instead if your root partition is not encrypted. The location of the file {{Path|/etc/home.key}} can be anywhere. {{Cmd|&amp;lt;nowiki&amp;gt;# dd if=/dev/random of=/etc/home.key bs=32 count=1&lt;br /&gt;
# chmod 600 /etc/home.key&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: Make sure you don&#039;t lose this key by overwriting your root filesystem or similar. You might want to store a copy of it on an encrypted USB drive, for instance.&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;/dev/sd...&amp;lt;/code&amp;gt; with the name of the disk or partition where you would like to make the zfs filesystem, such as &amp;lt;code&amp;gt;/dev/nvme0n1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dev/sda1&amp;lt;/code&amp;gt;. If you would like to be prompted for a password at boot rather than using the key as generated above, then replace &amp;lt;code&amp;gt;-O keylocation=file:///etc/home.key -O keyformat=raw&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;-O keylocation=prompt -O keyformat=passphrase&amp;lt;/code&amp;gt;. The name &amp;lt;var&amp;gt;&amp;quot;homepool&amp;quot;&amp;lt;/var&amp;gt; can be anything.{{Cmd|&amp;lt;nowiki&amp;gt;# zpool create -o ashift=12 -O acltype=posixacl -O compression=lz4 \&lt;br /&gt;
 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa \&lt;br /&gt;
 -O encryption=aes-256-gcm -O keylocation=file:///etc/home.key -O keyformat=raw \&lt;br /&gt;
 -O mountpoint=none homepool /dev/sd...&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
After completing this, verifying that the pool has been created should return something similar to the following: {{Cmd|&amp;lt;nowiki&amp;gt;# zpool status&lt;br /&gt;
      pool: homepool&lt;br /&gt;
     state: ONLINE&lt;br /&gt;
    config:&lt;br /&gt;
 &lt;br /&gt;
            NAME        STATE     READ WRITE CKSUM&lt;br /&gt;
            homepool    ONLINE       0     0     0&lt;br /&gt;
              sd...     ONLINE       0     0     0&lt;br /&gt;
    &lt;br /&gt;
    errors: No known data errors&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To create and mount the filesystem, issue the command {{Cmd|&amp;lt;nowiki&amp;gt;# zfs create -o mountpoint=/home/username homepool/username &lt;br /&gt;
# chown username:username /home/username &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The last command i.e &#039;&#039;chown&#039;&#039; is likely unnecessary if not creating a homedir.&lt;br /&gt;
&lt;br /&gt;
=== Service configuration ===&lt;br /&gt;
&lt;br /&gt;
Setup the following services to automount the new filesystem using [[OpenRC]].&lt;br /&gt;
To import existing zpools:{{Cmd|# rc-update add zfs-import}}    &lt;br /&gt;
To load the encryption keys:{{Cmd|# rc-update add zfs-load-key}}&lt;br /&gt;
Finally, to mount the filesystems:{{Cmd|# rc-update add zfs-mount}}    &lt;br /&gt;
&lt;br /&gt;
Reboot the system so that the encrypted ZFS drive is automounted and becomes available for use.&lt;br /&gt;
&lt;br /&gt;
== Maintenance ==&lt;br /&gt;
&lt;br /&gt;
On Alpine Linux, there is no cron/script provided to scrub (and eventually trim) your pool(s) on a regular basis, like in other Linux distributions.&lt;br /&gt;
&lt;br /&gt;
=== Scrub ===&lt;br /&gt;
&lt;br /&gt;
Scrubbing (and eventually trim) your pool(s) on a regular basis is essential, as discussed in [https://blogs.oracle.com/oracle-systems/post/disk-scrub-why-and-when an official Oracle blog post] on Exadata disk scrubbing. The scrub examines all data in the specified pools to verify that it checksums correctly. For replicated (mirror, raidz, or draid) devices, ZFS automatically repairs any damage discovered during the scrub.&lt;br /&gt;
&lt;br /&gt;
When scrubbing a pool with encrypted filesystems, the keys do not need to be loaded. However, if the keys are not loaded and an unrepairable checksum error is detected the file name cannot be included in the zpool status -v verbose error report.&lt;br /&gt;
&lt;br /&gt;
A scrub is split into two parts: metadata scanning and block scrubbing. The metadata scanning sorts blocks into large sequential ranges which can then be read much more efficiently from disk when issuing the scrub I/O.&lt;br /&gt;
&lt;br /&gt;
This script is taken from Debian ZFS scripts. It is used to list the pools, making sure that they are online and that no scrub is being done at the time. The contents of the script placed at {{path|/usr/libexec/zfs/scrub}} are as follows:{{cat|/usr/libexec/zfs/scrub|&amp;lt;nowiki&amp;gt;#!/bin/sh -eu&lt;br /&gt;
&lt;br /&gt;
# directly exit successfully when zfs module is not loaded&lt;br /&gt;
if ! [ -d /sys/module/zfs ]; then&lt;br /&gt;
        exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# [auto] / enable / disable&lt;br /&gt;
PROPERTY_NAME=&amp;quot;org.alpine:periodic-scrub&amp;quot;&lt;br /&gt;
&lt;br /&gt;
get_property () {&lt;br /&gt;
        # Detect the ${PROPERTY_NAME} property on a given pool.&lt;br /&gt;
        # We are abusing user-defined properties on the root dataset,&lt;br /&gt;
        # since they&#039;re not available on pools https://github.com/openzfs/zfs/pull/11680&lt;br /&gt;
        # TODO: use zpool user-defined property when such feature is available.&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        zfs get -H -o value &amp;quot;${PROPERTY_NAME}&amp;quot; &amp;quot;${pool}&amp;quot; 2&amp;gt;/dev/null || return 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
scrub_if_not_scrub_in_progress () {&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        if ! zpool status &amp;quot;${pool}&amp;quot; | grep -q &amp;quot;scrub in progress&amp;quot;; then&lt;br /&gt;
                # Ignore errors and continue with scrubbing other pools.&lt;br /&gt;
                zpool scrub &amp;quot;${pool}&amp;quot; || true&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Scrub all healthy pools that are not already scrubbing as per their configs.&lt;br /&gt;
zpool list -H -o health,name 2&amp;gt;&amp;amp;1 | \&lt;br /&gt;
        awk -F&#039;\t&#039; &#039;$1 == &amp;quot;ONLINE&amp;quot; {print $2}&#039; | \&lt;br /&gt;
while read pool&lt;br /&gt;
do&lt;br /&gt;
        # read user-defined config&lt;br /&gt;
        ret=$(get_property &amp;quot;${pool}&amp;quot;)&lt;br /&gt;
        if [ $? -ne 0 ] || [ &amp;quot;disable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                :&lt;br /&gt;
        elif [ &amp;quot;-&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;auto&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;enable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                scrub_if_not_scrub_in_progress &amp;quot;${pool}&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
                cat &amp;gt; /dev/stderr &amp;lt;&amp;lt;EOF&lt;br /&gt;
$0: [WARNING] illegal value &amp;quot;${ret}&amp;quot; for property &amp;quot;${PROPERTY_NAME}&amp;quot; of ZFS dataset &amp;quot;${pool}&amp;quot;.&lt;br /&gt;
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.&lt;br /&gt;
EOF&lt;br /&gt;
        fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Make the script executable: {{cmd|# chmod +x /usr/libexec/zfs/scrub}}&lt;br /&gt;
&lt;br /&gt;
It is recommended to scrub regularly to ensure that your pool(s) and data are in good shape. In our example, the scrub script will be launched once a month, on the 2nd Sunday of the month using [[cron]].&lt;br /&gt;
&lt;br /&gt;
Edit your crontabs using the command: {{cmd|# crontab -e}}&lt;br /&gt;
&lt;br /&gt;
and add these 2 lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ZFS scrub the 2nd Sunday of every month&lt;br /&gt;
24      0       8-14    *       *       if [ $(date +\%w) -eq 0 ] &amp;amp;&amp;amp; [ -x /usr/libexec/zfs/scrub ]; then /usr/libexec/zfs/scrub; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Trim ===&lt;br /&gt;
&lt;br /&gt;
The command {{ic|zpool trim}} initiates an immediate on-demand TRIM operation for all of the free space in a pool. This operation informs the underlying storage devices of all blocks in the pool which are no longer allocated and allows thinly provisioned devices to reclaim the space.&lt;br /&gt;
&lt;br /&gt;
A manual on-demand TRIM operation can be initiated irrespective of the [https://openzfs.github.io/openzfs-docs/man/v2.2/7/zpoolprops.7.html#autotrim autotrim] pool property setting. The link shows the types of VDEV devices that can be trimmed.&lt;br /&gt;
&lt;br /&gt;
This script is taken from Debian ZFS scripts. It is used to list the pools, making sure that they are online, built only with NVMe SSD drive(s) and that no trim is being done at the time. The contents of the script placed at {{path|/usr/libexec/zfs/trim}} are as follows:{{cat|/usr/libexec/zfs/trim|&amp;lt;nowiki&amp;gt;#!/bin/sh -eu&lt;br /&gt;
&lt;br /&gt;
# directly exit successfully when zfs module is not loaded&lt;br /&gt;
if ! [ -d /sys/module/zfs ]; then&lt;br /&gt;
        exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# [auto] / enable / disable&lt;br /&gt;
PROPERTY_NAME=&amp;quot;org.alpine:periodic-trim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
get_property () {&lt;br /&gt;
        # Detect the ${PROPERTY_NAME} property on a given pool.&lt;br /&gt;
        # We are abusing user-defined properties on the root dataset,&lt;br /&gt;
        # since they&#039;re not available on pools https://github.com/openzfs/zfs/pull/11680&lt;br /&gt;
        # TODO: use zpool user-defined property when such feature is available.&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        zfs get -H -o value &amp;quot;${PROPERTY_NAME}&amp;quot; &amp;quot;${pool}&amp;quot; 2&amp;gt;/dev/null || return 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
trim_if_not_already_trimming () {&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        if ! zpool status &amp;quot;${pool}&amp;quot; | grep -q &amp;quot;trimming&amp;quot;; then&lt;br /&gt;
                # Ignore errors (i.e. HDD pools),&lt;br /&gt;
                # and continue with trimming other pools.&lt;br /&gt;
                zpool trim &amp;quot;${pool}&amp;quot; || true&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
zpool_is_nvme_only () {&lt;br /&gt;
        zpool=$1&lt;br /&gt;
        # get a list of devices attached to the specified zpool&lt;br /&gt;
        zpool list -vHPL &amp;quot;${zpool}&amp;quot; |&lt;br /&gt;
                awk -F&#039;\t&#039; &#039;$2 ~ /^\/dev\// {&lt;br /&gt;
                        if($2 !~ /^\/dev\/nvme/)&lt;br /&gt;
                                exit 1&lt;br /&gt;
                }&#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# TRIM all healthy pools that are not already trimming as per their configs.&lt;br /&gt;
zpool list -H -o health,name 2&amp;gt;&amp;amp;1 | \&lt;br /&gt;
        awk -F&#039;\t&#039; &#039;$1 == &amp;quot;ONLINE&amp;quot; {print $2}&#039; | \&lt;br /&gt;
while read pool&lt;br /&gt;
do&lt;br /&gt;
        # read user-defined config&lt;br /&gt;
        ret=$(get_property &amp;quot;${pool}&amp;quot;)&lt;br /&gt;
        if [ $? -ne 0 ] || [ &amp;quot;disable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                :&lt;br /&gt;
        elif [ &amp;quot;enable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                trim_if_not_already_trimming &amp;quot;${pool}&amp;quot;&lt;br /&gt;
        elif [ &amp;quot;-&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;auto&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                if zpool_is_nvme_only &amp;quot;${pool}&amp;quot;; then&lt;br /&gt;
                        trim_if_not_already_trimming &amp;quot;${pool}&amp;quot;&lt;br /&gt;
                fi&lt;br /&gt;
        else&lt;br /&gt;
                cat &amp;gt; /dev/stderr &amp;lt;&amp;lt;EOF&lt;br /&gt;
$0: [WARNING] illegal value &amp;quot;${ret}&amp;quot; for property &amp;quot;${PROPERTY_NAME}&amp;quot; of ZFS dataset &amp;quot;${pool}&amp;quot;.&lt;br /&gt;
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.&lt;br /&gt;
EOF&lt;br /&gt;
        fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make the script executable: {{cmd|# chmod +x /usr/libexec/zfs/trim}}&lt;br /&gt;
&lt;br /&gt;
It is recommended to trim regularly to ensure that your pool(s) and data are in good shape. In our example, the trim script will be launched once a month, on the 1st Sunday of the month using [[cron]].&lt;br /&gt;
&lt;br /&gt;
Edit your crontabs using the command: {{cmd|# crontab -e}}&lt;br /&gt;
and add these 2 lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ZFS trim the 1st Sunday of every month&lt;br /&gt;
24      0       1-7    *       *       if [ $(date +\%w) -eq 0 ] &amp;amp;&amp;amp; [ -x /usr/libexec/zfs/trim ]; then /usr/libexec/zfs/trim; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://openzfs.org/wiki/System_Administration ZFS System Administration]&lt;br /&gt;
* [https://openzfs.github.io/openzfs-docs/Getting%20Started/Alpine%20Linux/Root%20on%20ZFS.html OpenZFS Guide for Alpine Linux]&lt;br /&gt;
* [[Root on ZFS with native encryption]]&lt;br /&gt;
* [[Setting up ZFS on LUKS]]&lt;br /&gt;
[[Category:Filesystems]]&lt;br /&gt;
[[Category:Storage]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ZFS&amp;diff=32339</id>
		<title>ZFS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ZFS&amp;diff=32339"/>
		<updated>2026-04-21T04:23:30Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://openzfs.org/wiki/Main_Page ZFS] or OpenZFS is an open-source storage platform. It includes the functionality of both traditional file systems and volume manager. &lt;br /&gt;
&lt;br /&gt;
This page has instructions for creating and automounting an encrypted ZFS drive or partition on an existing encrypted Alpine Linux system using ZFS&#039;s own encryption capabilities. To do a fresh install of Alpine Linux with root partition on ZFS, see [[Root on ZFS with native encryption]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the necessary packages and utilities by using the command:{{Cmd|# apk add zfs}}&lt;br /&gt;
Ensure that the kernel modules are loaded and verify that the device nodes are present:{{Cmd|&amp;lt;nowiki&amp;gt;# modprobe zfs         &lt;br /&gt;
# mdev -s &amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
If your use of ZFS depends on volumes appearing in {{Path|/dev/zvol/$ZPOOL/$ZVOL}}, you will also need to [[Eudev|setup eudev]] and:{{Cmd|# apk add zfs-udev}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
The system will be encrypted when powered off but will not require you to type an extra password at boot, since it uses a key stored on the encrypted root partition. Alternative options are also given, such as prompting for a password at boot rather than storing the key on the root drive. The example in this guide is modeled around creating a ZFS filesystem to be used as a user&#039;s home directory, but it can be trivially modified to create a filesystem for other purposes.&lt;br /&gt;
&lt;br /&gt;
=== Create an encryption key ===&lt;br /&gt;
&lt;br /&gt;
This section can be skipped if you intend to unlock the drive by typing a password rather than unlocking automatically. You should use a password instead if your root partition is not encrypted. The location of the file {{Path|/etc/home.key}} can be anywhere. {{Cmd|&amp;lt;nowiki&amp;gt;# dd if=/dev/random of=/etc/home.key bs=32 count=1&lt;br /&gt;
# chmod 600 /etc/home.key&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: Make sure you don&#039;t lose this key by overwriting your root filesystem or similar. You might want to store a copy of it on an encrypted USB drive, for instance.&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;/dev/sd...&amp;lt;/code&amp;gt; with the name of the disk or partition where you would like to make the zfs filesystem, such as &amp;lt;code&amp;gt;/dev/nvme0n1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dev/sda1&amp;lt;/code&amp;gt;. If you would like to be prompted for a password at boot rather than using the key as generated above, then replace &amp;lt;code&amp;gt;-O keylocation=file:///etc/home.key -O keyformat=raw&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;-O keylocation=prompt -O keyformat=passphrase&amp;lt;/code&amp;gt;. The name &amp;lt;var&amp;gt;&amp;quot;homepool&amp;quot;&amp;lt;/var&amp;gt; can be anything.{{Cmd|&amp;lt;nowiki&amp;gt;# zpool create -o ashift=12 -O acltype=posixacl -O compression=lz4 \&lt;br /&gt;
 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa \&lt;br /&gt;
 -O encryption=aes-256-gcm -O keylocation=file:///etc/home.key -O keyformat=raw \&lt;br /&gt;
 -O mountpoint=none homepool /dev/sd...&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
After completing this, verifying that the pool has been created should return something similar to the following: {{Cmd|&amp;lt;nowiki&amp;gt;# zpool status&lt;br /&gt;
      pool: homepool&lt;br /&gt;
     state: ONLINE&lt;br /&gt;
    config:&lt;br /&gt;
 &lt;br /&gt;
            NAME        STATE     READ WRITE CKSUM&lt;br /&gt;
            homepool    ONLINE       0     0     0&lt;br /&gt;
              sd...     ONLINE       0     0     0&lt;br /&gt;
    &lt;br /&gt;
    errors: No known data errors&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To create and mount the filesystem, issue the command {{Cmd|&amp;lt;nowiki&amp;gt;# zfs create -o mountpoint=/home/username homepool/username &lt;br /&gt;
# chown username:username /home/username &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The last command i.e &#039;&#039;chown&#039;&#039; is likely unnecessary if not creating a homedir.&lt;br /&gt;
&lt;br /&gt;
=== Service configuration ===&lt;br /&gt;
&lt;br /&gt;
Setup the following services to automount the new filesystem using [[OpenRC]].&lt;br /&gt;
To import existing zpools:{{Cmd|# rc-update add zfs-import}}    &lt;br /&gt;
To load the encryption keys:{{Cmd|# rc-update add zfs-load-key}}&lt;br /&gt;
Finally, to mount the filesystems:{{Cmd|# rc-update add zfs-mount}}    &lt;br /&gt;
&lt;br /&gt;
Reboot the system so that the encrypted ZFS drive is automounted and becomes available for use.&lt;br /&gt;
&lt;br /&gt;
== Maintenance ==&lt;br /&gt;
&lt;br /&gt;
On Alpine Linux, there in no cron/script provided to scrub (and eventually trim) your pool(s) on a regular basis, like in other Linux distributions.&lt;br /&gt;
&lt;br /&gt;
=== Scrub ===&lt;br /&gt;
&lt;br /&gt;
Scrubbing (and eventually trim) your pool(s) on a regular basis is essential, as discussed in [https://blogs.oracle.com/oracle-systems/post/disk-scrub-why-and-when an official Oracle blog post] on Exadata disk scrubbing. The scrub examines all data in the specified pools to verify that it checksums correctly. For replicated (mirror, raidz, or draid) devices, ZFS automatically repairs any damage discovered during the scrub.&lt;br /&gt;
&lt;br /&gt;
When scrubbing a pool with encrypted filesystems, the keys do not need to be loaded. However, if the keys are not loaded and an unrepairable checksum error is detected the file name cannot be included in the zpool status -v verbose error report.&lt;br /&gt;
&lt;br /&gt;
A scrub is split into two parts: metadata scanning and block scrubbing. The metadata scanning sorts blocks into large sequential ranges which can then be read much more efficiently from disk when issuing the scrub I/O.&lt;br /&gt;
&lt;br /&gt;
This script is taken from Debian ZFS scripts. It is used to list the pools, making sure that they are online and that no scrub is being done at the time. The contents of the script placed at {{path|/usr/libexec/zfs/scrub}} are as follows:{{cat|/usr/libexec/zfs/scrub|&amp;lt;nowiki&amp;gt;#!/bin/sh -eu&lt;br /&gt;
&lt;br /&gt;
# directly exit successfully when zfs module is not loaded&lt;br /&gt;
if ! [ -d /sys/module/zfs ]; then&lt;br /&gt;
        exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# [auto] / enable / disable&lt;br /&gt;
PROPERTY_NAME=&amp;quot;org.alpine:periodic-scrub&amp;quot;&lt;br /&gt;
&lt;br /&gt;
get_property () {&lt;br /&gt;
        # Detect the ${PROPERTY_NAME} property on a given pool.&lt;br /&gt;
        # We are abusing user-defined properties on the root dataset,&lt;br /&gt;
        # since they&#039;re not available on pools https://github.com/openzfs/zfs/pull/11680&lt;br /&gt;
        # TODO: use zpool user-defined property when such feature is available.&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        zfs get -H -o value &amp;quot;${PROPERTY_NAME}&amp;quot; &amp;quot;${pool}&amp;quot; 2&amp;gt;/dev/null || return 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
scrub_if_not_scrub_in_progress () {&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        if ! zpool status &amp;quot;${pool}&amp;quot; | grep -q &amp;quot;scrub in progress&amp;quot;; then&lt;br /&gt;
                # Ignore errors and continue with scrubbing other pools.&lt;br /&gt;
                zpool scrub &amp;quot;${pool}&amp;quot; || true&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Scrub all healthy pools that are not already scrubbing as per their configs.&lt;br /&gt;
zpool list -H -o health,name 2&amp;gt;&amp;amp;1 | \&lt;br /&gt;
        awk -F&#039;\t&#039; &#039;$1 == &amp;quot;ONLINE&amp;quot; {print $2}&#039; | \&lt;br /&gt;
while read pool&lt;br /&gt;
do&lt;br /&gt;
        # read user-defined config&lt;br /&gt;
        ret=$(get_property &amp;quot;${pool}&amp;quot;)&lt;br /&gt;
        if [ $? -ne 0 ] || [ &amp;quot;disable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                :&lt;br /&gt;
        elif [ &amp;quot;-&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;auto&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;enable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                scrub_if_not_scrub_in_progress &amp;quot;${pool}&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
                cat &amp;gt; /dev/stderr &amp;lt;&amp;lt;EOF&lt;br /&gt;
$0: [WARNING] illegal value &amp;quot;${ret}&amp;quot; for property &amp;quot;${PROPERTY_NAME}&amp;quot; of ZFS dataset &amp;quot;${pool}&amp;quot;.&lt;br /&gt;
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.&lt;br /&gt;
EOF&lt;br /&gt;
        fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Make the script executable: {{cmd|# chmod +x /usr/libexec/zfs/scrub}}&lt;br /&gt;
&lt;br /&gt;
It is recommended to scrub regularly to assure your pool(s) and data are in good shape. In our example, the scrub script will be launched once a month, on the 2nd Sunday of the month using [[cron]].&lt;br /&gt;
&lt;br /&gt;
Edit your crontabs using the command: {{cmd|# crontab -e}}&lt;br /&gt;
&lt;br /&gt;
and add these 2 lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# zfs scrub the 2nd Sunday of every month&lt;br /&gt;
24      0       8-14    *       *       if [ $(date +\%w) -eq 0 ] &amp;amp;&amp;amp; [ -x /usr/libexec/zfs/scrub ]; then /usr/libexec/zfs/scrub; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Trim ===&lt;br /&gt;
&lt;br /&gt;
The command {{ic|zpool trim}} initiates an immediate on-demand TRIM operation for all of the free space in a pool. This operation informs the underlying storage devices of all blocks in the pool which are no longer allocated and allows thinly provisioned devices to reclaim the space.&lt;br /&gt;
&lt;br /&gt;
A manual on-demand TRIM operation can be initiated irrespective of the [https://openzfs.github.io/openzfs-docs/man/v2.2/7/zpoolprops.7.html#autotrim autotrim] pool property setting. The link shows the types of VDEV devices that can be trimmed.&lt;br /&gt;
&lt;br /&gt;
This script is taken from Debian ZFS scripts. It is used to list the pools, making sure that they are online, built only with NVMe SSD drive(s) and that no trim is being done at the time. The contents of the script placed at {{path|/usr/libexec/zfs/trim}} are as follows:{{cat|/usr/libexec/zfs/trim|&amp;lt;nowiki&amp;gt;#!/bin/sh -eu&lt;br /&gt;
&lt;br /&gt;
# directly exit successfully when zfs module is not loaded&lt;br /&gt;
if ! [ -d /sys/module/zfs ]; then&lt;br /&gt;
        exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# [auto] / enable / disable&lt;br /&gt;
PROPERTY_NAME=&amp;quot;org.alpine:periodic-trim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
get_property () {&lt;br /&gt;
        # Detect the ${PROPERTY_NAME} property on a given pool.&lt;br /&gt;
        # We are abusing user-defined properties on the root dataset,&lt;br /&gt;
        # since they&#039;re not available on pools https://github.com/openzfs/zfs/pull/11680&lt;br /&gt;
        # TODO: use zpool user-defined property when such feature is available.&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        zfs get -H -o value &amp;quot;${PROPERTY_NAME}&amp;quot; &amp;quot;${pool}&amp;quot; 2&amp;gt;/dev/null || return 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
trim_if_not_already_trimming () {&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        if ! zpool status &amp;quot;${pool}&amp;quot; | grep -q &amp;quot;trimming&amp;quot;; then&lt;br /&gt;
                # Ignore errors (i.e. HDD pools),&lt;br /&gt;
                # and continue with trimming other pools.&lt;br /&gt;
                zpool trim &amp;quot;${pool}&amp;quot; || true&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
zpool_is_nvme_only () {&lt;br /&gt;
        zpool=$1&lt;br /&gt;
        # get a list of devices attached to the specified zpool&lt;br /&gt;
        zpool list -vHPL &amp;quot;${zpool}&amp;quot; |&lt;br /&gt;
                awk -F&#039;\t&#039; &#039;$2 ~ /^\/dev\// {&lt;br /&gt;
                        if($2 !~ /^\/dev\/nvme/)&lt;br /&gt;
                                exit 1&lt;br /&gt;
                }&#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# TRIM all healthy pools that are not already trimming as per their configs.&lt;br /&gt;
zpool list -H -o health,name 2&amp;gt;&amp;amp;1 | \&lt;br /&gt;
        awk -F&#039;\t&#039; &#039;$1 == &amp;quot;ONLINE&amp;quot; {print $2}&#039; | \&lt;br /&gt;
while read pool&lt;br /&gt;
do&lt;br /&gt;
        # read user-defined config&lt;br /&gt;
        ret=$(get_property &amp;quot;${pool}&amp;quot;)&lt;br /&gt;
        if [ $? -ne 0 ] || [ &amp;quot;disable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                :&lt;br /&gt;
        elif [ &amp;quot;enable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                trim_if_not_already_trimming &amp;quot;${pool}&amp;quot;&lt;br /&gt;
        elif [ &amp;quot;-&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;auto&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                if zpool_is_nvme_only &amp;quot;${pool}&amp;quot;; then&lt;br /&gt;
                        trim_if_not_already_trimming &amp;quot;${pool}&amp;quot;&lt;br /&gt;
                fi&lt;br /&gt;
        else&lt;br /&gt;
                cat &amp;gt; /dev/stderr &amp;lt;&amp;lt;EOF&lt;br /&gt;
$0: [WARNING] illegal value &amp;quot;${ret}&amp;quot; for property &amp;quot;${PROPERTY_NAME}&amp;quot; of ZFS dataset &amp;quot;${pool}&amp;quot;.&lt;br /&gt;
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.&lt;br /&gt;
EOF&lt;br /&gt;
        fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make the script executable: {{cmd|# chmod +x /usr/libexec/zfs/trim}}&lt;br /&gt;
&lt;br /&gt;
It is recommended to trim regularly to ensure that your pool(s) and data are in good shape. In our example, the trim script will be launched once a month, on the 1st Sunday of the month using [[cron]]&lt;br /&gt;
&lt;br /&gt;
Edit your crontabs using the command: {{cmd|# crontab -e}}&lt;br /&gt;
and add these 2 lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# zfs trim the 1st Sunday of every month&lt;br /&gt;
24      0       1-7    *       *       if [ $(date +\%w) -eq 0 ] &amp;amp;&amp;amp; [ -x /usr/libexec/zfs/trim ]; then /usr/libexec/zfs/trim; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://openzfs.org/wiki/System_Administration ZFS System Administration]&lt;br /&gt;
* [https://openzfs.github.io/openzfs-docs/Getting%20Started/Alpine%20Linux/Root%20on%20ZFS.html OpenZFS Guide for Alpine Linux]&lt;br /&gt;
* [[Root on ZFS with native encryption]]&lt;br /&gt;
* [[Setting up ZFS on LUKS]]&lt;br /&gt;
[[Category:Filesystems]]&lt;br /&gt;
[[Category:Storage]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ZFS&amp;diff=32336</id>
		<title>ZFS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ZFS&amp;diff=32336"/>
		<updated>2026-04-19T03:59:10Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://openzfs.org/wiki/Main_Page ZFS] or OpenZFS is an open-source storage platform. It includes the functionality of both traditional file systems and volume manager. &lt;br /&gt;
&lt;br /&gt;
This page has instructions for creating and automounting an encrypted ZFS drive or partition on an existing encrypted Alpine Linux system using ZFS&#039;s own encryption capabilities. To do a fresh install of Alpine Linux with root partition on ZFS, see [[Root on ZFS with native encryption]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the necessary packages and utilities by using the command:{{Cmd|# apk add zfs}}&lt;br /&gt;
Ensure that the kernel modules are loaded and verify that the device nodes are present:{{Cmd|&amp;lt;nowiki&amp;gt;# modprobe zfs         &lt;br /&gt;
# mdev -s &amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
If your use of ZFS depends on volumes appearing in {{Path|/dev/zvol/$ZPOOL/$ZVOL}}, you will also need to [[Eudev|setup eudev]] and:{{Cmd|# apk add zfs-udev}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
The system will be encrypted when powered off but will not require you to type an extra password at boot, since it uses a key stored on the encrypted root partition. Alternative options are also given, such as prompting for a password at boot rather than storing the key on the root drive. The example in this guide is modeled around creating a ZFS filesystem to be used as a user&#039;s home directory, but it can be trivially modified to create a filesystem for other purposes.&lt;br /&gt;
&lt;br /&gt;
=== Create an encryption key ===&lt;br /&gt;
&lt;br /&gt;
This section can be skipped if you intend to unlock the drive by typing a password rather than unlocking automatically. You should use a password instead if your root partition is not encrypted. The location of the file {{Path|/etc/home.key}} can be anywhere. {{Cmd|&amp;lt;nowiki&amp;gt;# dd if=/dev/random of=/etc/home.key bs=32 count=1&lt;br /&gt;
# chmod 600 /etc/home.key&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: Make sure you don&#039;t lose this key by overwriting your root filesystem or similar. You might want to store a copy of it on an encrypted USB drive, for instance.&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;/dev/sd...&amp;lt;/code&amp;gt; with the name of the disk or partition where you would like to make the zfs filesystem, such as &amp;lt;code&amp;gt;/dev/nvme0n1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dev/sda1&amp;lt;/code&amp;gt;. If you would like to be prompted for a password at boot rather than using the key as generated above, then replace &amp;lt;code&amp;gt;-O keylocation=file:///etc/home.key -O keyformat=raw&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;-O keylocation=prompt -O keyformat=passphrase&amp;lt;/code&amp;gt;. The name &amp;lt;var&amp;gt;&amp;quot;homepool&amp;quot;&amp;lt;/var&amp;gt; can be anything.{{Cmd|&amp;lt;nowiki&amp;gt;# zpool create -o ashift=12 -O acltype=posixacl -O compression=lz4 \&lt;br /&gt;
 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa \&lt;br /&gt;
 -O encryption=aes-256-gcm -O keylocation=file:///etc/home.key -O keyformat=raw \&lt;br /&gt;
 -O mountpoint=none homepool /dev/sd...&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
After completing this, verifying that the pool has been created should return something similar to the following: {{Cmd|&amp;lt;nowiki&amp;gt;# zpool status&lt;br /&gt;
      pool: homepool&lt;br /&gt;
     state: ONLINE&lt;br /&gt;
    config:&lt;br /&gt;
 &lt;br /&gt;
            NAME        STATE     READ WRITE CKSUM&lt;br /&gt;
            homepool    ONLINE       0     0     0&lt;br /&gt;
              sd...     ONLINE       0     0     0&lt;br /&gt;
    &lt;br /&gt;
    errors: No known data errors&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To create and mount the filesystem, issue the command {{Cmd|&amp;lt;nowiki&amp;gt;# zfs create -o mountpoint=/home/username homepool/username &lt;br /&gt;
# chown username:username /home/username &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The last command i.e &#039;&#039;chown&#039;&#039; is likely unnecessary if not creating a homedir.&lt;br /&gt;
&lt;br /&gt;
=== Service configuration ===&lt;br /&gt;
&lt;br /&gt;
Setup the following services to automount the new filesystem using [[OpenRC]].&lt;br /&gt;
To import existing zpools:{{Cmd|# rc-update add zfs-import}}    &lt;br /&gt;
To load the encryption keys:{{Cmd|# rc-update add zfs-load-key}}&lt;br /&gt;
Finally, to mount the filesystems:{{Cmd|# rc-update add zfs-mount}}    &lt;br /&gt;
&lt;br /&gt;
Reboot the system so that the encrypted ZFS drive is automounted and becomes available for use.&lt;br /&gt;
&lt;br /&gt;
== Maintenance ==&lt;br /&gt;
&lt;br /&gt;
On Alpine Linux, there in no cron/script provided to scrub (and eventually trim) your pool(s) on a regular basis, like in other Linux distributions.&lt;br /&gt;
&lt;br /&gt;
=== Scrub ===&lt;br /&gt;
&lt;br /&gt;
Scrubbing (and eventually trim) your pool(s) on a regular basis is essential, as discussed in [https://blogs.oracle.com/oracle-systems/post/disk-scrub-why-and-when an official Oracle blog post] on Exadata disk scrubbing. The scrub examines all data in the specified pools to verify that it checksums correctly. For replicated (mirror, raidz, or draid) devices, ZFS automatically repairs any damage discovered during the scrub.&lt;br /&gt;
&lt;br /&gt;
When scrubbing a pool with encrypted filesystems, the keys do not need to be loaded. However, if the keys are not loaded and an unrepairable checksum error is detected the file name cannot be included in the zpool status -v verbose error report.&lt;br /&gt;
&lt;br /&gt;
A scrub is split into two parts: metadata scanning and block scrubbing. The metadata scanning sorts blocks into large sequential ranges which can then be read much more efficiently from disk when issuing the scrub I/O.&lt;br /&gt;
&lt;br /&gt;
This script is taken from debian zfs scripts. It is used to list the pools, make sure they are online, and no scrub is being done at the time. The contents of the script placed at {{path|/usr/libexec/zfs/scrub}} are as follows:{{cat|/usr/libexec/zfs/scrub|&amp;lt;nowiki&amp;gt;#!/bin/sh -eu&lt;br /&gt;
&lt;br /&gt;
# directly exit successfully when zfs module is not loaded&lt;br /&gt;
if ! [ -d /sys/module/zfs ]; then&lt;br /&gt;
        exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# [auto] / enable / disable&lt;br /&gt;
PROPERTY_NAME=&amp;quot;org.alpine:periodic-scrub&amp;quot;&lt;br /&gt;
&lt;br /&gt;
get_property () {&lt;br /&gt;
        # Detect the ${PROPERTY_NAME} property on a given pool.&lt;br /&gt;
        # We are abusing user-defined properties on the root dataset,&lt;br /&gt;
        # since they&#039;re not available on pools https://github.com/openzfs/zfs/pull/11680&lt;br /&gt;
        # TODO: use zpool user-defined property when such feature is available.&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        zfs get -H -o value &amp;quot;${PROPERTY_NAME}&amp;quot; &amp;quot;${pool}&amp;quot; 2&amp;gt;/dev/null || return 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
scrub_if_not_scrub_in_progress () {&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        if ! zpool status &amp;quot;${pool}&amp;quot; | grep -q &amp;quot;scrub in progress&amp;quot;; then&lt;br /&gt;
                # Ignore errors and continue with scrubbing other pools.&lt;br /&gt;
                zpool scrub &amp;quot;${pool}&amp;quot; || true&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Scrub all healthy pools that are not already scrubbing as per their configs.&lt;br /&gt;
zpool list -H -o health,name 2&amp;gt;&amp;amp;1 | \&lt;br /&gt;
        awk -F&#039;\t&#039; &#039;$1 == &amp;quot;ONLINE&amp;quot; {print $2}&#039; | \&lt;br /&gt;
while read pool&lt;br /&gt;
do&lt;br /&gt;
        # read user-defined config&lt;br /&gt;
        ret=$(get_property &amp;quot;${pool}&amp;quot;)&lt;br /&gt;
        if [ $? -ne 0 ] || [ &amp;quot;disable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                :&lt;br /&gt;
        elif [ &amp;quot;-&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;auto&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;enable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                scrub_if_not_scrub_in_progress &amp;quot;${pool}&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
                cat &amp;gt; /dev/stderr &amp;lt;&amp;lt;EOF&lt;br /&gt;
$0: [WARNING] illegal value &amp;quot;${ret}&amp;quot; for property &amp;quot;${PROPERTY_NAME}&amp;quot; of ZFS dataset &amp;quot;${pool}&amp;quot;.&lt;br /&gt;
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.&lt;br /&gt;
EOF&lt;br /&gt;
        fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Make the script executable: {{cmd|# chmod +x /usr/libexec/zfs/scrub}}&lt;br /&gt;
&lt;br /&gt;
It is recommended to scrub regularly to assure your pool(s) and datas are in good shape. In our example, the scrub script will be launched once a month, on the 2nd Sunday of the month using [[cron]].&lt;br /&gt;
&lt;br /&gt;
Edit your crontabs using the command: {{cmd|# crontab -e}}&lt;br /&gt;
&lt;br /&gt;
and add these 2 lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# zfs scrub the 2nd Sunday of every month&lt;br /&gt;
24      0       8-14    *       *       if [ $(date +\%w) -eq 0 ] &amp;amp;&amp;amp; [ -x /usr/libexec/zfs/scrub ]; then /usr/libexec/zfs/scrub; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Trim ===&lt;br /&gt;
&lt;br /&gt;
The command {{ic|zpool trim}} initiates an immediate on-demand TRIM operation for all of the free space in a pool. This operation informs the underlying storage devices of all blocks in the pool which are no longer allocated and allows thinly provisioned devices to reclaim the space.&lt;br /&gt;
&lt;br /&gt;
A manual on-demand TRIM operation can be initiated irrespective of the [https://openzfs.github.io/openzfs-docs/man/v2.2/7/zpoolprops.7.html#autotrim autotrim] pool property setting. The link shows the types of vdev devices which can be trimmed.&lt;br /&gt;
&lt;br /&gt;
This script is taken from debian zfs scripts. It is used  to list the pools, make sure they are online, build only with NVME ssd drive(s) and no trim is being done at the time. The contents of the script placed at {{path|/usr/libexec/zfs/trim}} is as follows:{{cat|/usr/libexec/zfs/trim|&amp;lt;nowiki&amp;gt;#!/bin/sh -eu&lt;br /&gt;
&lt;br /&gt;
# directly exit successfully when zfs module is not loaded&lt;br /&gt;
if ! [ -d /sys/module/zfs ]; then&lt;br /&gt;
        exit 0&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# [auto] / enable / disable&lt;br /&gt;
PROPERTY_NAME=&amp;quot;org.alpine:periodic-trim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
get_property () {&lt;br /&gt;
        # Detect the ${PROPERTY_NAME} property on a given pool.&lt;br /&gt;
        # We are abusing user-defined properties on the root dataset,&lt;br /&gt;
        # since they&#039;re not available on pools https://github.com/openzfs/zfs/pull/11680&lt;br /&gt;
        # TODO: use zpool user-defined property when such feature is available.&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        zfs get -H -o value &amp;quot;${PROPERTY_NAME}&amp;quot; &amp;quot;${pool}&amp;quot; 2&amp;gt;/dev/null || return 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
trim_if_not_already_trimming () {&lt;br /&gt;
        pool=&amp;quot;$1&amp;quot;&lt;br /&gt;
        if ! zpool status &amp;quot;${pool}&amp;quot; | grep -q &amp;quot;trimming&amp;quot;; then&lt;br /&gt;
                # Ignore errors (i.e. HDD pools),&lt;br /&gt;
                # and continue with trimming other pools.&lt;br /&gt;
                zpool trim &amp;quot;${pool}&amp;quot; || true&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
zpool_is_nvme_only () {&lt;br /&gt;
        zpool=$1&lt;br /&gt;
        # get a list of devices attached to the specified zpool&lt;br /&gt;
        zpool list -vHPL &amp;quot;${zpool}&amp;quot; |&lt;br /&gt;
                awk -F&#039;\t&#039; &#039;$2 ~ /^\/dev\// {&lt;br /&gt;
                        if($2 !~ /^\/dev\/nvme/)&lt;br /&gt;
                                exit 1&lt;br /&gt;
                }&#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# TRIM all healthy pools that are not already trimming as per their configs.&lt;br /&gt;
zpool list -H -o health,name 2&amp;gt;&amp;amp;1 | \&lt;br /&gt;
        awk -F&#039;\t&#039; &#039;$1 == &amp;quot;ONLINE&amp;quot; {print $2}&#039; | \&lt;br /&gt;
while read pool&lt;br /&gt;
do&lt;br /&gt;
        # read user-defined config&lt;br /&gt;
        ret=$(get_property &amp;quot;${pool}&amp;quot;)&lt;br /&gt;
        if [ $? -ne 0 ] || [ &amp;quot;disable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                :&lt;br /&gt;
        elif [ &amp;quot;enable&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                trim_if_not_already_trimming &amp;quot;${pool}&amp;quot;&lt;br /&gt;
        elif [ &amp;quot;-&amp;quot; = &amp;quot;${ret}&amp;quot; ] || [ &amp;quot;auto&amp;quot; = &amp;quot;${ret}&amp;quot; ]; then&lt;br /&gt;
                if zpool_is_nvme_only &amp;quot;${pool}&amp;quot;; then&lt;br /&gt;
                        trim_if_not_already_trimming &amp;quot;${pool}&amp;quot;&lt;br /&gt;
                fi&lt;br /&gt;
        else&lt;br /&gt;
                cat &amp;gt; /dev/stderr &amp;lt;&amp;lt;EOF&lt;br /&gt;
$0: [WARNING] illegal value &amp;quot;${ret}&amp;quot; for property &amp;quot;${PROPERTY_NAME}&amp;quot; of ZFS dataset &amp;quot;${pool}&amp;quot;.&lt;br /&gt;
$0: Acceptable choices for this property are: auto, enable, disable. The default is auto.&lt;br /&gt;
EOF&lt;br /&gt;
        fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make the script executable: {{cmd|# chmod +x /usr/libexec/zfs/trim}}&lt;br /&gt;
&lt;br /&gt;
It is recommended to trim regularly to assure your pool(s) and datas are in good shape. So the trim script will be launched once a month, on the 1st sunday of the month using [[cron]]&lt;br /&gt;
&lt;br /&gt;
Edit your crontabs using the command: {{cmd|# crontab -e}}&lt;br /&gt;
and add these 2 lines&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# zfs trim the first sunday of every month&lt;br /&gt;
24      0       1-7    *       *       if [ $(date +\%w) -eq 0 ] &amp;amp;&amp;amp; [ -x /usr/libexec/zfs/trim ]; then /usr/libexec/zfs/trim; fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://openzfs.org/wiki/System_Administration ZFS System Administration]&lt;br /&gt;
* [https://openzfs.github.io/openzfs-docs/Getting%20Started/Alpine%20Linux/Root%20on%20ZFS.html OpenZFS Guide for Alpine Linux]&lt;br /&gt;
* [[Root on ZFS with native encryption]]&lt;br /&gt;
* [[Setting up ZFS on LUKS]]&lt;br /&gt;
[[Category:Filesystems]]&lt;br /&gt;
[[Category:Storage]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Prism_Launcher&amp;diff=32259</id>
		<title>Prism Launcher</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Prism_Launcher&amp;diff=32259"/>
		<updated>2026-03-30T10:46:20Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Added Category: Gaming;  2. Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://prismlauncher.org/ Prism Launcher] is a [https://www.minecraft.net/en-us Minecraft] launcher that allows for easy management of multiple versions of Minecraft with or without mods.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* A running graphical environment.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Prism Launcher can be installed either through [[Flatpak]] (recommended) or via the {{Pkg|prismlauncher}} package.&lt;br /&gt;
&lt;br /&gt;
=== Flatpak Installation ===&lt;br /&gt;
&lt;br /&gt;
# Follow the [[Flatpak#Installing_Flatpak|Flatpak]] wiki page and ensure that the [[Flatpak#Installing_Flatpak|Flathub repository]] is enabled. &lt;br /&gt;
# Install the Prism Launcher flatpak package from Flathub.{{Cmd|$ flatpak --user install org.prismlauncher.PrismLauncher}}&lt;br /&gt;
# After installation, Prism Launcher can be started through its {{Path|.desktop}} file or from the command line: {{Cmd|$ flatpak run org.prismlauncher.PrismLauncher}}&lt;br /&gt;
&lt;br /&gt;
=== apk Installation ===&lt;br /&gt;
# Install the {{Pkg|prismlauncher}} package.&lt;br /&gt;
# Install the {{Pkg|openjdk*}} version required by your Minecraft version.&lt;br /&gt;
# Install the {{Pkg|jemalloc}} and {{Pkg|openal-soft-libs}} packages.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Problematic frame: liblwjgl.so ===&lt;br /&gt;
Versions of Minecraft that use [https://www.lwjgl.org/ LWJGL] version 3.3.1 will not start, with the error: &lt;br /&gt;
{{Cmd|Problematic frame: C  [liblwjgl.so+0x4e81d]}}&lt;br /&gt;
Affected versions include everything between snapshot 22w15a(&amp;gt;1.19) and snapshot 23w35a(&amp;lt;1.20.2).&lt;br /&gt;
There is no known fix at this time.&lt;br /&gt;
&lt;br /&gt;
[[Category:Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Openconnect-SSO_in_Docker&amp;diff=32093</id>
		<title>Openconnect-SSO in Docker</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Openconnect-SSO_in_Docker&amp;diff=32093"/>
		<updated>2026-02-26T00:54:08Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1.  Added &amp;#039;See also&amp;#039; section:  &amp;#039;Docker image example on hub.docker.com&amp;#039;, &amp;#039;An openconnect-sso Docker implementation for X11&amp;#039;, &amp;#039;openconnect-sso GitHub repository&amp;#039;;  2. Added categories:  Networking, VPN, Virtualization‏‎, Authentication.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= VPN via openconnect-sso (Docker) =&lt;br /&gt;
&lt;br /&gt;
This guide describes how to connect to a Cisco AnyConnect-compatible VPN using openconnect-sso running inside a Docker container, with automatic DNS configuration on connect. It is assumed the WM / compositor of the client is Wayland.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* [[Docker]] installed and running&lt;br /&gt;
* doas configured&lt;br /&gt;
* The &amp;lt;code&amp;gt;openconnect-sso&amp;lt;/code&amp;gt; Docker image built (see below)&lt;br /&gt;
* A VPN-specific &amp;lt;code&amp;gt;resolv.conf&amp;lt;/code&amp;gt; saved at &amp;lt;code&amp;gt;~/.local/resolv.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t know the DNS for &amp;lt;code&amp;gt;resolv.conf&amp;lt;/code&amp;gt;, you can remove that part and connect via IP(s) directly, not DNS.&lt;br /&gt;
&lt;br /&gt;
== Building the Docker image ==&lt;br /&gt;
&lt;br /&gt;
Save the following as &amp;lt;code&amp;gt;Dockerfile.openconnect-sso&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FROM python:3.11-slim&lt;br /&gt;
&lt;br /&gt;
RUN apt-get update &amp;amp;&amp;amp; \&lt;br /&gt;
    apt-get install -y \&lt;br /&gt;
      openconnect \&lt;br /&gt;
      sudo \&lt;br /&gt;
      libqt6gui6 \&lt;br /&gt;
      libqt6widgets6 \&lt;br /&gt;
      libqt6webenginecore6 \&lt;br /&gt;
      libqt6webenginewidgets6 \&lt;br /&gt;
      qt6-wayland \&lt;br /&gt;
      libgl1 \&lt;br /&gt;
      libxkbcommon0 \&lt;br /&gt;
      libdbus-1-3 \&lt;br /&gt;
      libegl1 \&lt;br /&gt;
      libnss3 \&lt;br /&gt;
      libnspr4 \&lt;br /&gt;
      libxcomposite1 \&lt;br /&gt;
      libxdamage1 \&lt;br /&gt;
      libxrandr2 \&lt;br /&gt;
      libxtst6 \&lt;br /&gt;
      libxslt1.1 \&lt;br /&gt;
      libglib2.0-0 \&lt;br /&gt;
      libasound2 \&lt;br /&gt;
      libxcursor1 \&lt;br /&gt;
      fonts-liberation &amp;amp;&amp;amp; \&lt;br /&gt;
    apt-get clean &amp;amp;&amp;amp; \&lt;br /&gt;
    rm -rf /var/lib/apt/lists/*&lt;br /&gt;
&lt;br /&gt;
RUN pip install --no-cache-dir openconnect-sso&lt;br /&gt;
&lt;br /&gt;
RUN useradd -m -s /bin/bash vpnuser &amp;amp;&amp;amp; \&lt;br /&gt;
    echo &amp;quot;vpnuser ALL=(ALL) NOPASSWD: ALL&amp;quot; &amp;gt;&amp;gt; /etc/sudoers&lt;br /&gt;
&lt;br /&gt;
USER vpnuser&lt;br /&gt;
WORKDIR /home/vpnuser&lt;br /&gt;
&lt;br /&gt;
ENV QT_QPA_PLATFORM=wayland&lt;br /&gt;
ENV XDG_RUNTIME_DIR=/tmp&lt;br /&gt;
&lt;br /&gt;
ENTRYPOINT [&amp;quot;openconnect-sso&amp;quot;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build and create the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
docker build -f Dockerfile.openconnect-sso -t openconnect-sso .&lt;br /&gt;
doas docker create -it \&lt;br /&gt;
  --name openconnect-sso \&lt;br /&gt;
  --privileged \&lt;br /&gt;
  --net=host \&lt;br /&gt;
  -v /etc/ssl/certs:/etc/ssl/certs:ro \&lt;br /&gt;
  -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \&lt;br /&gt;
  -e XDG_RUNTIME_DIR=/tmp \&lt;br /&gt;
  -e QT_QPA_PLATFORM=wayland \&lt;br /&gt;
  -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY:rw \&lt;br /&gt;
  --device /dev/net/tun \&lt;br /&gt;
  openconnect-sso:latest \&lt;br /&gt;
  --server your-vpn-gateway \&lt;br /&gt;
  --user your-username&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNS configuration ==&lt;br /&gt;
&lt;br /&gt;
When the VPN connects, a &amp;lt;code&amp;gt;tun0&amp;lt;/code&amp;gt; interface is created but the system DNS is not automatically updated. To resolve internal hostnames, save your VPN network&#039;s DNS settings to &amp;lt;code&amp;gt;~/.local/resolv.conf&amp;lt;/code&amp;gt;. This file will be copied to &amp;lt;code&amp;gt;/etc/resolv.conf&amp;lt;/code&amp;gt; once the tunnel is up.&lt;br /&gt;
&lt;br /&gt;
== Connecting ==&lt;br /&gt;
&lt;br /&gt;
Save the following script (e.g. &amp;lt;code&amp;gt;~/.local/bin/vpn-connect.sh&amp;lt;/code&amp;gt;) and make it executable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# Wait for tun interface, then set DNS&lt;br /&gt;
(&lt;br /&gt;
  while ! ip addr show tun0 2&amp;gt;/dev/null | grep -q inet; do&lt;br /&gt;
    sleep 1&lt;br /&gt;
  done&lt;br /&gt;
  doas cp ~/.local/resolv.conf /etc/&lt;br /&gt;
) &amp;amp;&lt;br /&gt;
# Start VPN in foreground&lt;br /&gt;
doas docker start -ai openconnect-sso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod +x ~/.local/bin/vpn-connect.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/.local/bin/vpn-connect.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A browser window will open for SSO authentication. After completing login, the VPN tunnel will establish and DNS will be updated automatically.&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
The script starts a background subshell that polls for the &amp;lt;code&amp;gt;tun0&amp;lt;/code&amp;gt; interface. Once the interface has an IP address assigned (meaning the tunnel is up), it copies the VPN-specific &amp;lt;code&amp;gt;resolv.conf&amp;lt;/code&amp;gt; into place. Meanwhile, the Docker container runs in the foreground so its output and the SSO browser window remain accessible.&lt;br /&gt;
&lt;br /&gt;
== Disconnecting ==&lt;br /&gt;
&lt;br /&gt;
Close the foreground process with {{Key|Ctrl|C}} or stop the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
doas docker stop openconnect-sso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also want to restore your original &amp;lt;code&amp;gt;/etc/resolv.conf&amp;lt;/code&amp;gt; afterwards if it is not managed by another service.&lt;br /&gt;
&lt;br /&gt;
== Why use Docker? ==&lt;br /&gt;
System updates broke the bare metal openconnect-sso install. Docker keeps things static. Another way would be pyenv - please add steps below if you succeed with it.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://hub.docker.com/r/morgan404/openconnect-client Docker image example on hub.docker.com] - Uses an Alpine Linux-based container using OpenConnect and OpenSSH Docker.  Also enables automatic server certificate handling, which  simplifies configuration.&lt;br /&gt;
* [https://github.com/tuapuikia/openconnect-sso-docker An openconnect-sso Docker implementation for X11] - Includes host networking.&lt;br /&gt;
* [https://github.com/vlaci/openconnect-sso openconnect-sso GitHub repository] - Installation, authentication logic, usage (without Docker), authentication logic and for updates upstream.&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:VPN]]&lt;br /&gt;
[[Category:Virtualization‏‎]]&lt;br /&gt;
[[Category:Authentication]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:FAQ&amp;diff=32080</id>
		<title>Alpine Linux:FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:FAQ&amp;diff=32080"/>
		<updated>2026-02-19T20:45:52Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Why don&amp;#039;t I have man pages or where is the &amp;#039;man&amp;#039; command? */ Two syntax amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:filetypes.svg|64px|left|link=]]&lt;br /&gt;
&lt;br /&gt;
Alpine Linux is an independent, non-commercial, general purpose Linux distribution designed for power users who appreciate security, simplicity and resource efficiency. &lt;br /&gt;
&lt;br /&gt;
This is a list of &#039;&#039;&#039;frequently asked questions&#039;&#039;&#039; about Alpine Linux. If your question is not answered on this page, check the available [[Alpine Linux:Support|support]] options. &lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
=== Where to start? ===&lt;br /&gt;
&lt;br /&gt;
The [[Installation]] page and the [[Installation#Post-Installation|Post Installation]] section on that page, provide a basic orientation.&lt;br /&gt;
&lt;br /&gt;
A broader overview may be found on the official [https://alpinelinux.org/about About] page and at the [[Alpine Linux:Overview|wiki overview]].&lt;br /&gt;
&lt;br /&gt;
Please note that testing is safer on your own virtual machine.&lt;br /&gt;
&lt;br /&gt;
=== I have found a bug, where can I report it? ===&lt;br /&gt;
You can report it on the [https://gitlab.alpinelinux.org/groups/alpine/-/issues bugtracker], but search it first to see if the issue has already been reported.&lt;br /&gt;
&lt;br /&gt;
=== Are there any details about the releases available? ===&lt;br /&gt;
Please check the [https://alpinelinux.org/releases/ Release Branches] page for more information.&lt;br /&gt;
&lt;br /&gt;
=== What is the difference between edge and stable release branch? ===&lt;br /&gt;
&lt;br /&gt;
[[Repositories#Edge|&#039;&#039;&#039;Edge&#039;&#039;&#039;]] is the name given to the current [[Aports tree|development tree]] of Alpine Linux.  &#039;&#039;edge&#039;&#039; can be considered as &#039;&#039;&#039;rolling release version&#039;&#039;&#039; of Alpine Linux. This version contains the latest build of all available Alpine Linux packages. Those packages are updated on a regular basis. &lt;br /&gt;
&lt;br /&gt;
[[Repositories#Release Branches|Stable release branches]] are just what they sound like: initially a point-in-time snapshot of the package archives, but then maintained with bugfixes only in order to keep a stable environment. Occasionally, snapshot ISO images of the then-current state of edge are made and are available for download. Typically these are made when there are major kernel upgrades or package upgrades that require initramfs rebuilds.&lt;br /&gt;
&lt;br /&gt;
=== What architectures does Alpine Linux support? ===&lt;br /&gt;
The table below lists the architectures that are officially supported.&lt;br /&gt;
{{:Include:Architecture support matrix}}&lt;br /&gt;
Please check [https://alpinelinux.org/downloads Downloads] page for media availability on each one.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Note: Please update the above link for Architecture information . The below content to be removed later, if this redirection is acceptable to all&lt;br /&gt;
* &#039;&#039;&#039;aarch64&#039;&#039;&#039;: 64-bit ARM processors (e.g. Raspberry Pi 4)&lt;br /&gt;
* &#039;&#039;&#039;armhf&#039;&#039;&#039;: 32-bit ARMv6 processors with a floating point unit (e.g. Raspberry Pi 1) (armv6hf)&lt;br /&gt;
* &#039;&#039;&#039;armv7&#039;&#039;&#039;: 32-bit ARMv7 processors with a floating point unit (armv7hf)&lt;br /&gt;
* &#039;&#039;&#039;s390x&#039;&#039;&#039;: IBM mainframes using the z/Architecture (z196 minimum)&lt;br /&gt;
* &#039;&#039;&#039;ppc64le&#039;&#039;&#039;: 64-bit little-endian POWER devices (e.g. Raptor Talos II) (POWER8 minimum)&lt;br /&gt;
* &#039;&#039;&#039;x86&#039;&#039;&#039;: 32-bit Intel and AMD processors commonly found in older personal computers (e.g. Pentium M+). Can also run on x86_64 machines (not recommended). Requires SSE2 and CMOV.&lt;br /&gt;
* &#039;&#039;&#039;x86_64&#039;&#039;&#039;: 64-bit Intel and AMD processors commonly found in personal computers (e.g. Core i7, Ryzen 7)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How can I contribute? ===&lt;br /&gt;
You can contribute by:&lt;br /&gt;
* Using the software and giving [https://gitlab.alpinelinux.org/groups/alpine/-/issues feedback].&lt;br /&gt;
* Documenting your [https://www.alpinelinux.org Alpine Linux] experiences on this [[Main_Page|wiki]].&lt;br /&gt;
* Flag packages as outdated in the [https://pkgs.alpinelinux.org/packages package database], or even better enable release monitoring in [https://release-monitoring.org/ Anitya] for them.&lt;br /&gt;
* In many other ways.&lt;br /&gt;
Please visit the [[Contribute|Contribute page]] to read more about this topic.&lt;br /&gt;
&lt;br /&gt;
=== Why don&#039;t I have man pages or where is the &#039;man&#039; command? ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; command, the {{pkg|man-pages}} and the system&#039;s &#039;&#039;core&#039;&#039; manual pages are not installed by default. Since binary packages are thinned out and split, documentation sub-packages in the format &#039;&#039;&#039;packagename-doc&#039;&#039;&#039; are not installed by default. &lt;br /&gt;
The core utilities provided by [[BusyBox]] – e.g. {{ic|ls}}, {{ic|traceroute}} and {{ic|poweroff}} – do not have individual man pages in keeping with BusyBox&#039;s minimalist design.  Instead, the man page package for BusyBox, {{pkg|busybox-doc}}, supplies a single &#039;&#039;&#039;busybox&#039;&#039;&#039; man page that lists all the available switches for those utility applets;  once &#039;&#039;&#039;busybox-doc&#039;&#039;&#039; is installed, the switches for each utility can be listed using the {{ic|--help}} option – e.g. {{ic|ls --help}} – or by scrolling through {{ic|$ man busybox}}. &lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;man pages reader&#039;&#039; called {{pkg|mandoc}}.  It is the default reader since Alpine Linux v3.12, preferred over {{pkg|man-db}} or {{pkg|man-pages}}, as it supplies a smaller, faster and more secure &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; command:&lt;br /&gt;
{{cmd|# apk add {{pkg|mandoc}}}}&lt;br /&gt;
&lt;br /&gt;
Once {{pkg|mandoc}} is installed, add documentation for the package where you need it. For example, say you installed &#039;&#039;&#039;nftables&#039;&#039;&#039;, and you now require its man page: &lt;br /&gt;
{{cmd|# apk add {{pkg|nftables-doc}}}}&lt;br /&gt;
&lt;br /&gt;
The {{pkg|docs}} meta package will immediately install the documentation sub-package for all of the currently installed packages, plus the {{pkg|mandoc}} reader, if not installed.  {{pkg|docs}} additionally ensures that documentation sub-packages are installed/removed automatically for any packages that one may add/remove in the future. &lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add docs}}&lt;br /&gt;
&lt;br /&gt;
Optionally, to be able to search all &#039;&#039;installed&#039;&#039; man pages for a given command, say, {{ic|&amp;lt;var&amp;gt;password&amp;lt;/var&amp;gt;}}, install {{pkg|mandoc-apropos}}, which supplies the &amp;lt;code&amp;gt;apropos&amp;lt;/code&amp;gt; instruction.&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add {{pkg|mandoc-apropos}}}} &lt;br /&gt;
&lt;br /&gt;
Then, search installed man pages for the command:&lt;br /&gt;
&lt;br /&gt;
 $ apropos &amp;lt;var&amp;gt;password&amp;lt;/var&amp;gt;&lt;br /&gt;
 chage(1) - change user password expiry information&lt;br /&gt;
 expiry(1) - check and enforce password expiration policy&lt;br /&gt;
 git-credential-cache(1) - Helper to temporarily store passwords in memory&lt;br /&gt;
 keepassxc(1) - a modern open-source password manager&lt;br /&gt;
 [...]&lt;br /&gt;
&lt;br /&gt;
Keep in mind that not all packages have a corresponding documentation package, and even when it has one, it may not be in the form of &#039;&#039;&#039;man pages&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
=== What is the difference between &#039;&#039;sys&#039;&#039;, &#039;&#039;data&#039;&#039;, and &#039;&#039;diskless&#039;&#039; when running &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;? ===&lt;br /&gt;
&lt;br /&gt;
[[System Disk Mode|&#039;&#039;&#039;sys&#039;&#039;&#039; or &#039;&#039;&#039;system&#039;&#039;&#039; disk]] mode is the traditional hard disk installation. The following partitions will be created on the disk: &#039;&#039;/boot/&#039;&#039;, &#039;&#039;/&#039;&#039; (filesystem root) and &#039;&#039;swap&#039;&#039;, if &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; is used, or use &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt; script for custom partitioning. This mode may be used for development boxes, desktops, virtual servers, etc.&lt;br /&gt;
&lt;br /&gt;
In [[Data Disk Mode|&#039;&#039;&#039;data&#039;&#039;&#039; disk]] mode, disk(s) are used for data storage, not for the operating system. Runs from the media and only a &#039;&#039;/var/&#039;&#039; is created on disk.  The system itself will run from a &#039;&#039;tmpfs&#039;&#039; (RAM).  Use this mode if you only want to use the disk(s) for data, like &#039;&#039;mailspool&#039;&#039;, &#039;&#039;databases&#039;&#039;, &#039;&#039;logs&#039;&#039;, etc.&lt;br /&gt;
&lt;br /&gt;
In [[Diskless Mode|&#039;&#039;&#039;diskless&#039;&#039;&#039;]] mode, no disks are to be used. Here the entire system run from a &#039;&#039;tmpfs&#039;&#039; (RAM). [[Alpine local backup]] may still be used in this mode.&lt;br /&gt;
&lt;br /&gt;
=== How do I upgrade Alpine? ===&lt;br /&gt;
&lt;br /&gt;
To upgrade to a new stable release or edge refer to [[Upgrading Alpine Linux to a new release branch]].&lt;br /&gt;
&lt;br /&gt;
=== Why don&#039;t my cron jobs run? ===&lt;br /&gt;
{{Main|Cron}}&lt;br /&gt;
Start service &#039;&#039;crond&#039;&#039; and add it to the default runlevel:{{cmd|rc-service crond start &amp;amp;&amp;amp; rc-update add crond}}&lt;br /&gt;
&lt;br /&gt;
After that the cron daemon is started automatically on system boot and executes the scripts placed in the folders under &#039;&#039;/etc/periodic/&#039;&#039; - there are folders for &#039;&#039;15min&#039;&#039;, &#039;&#039;hourly&#039;&#039;, &#039;&#039;daily&#039;&#039;, &#039;&#039;weekly&#039;&#039; and &#039;&#039;monthly&#039;&#039; scripts.&lt;br /&gt;
&lt;br /&gt;
To check whether your scripts are likely to run, use the &#039;&#039;run-parts&#039;&#039; command, for example:{{cmd|run-parts --test /etc/periodic/15min}}&lt;br /&gt;
&lt;br /&gt;
This command will tell you what should run but will not actually execute the scripts.&lt;br /&gt;
&lt;br /&gt;
If the results of the test are not as expected, check the following:&lt;br /&gt;
&lt;br /&gt;
* Make sure the script is executable - if unsure, issue the command {{cmd|chmod +x /etc/periodic/[path/scriptname]}}&lt;br /&gt;
* Make sure the first line of your script is &amp;lt;code&amp;gt;#!/bin/sh&amp;lt;/code&amp;gt;&lt;br /&gt;
* Do not use periods on your script file names - this stops them from working; for example: {{Path|/etc/periodic/daily/myscript}} will run, but {{Path|/etc/periodic/daily/myscript.sh}} won&#039;t.&lt;br /&gt;
&lt;br /&gt;
== Time and timezones ==&lt;br /&gt;
&lt;br /&gt;
=== How do I set the local timezone? ===&lt;br /&gt;
&lt;br /&gt;
If you wish to edit the &#039;&#039;timezone&#039;&#039; (TZ) after installation, run the [[Alpine_setup_scripts#setup-timezone|setup-timezone]] script.&lt;br /&gt;
&lt;br /&gt;
== Packages ==&lt;br /&gt;
&lt;br /&gt;
=== Can you build an APK package for ...? ===&lt;br /&gt;
Please create an [https://gitlab.alpinelinux.org/alpine/aports/issues/new issue] in the [https://gitlab.alpinelinux.org bugtracker]. Prefix it with &amp;quot;package request:&amp;quot; in the title and include a short description (one-line), a URL for the home page, why you need it, and a URL for the source package.&lt;br /&gt;
&lt;br /&gt;
=== How can I build my own package? ===&lt;br /&gt;
Please see the [[Creating an Alpine package]] page.&lt;br /&gt;
&lt;br /&gt;
=== What does &amp;quot;required by: world[$pkgname]&amp;quot; mean? ===&lt;br /&gt;
&lt;br /&gt;
It means that the package you tried to install does not exist in the [[Alpine Package Keeper#Packages and Repositories|repositories]] you have configured. &lt;br /&gt;
&lt;br /&gt;
Ensure that the [[Repositories#Managing_repositories|community repository is enabled]] in the {{path|/etc/apk/repositories}} file.&lt;br /&gt;
&lt;br /&gt;
Or is the package in a [[Repositories#Tagged_repository|tagged repository]] and you forgot to suffix the package with the repo tag? Example:{{cmd|# apk add experimental-package@testing}}&lt;br /&gt;
&lt;br /&gt;
=== How can I find out if a certain package exists in Alpine? ===&lt;br /&gt;
&lt;br /&gt;
If you want to only search repositories you have configured in /etc/apk/repositories, then &amp;lt;code&amp;gt;apk search $pkgname&amp;lt;/code&amp;gt; should get you sorted. If you want to search all repositories have a look at the [https://pkgs.alpinelinux.org/ online pkg oracle]&lt;br /&gt;
&lt;br /&gt;
=== WARNING: Ignoring APKINDEX.xxxx.tar.gz ===&lt;br /&gt;
If you get &amp;lt;code&amp;gt;WARNING: Ignoring APKINDEX.xxxx.tar.gz: No such file or directory&amp;lt;/code&amp;gt; while running [[Alpine_Linux_package_management|package related tools]], check your {{Path|/etc/apk/repositories}} file.&lt;br /&gt;
&lt;br /&gt;
To check the content of the repositories file&lt;br /&gt;
{{Cmd|cat /etc/apk/repositories}}&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
{{Cmd|setup-apkrepos}}&lt;br /&gt;
&lt;br /&gt;
== Dynamic DNS ==&lt;br /&gt;
=== How do I schedule a regular dynamic DNS update? ===&lt;br /&gt;
You&#039;ll want to install the {{pkg|ez-ipupdate}} package:&lt;br /&gt;
{{cmd|apk add ez-ipupdate}}&lt;br /&gt;
&lt;br /&gt;
After that, create a new file at {{path|/etc/ez-ipupdate.conf}} with contents similar to:&lt;br /&gt;
 service-type=dyndns&lt;br /&gt;
 user=myusername:mypassword&lt;br /&gt;
 interface=eth1&lt;br /&gt;
 host=myhostname.dyndns.org&lt;br /&gt;
&lt;br /&gt;
Make the new ip cache directory:&lt;br /&gt;
{{cmd|mkdir /var/cache/ez-ipupdate&lt;br /&gt;
lbu add /var/cache/ez-ipupdate}}&lt;br /&gt;
&lt;br /&gt;
Then schedule a new cron job with this command:&lt;br /&gt;
{{cmd|echo &amp;gt;&amp;gt; /var/log/ez-ipupdate &amp;amp;&amp;amp; \&amp;lt;br /&amp;gt;/bin/date &amp;gt;&amp;gt; /var/log/ez-ipupdate &amp;amp;&amp;amp; \&amp;lt;br /&amp;gt;ez-ipupdate --config-file /etc/ez-ipupdate.conf -f -F /var/run/ez-ipupdate.pid \&amp;lt;br /&amp;gt;  --cache-file /var/cache/ez-ipupdate/ipcache --quiet &amp;gt;&amp;gt; /var/log/ez-ipupdate 2&amp;gt;&amp;amp;1}}&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to backup your settings!&lt;br /&gt;
{{cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Terminal ==&lt;br /&gt;
&lt;br /&gt;
=== How to enable/fix colors for git? ===&lt;br /&gt;
&lt;br /&gt;
The problem is not in git itself or terminal, but in the &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
Busybox’s &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt; doesn’t support &amp;lt;tt&amp;gt;-r&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;--raw-control-chars&amp;lt;/tt&amp;gt;) and &amp;lt;tt&amp;gt;-R&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;--RAW-CONTROL-CHARS&amp;lt;/tt&amp;gt;) options.&lt;br /&gt;
&lt;br /&gt;
The simplest (yet not ideal) solution is to install GNU less:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add less}}&lt;br /&gt;
&lt;br /&gt;
Additionally, for colorized diff while using verbose commit (&amp;lt;tt&amp;gt;git commit -v&amp;lt;/tt&amp;gt;), add this to shell init scripts (e.g.: {{Path|~/.profile}}):&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.profile|&amp;lt;nowiki&amp;gt;export GIT_EDITOR=vim&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Fix lacking lsusb / lspci output ===&lt;br /&gt;
{{Main|How to get regular stuff working}}&lt;br /&gt;
If you launch {{ic|lsusb}} or {{ic|lspci}} on a default installation, there&#039;s no device descriptions, and the latter doesn&#039;t exist. &lt;br /&gt;
&lt;br /&gt;
This can be fixed by installing the &#039;&#039;&#039;{{pkg|usbutils}}&#039;&#039;&#039; and &#039;&#039;&#039;{{pkg|hwdata}}&#039;&#039;&#039; tables.&lt;br /&gt;
&lt;br /&gt;
== Old questions, no longer frequently asked ==&lt;br /&gt;
&lt;br /&gt;
=== Alpine freezes during boot from Compact Flash, how can I fix? ===&lt;br /&gt;
Most Compact Flash card readers do not support proper DMA.&amp;lt;br /&amp;gt;&lt;br /&gt;
You should append &#039;&#039;&#039;nodma&#039;&#039;&#039; to the &#039;&#039;append&#039;&#039; line in {{path|syslinux.cfg}}.&lt;br /&gt;
&lt;br /&gt;
=== How do I remove the CD-ROM? ===&lt;br /&gt;
Since the modloop loopback device is on CD-ROM you cannot just run &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt;. You need to unmount the modloop first.&amp;lt;br /&amp;gt;&lt;br /&gt;
Unmounting both the modloop and the CDROM in one step can be done by executing:&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop}}&lt;br /&gt;
&lt;br /&gt;
Then it&#039;s possible to eject the CD-ROM:&lt;br /&gt;
{{Cmd|eject}}&lt;br /&gt;
&lt;br /&gt;
=== How can I install custom firmware in a diskless system? ===&lt;br /&gt;
&lt;br /&gt;
The modules and firmware are both special images which are mounted as read-only.&amp;lt;br /&amp;gt;&lt;br /&gt;
To fix this issue you can copy the firmware directory to your writeable media (cf/usb) and copy your custom firmware to it.&amp;lt;br /&amp;gt;&lt;br /&gt;
After reboot Alpine should automatically use the directory on your local storage instead of the loopback device.&lt;br /&gt;
&lt;br /&gt;
=== OpenNTPD reports an error with &amp;quot;adjtime&amp;quot; ===&lt;br /&gt;
Your log contains something like:&lt;br /&gt;
 reply from 85.214.86.126: offset 865033148.784255 delay 0.055466, next query 32s&lt;br /&gt;
 reply from 202.150.212.24: offset 865033148.779314 delay 0.400771, next query 3s&lt;br /&gt;
 adjusting local clock by 865033148.779835s                                      &lt;br /&gt;
 adjtime failed: Invalid argument    &lt;br /&gt;
&lt;br /&gt;
{{pkg|openntpd}} is supposed to make small adjustments in the time without causing time jumps.&amp;lt;br /&amp;gt;&lt;br /&gt;
If the adjustment is too big then something is clearly wrong and ntpd gives up. (its actually adjtime(3) that has a limit on how big adjustments are allowed)&lt;br /&gt;
&lt;br /&gt;
You can make ntpd set the time at startup by adding &#039;&#039;-s&#039;&#039; option to ntpd. This is done by setting &#039;&#039;&#039;NTPD_OPTS=&amp;quot;-s&amp;quot;&#039;&#039;&#039; in {{path|/etc/conf.d/ntpd}}.&lt;br /&gt;
&lt;br /&gt;
=== Using a cron job to keep the time in sync ===&lt;br /&gt;
The [[Cron#Basic_example|cron]] page explains how to run the command {{ic|ntpd -d -q -n -p uk.pool.ntp.orgA}} as a cron job.&lt;br /&gt;
&lt;br /&gt;
=== Windows clients reports an error when trying to sync ===&lt;br /&gt;
{{pkg|openntpd}} needs to run for a while before it is satisfied it is in sync.&lt;br /&gt;
Until then it will set a flag &amp;quot;clock not synchronized&amp;quot; and Windows will report an error while trying to sync with your openntpd server.&lt;br /&gt;
&lt;br /&gt;
Only thing to do is wait, do something else for 15-20mins and then check.&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:FAQ&amp;diff=32079</id>
		<title>Alpine Linux:FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:FAQ&amp;diff=32079"/>
		<updated>2026-02-19T20:31:46Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Why don&amp;#039;t I have man pages or where is the &amp;#039;man&amp;#039; command? */  1. Enhanced guidance re any man page availability for core utils, mandoc, mandoc-apropos;  2. Reordered information according to usage i.e. docs package promoted;  3. Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:filetypes.svg|64px|left|link=]]&lt;br /&gt;
&lt;br /&gt;
Alpine Linux is an independent, non-commercial, general purpose Linux distribution designed for power users who appreciate security, simplicity and resource efficiency. &lt;br /&gt;
&lt;br /&gt;
This is a list of &#039;&#039;&#039;frequently asked questions&#039;&#039;&#039; about Alpine Linux. If your question is not answered on this page, check the available [[Alpine Linux:Support|support]] options. &lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
=== Where to start? ===&lt;br /&gt;
&lt;br /&gt;
The [[Installation]] page and the [[Installation#Post-Installation|Post Installation]] section on that page, provide a basic orientation.&lt;br /&gt;
&lt;br /&gt;
A broader overview may be found on the official [https://alpinelinux.org/about About] page and at the [[Alpine Linux:Overview|wiki overview]].&lt;br /&gt;
&lt;br /&gt;
Please note that testing is safer on your own virtual machine.&lt;br /&gt;
&lt;br /&gt;
=== I have found a bug, where can I report it? ===&lt;br /&gt;
You can report it on the [https://gitlab.alpinelinux.org/groups/alpine/-/issues bugtracker], but search it first to see if the issue has already been reported.&lt;br /&gt;
&lt;br /&gt;
=== Are there any details about the releases available? ===&lt;br /&gt;
Please check the [https://alpinelinux.org/releases/ Release Branches] page for more information.&lt;br /&gt;
&lt;br /&gt;
=== What is the difference between edge and stable release branch? ===&lt;br /&gt;
&lt;br /&gt;
[[Repositories#Edge|&#039;&#039;&#039;Edge&#039;&#039;&#039;]] is the name given to the current [[Aports tree|development tree]] of Alpine Linux.  &#039;&#039;edge&#039;&#039; can be considered as &#039;&#039;&#039;rolling release version&#039;&#039;&#039; of Alpine Linux. This version contains the latest build of all available Alpine Linux packages. Those packages are updated on a regular basis. &lt;br /&gt;
&lt;br /&gt;
[[Repositories#Release Branches|Stable release branches]] are just what they sound like: initially a point-in-time snapshot of the package archives, but then maintained with bugfixes only in order to keep a stable environment. Occasionally, snapshot ISO images of the then-current state of edge are made and are available for download. Typically these are made when there are major kernel upgrades or package upgrades that require initramfs rebuilds.&lt;br /&gt;
&lt;br /&gt;
=== What architectures does Alpine Linux support? ===&lt;br /&gt;
The table below lists the architectures that are officially supported.&lt;br /&gt;
{{:Include:Architecture support matrix}}&lt;br /&gt;
Please check [https://alpinelinux.org/downloads Downloads] page for media availability on each one.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Note: Please update the above link for Architecture information . The below content to be removed later, if this redirection is acceptable to all&lt;br /&gt;
* &#039;&#039;&#039;aarch64&#039;&#039;&#039;: 64-bit ARM processors (e.g. Raspberry Pi 4)&lt;br /&gt;
* &#039;&#039;&#039;armhf&#039;&#039;&#039;: 32-bit ARMv6 processors with a floating point unit (e.g. Raspberry Pi 1) (armv6hf)&lt;br /&gt;
* &#039;&#039;&#039;armv7&#039;&#039;&#039;: 32-bit ARMv7 processors with a floating point unit (armv7hf)&lt;br /&gt;
* &#039;&#039;&#039;s390x&#039;&#039;&#039;: IBM mainframes using the z/Architecture (z196 minimum)&lt;br /&gt;
* &#039;&#039;&#039;ppc64le&#039;&#039;&#039;: 64-bit little-endian POWER devices (e.g. Raptor Talos II) (POWER8 minimum)&lt;br /&gt;
* &#039;&#039;&#039;x86&#039;&#039;&#039;: 32-bit Intel and AMD processors commonly found in older personal computers (e.g. Pentium M+). Can also run on x86_64 machines (not recommended). Requires SSE2 and CMOV.&lt;br /&gt;
* &#039;&#039;&#039;x86_64&#039;&#039;&#039;: 64-bit Intel and AMD processors commonly found in personal computers (e.g. Core i7, Ryzen 7)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How can I contribute? ===&lt;br /&gt;
You can contribute by:&lt;br /&gt;
* Using the software and giving [https://gitlab.alpinelinux.org/groups/alpine/-/issues feedback].&lt;br /&gt;
* Documenting your [https://www.alpinelinux.org Alpine Linux] experiences on this [[Main_Page|wiki]].&lt;br /&gt;
* Flag packages as outdated in the [https://pkgs.alpinelinux.org/packages package database], or even better enable release monitoring in [https://release-monitoring.org/ Anitya] for them.&lt;br /&gt;
* In many other ways.&lt;br /&gt;
Please visit the [[Contribute|Contribute page]] to read more about this topic.&lt;br /&gt;
&lt;br /&gt;
=== Why don&#039;t I have man pages or where is the &#039;man&#039; command? ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; command, the {{pkg|man-pages}} and the system&#039;s &#039;&#039;core&#039;&#039; manual pages are not installed by default. Since binary packages are thinned out and split, documentation sub-packages in the format &#039;&#039;&#039;packagename-doc&#039;&#039;&#039; are not installed by default. &lt;br /&gt;
The core utilities provided by [[BusyBox]] e.g. {{ic|ls}}, {{ic|traceroute}} and {{ic|poweroff}}) do not have individual man pages in keeping with BusyBox&#039;s minimalist design.  Instead, the man page package for BusyBox, {{pkg|busybox-doc}}, supplies a single &#039;&#039;&#039;busybox&#039;&#039;&#039; man page that lists all the available switches for those utility applets;  once &#039;&#039;&#039;busybox-doc&#039;&#039;&#039; is installed, the switches for each utility can be listed using the {{ic|--help}} option – e.g. {{ic|ls --help}} – or by scrolling through {{ic|$ man busybox}}. &lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;man pages reader&#039;&#039; called {{pkg|mandoc}}.  It is the default reader since Alpine Linux v3.12, preferred over {{pkg|man-db}} or {{pkg|man-pages}}, as it supplies a smaller, faster and more secure &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; command:&lt;br /&gt;
{{cmd|# apk add {{pkg|mandoc}}}}&lt;br /&gt;
&lt;br /&gt;
Once {{pkg|mandoc}} is installed, add documentation for the package where you need it. For example, say you installed &#039;&#039;&#039;nftables&#039;&#039;&#039;, and you now require its man page: &lt;br /&gt;
{{cmd|# apk add {{pkg|nftables-doc}}}}&lt;br /&gt;
&lt;br /&gt;
The {{pkg|docs}} meta package will immediately install the documentation sub-package for all of the currently installed packages, plus the {{pkg|mandoc}} reader, if not installed.  {{pkg|docs}} additionally ensures that documentation sub-packages are installed/removed automatically for any packages that one may add/remove in the future. &lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add docs}}&lt;br /&gt;
&lt;br /&gt;
Optionally, to be able to search all &#039;&#039;installed&#039;&#039; man pages for a given command, say, {{ic|&amp;lt;var&amp;gt;password&amp;lt;/var&amp;gt;}}, install {{pkg|mandoc-apropos}}, which supplies the &amp;lt;code&amp;gt;apropos&amp;lt;/code&amp;gt; instruction.&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add {{pkg|mandoc-apropos}}}} &lt;br /&gt;
&lt;br /&gt;
Then, search installed man pages for the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ apropos &amp;lt;var&amp;gt;password&amp;lt;/var&amp;gt;&lt;br /&gt;
chage(1) - change user password expiry information&lt;br /&gt;
expiry(1) - check and enforce password expiration policy&lt;br /&gt;
git-credential-cache(1) - Helper to temporarily store passwords in memory&lt;br /&gt;
keepassxc(1) - a modern open-source password manager&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that not all packages have a corresponding documentation package, and even when it has one, it may not be in the form of &#039;&#039;&#039;man pages&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
=== What is the difference between &#039;&#039;sys&#039;&#039;, &#039;&#039;data&#039;&#039;, and &#039;&#039;diskless&#039;&#039; when running &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;? ===&lt;br /&gt;
&lt;br /&gt;
[[System Disk Mode|&#039;&#039;&#039;sys&#039;&#039;&#039; or &#039;&#039;&#039;system&#039;&#039;&#039; disk]] mode is the traditional hard disk installation. The following partitions will be created on the disk: &#039;&#039;/boot/&#039;&#039;, &#039;&#039;/&#039;&#039; (filesystem root) and &#039;&#039;swap&#039;&#039;, if &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; is used, or use &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt; script for custom partitioning. This mode may be used for development boxes, desktops, virtual servers, etc.&lt;br /&gt;
&lt;br /&gt;
In [[Data Disk Mode|&#039;&#039;&#039;data&#039;&#039;&#039; disk]] mode, disk(s) are used for data storage, not for the operating system. Runs from the media and only a &#039;&#039;/var/&#039;&#039; is created on disk.  The system itself will run from a &#039;&#039;tmpfs&#039;&#039; (RAM).  Use this mode if you only want to use the disk(s) for data, like &#039;&#039;mailspool&#039;&#039;, &#039;&#039;databases&#039;&#039;, &#039;&#039;logs&#039;&#039;, etc.&lt;br /&gt;
&lt;br /&gt;
In [[Diskless Mode|&#039;&#039;&#039;diskless&#039;&#039;&#039;]] mode, no disks are to be used. Here the entire system run from a &#039;&#039;tmpfs&#039;&#039; (RAM). [[Alpine local backup]] may still be used in this mode.&lt;br /&gt;
&lt;br /&gt;
=== How do I upgrade Alpine? ===&lt;br /&gt;
&lt;br /&gt;
To upgrade to a new stable release or edge refer to [[Upgrading Alpine Linux to a new release branch]].&lt;br /&gt;
&lt;br /&gt;
=== Why don&#039;t my cron jobs run? ===&lt;br /&gt;
{{Main|Cron}}&lt;br /&gt;
Start service &#039;&#039;crond&#039;&#039; and add it to the default runlevel:{{cmd|rc-service crond start &amp;amp;&amp;amp; rc-update add crond}}&lt;br /&gt;
&lt;br /&gt;
After that the cron daemon is started automatically on system boot and executes the scripts placed in the folders under &#039;&#039;/etc/periodic/&#039;&#039; - there are folders for &#039;&#039;15min&#039;&#039;, &#039;&#039;hourly&#039;&#039;, &#039;&#039;daily&#039;&#039;, &#039;&#039;weekly&#039;&#039; and &#039;&#039;monthly&#039;&#039; scripts.&lt;br /&gt;
&lt;br /&gt;
To check whether your scripts are likely to run, use the &#039;&#039;run-parts&#039;&#039; command, for example:{{cmd|run-parts --test /etc/periodic/15min}}&lt;br /&gt;
&lt;br /&gt;
This command will tell you what should run but will not actually execute the scripts.&lt;br /&gt;
&lt;br /&gt;
If the results of the test are not as expected, check the following:&lt;br /&gt;
&lt;br /&gt;
* Make sure the script is executable - if unsure, issue the command {{cmd|chmod +x /etc/periodic/[path/scriptname]}}&lt;br /&gt;
* Make sure the first line of your script is &amp;lt;code&amp;gt;#!/bin/sh&amp;lt;/code&amp;gt;&lt;br /&gt;
* Do not use periods on your script file names - this stops them from working; for example: {{Path|/etc/periodic/daily/myscript}} will run, but {{Path|/etc/periodic/daily/myscript.sh}} won&#039;t.&lt;br /&gt;
&lt;br /&gt;
== Time and timezones ==&lt;br /&gt;
&lt;br /&gt;
=== How do I set the local timezone? ===&lt;br /&gt;
&lt;br /&gt;
If you wish to edit the &#039;&#039;timezone&#039;&#039; (TZ) after installation, run the [[Alpine_setup_scripts#setup-timezone|setup-timezone]] script.&lt;br /&gt;
&lt;br /&gt;
== Packages ==&lt;br /&gt;
&lt;br /&gt;
=== Can you build an APK package for ...? ===&lt;br /&gt;
Please create an [https://gitlab.alpinelinux.org/alpine/aports/issues/new issue] in the [https://gitlab.alpinelinux.org bugtracker]. Prefix it with &amp;quot;package request:&amp;quot; in the title and include a short description (one-line), a URL for the home page, why you need it, and a URL for the source package.&lt;br /&gt;
&lt;br /&gt;
=== How can I build my own package? ===&lt;br /&gt;
Please see the [[Creating an Alpine package]] page.&lt;br /&gt;
&lt;br /&gt;
=== What does &amp;quot;required by: world[$pkgname]&amp;quot; mean? ===&lt;br /&gt;
&lt;br /&gt;
It means that the package you tried to install does not exist in the [[Alpine Package Keeper#Packages and Repositories|repositories]] you have configured. &lt;br /&gt;
&lt;br /&gt;
Ensure that the [[Repositories#Managing_repositories|community repository is enabled]] in the {{path|/etc/apk/repositories}} file.&lt;br /&gt;
&lt;br /&gt;
Or is the package in a [[Repositories#Tagged_repository|tagged repository]] and you forgot to suffix the package with the repo tag? Example:{{cmd|# apk add experimental-package@testing}}&lt;br /&gt;
&lt;br /&gt;
=== How can I find out if a certain package exists in Alpine? ===&lt;br /&gt;
&lt;br /&gt;
If you want to only search repositories you have configured in /etc/apk/repositories, then &amp;lt;code&amp;gt;apk search $pkgname&amp;lt;/code&amp;gt; should get you sorted. If you want to search all repositories have a look at the [https://pkgs.alpinelinux.org/ online pkg oracle]&lt;br /&gt;
&lt;br /&gt;
=== WARNING: Ignoring APKINDEX.xxxx.tar.gz ===&lt;br /&gt;
If you get &amp;lt;code&amp;gt;WARNING: Ignoring APKINDEX.xxxx.tar.gz: No such file or directory&amp;lt;/code&amp;gt; while running [[Alpine_Linux_package_management|package related tools]], check your {{Path|/etc/apk/repositories}} file.&lt;br /&gt;
&lt;br /&gt;
To check the content of the repositories file&lt;br /&gt;
{{Cmd|cat /etc/apk/repositories}}&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
{{Cmd|setup-apkrepos}}&lt;br /&gt;
&lt;br /&gt;
== Dynamic DNS ==&lt;br /&gt;
=== How do I schedule a regular dynamic DNS update? ===&lt;br /&gt;
You&#039;ll want to install the {{pkg|ez-ipupdate}} package:&lt;br /&gt;
{{cmd|apk add ez-ipupdate}}&lt;br /&gt;
&lt;br /&gt;
After that, create a new file at {{path|/etc/ez-ipupdate.conf}} with contents similar to:&lt;br /&gt;
 service-type=dyndns&lt;br /&gt;
 user=myusername:mypassword&lt;br /&gt;
 interface=eth1&lt;br /&gt;
 host=myhostname.dyndns.org&lt;br /&gt;
&lt;br /&gt;
Make the new ip cache directory:&lt;br /&gt;
{{cmd|mkdir /var/cache/ez-ipupdate&lt;br /&gt;
lbu add /var/cache/ez-ipupdate}}&lt;br /&gt;
&lt;br /&gt;
Then schedule a new cron job with this command:&lt;br /&gt;
{{cmd|echo &amp;gt;&amp;gt; /var/log/ez-ipupdate &amp;amp;&amp;amp; \&amp;lt;br /&amp;gt;/bin/date &amp;gt;&amp;gt; /var/log/ez-ipupdate &amp;amp;&amp;amp; \&amp;lt;br /&amp;gt;ez-ipupdate --config-file /etc/ez-ipupdate.conf -f -F /var/run/ez-ipupdate.pid \&amp;lt;br /&amp;gt;  --cache-file /var/cache/ez-ipupdate/ipcache --quiet &amp;gt;&amp;gt; /var/log/ez-ipupdate 2&amp;gt;&amp;amp;1}}&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to backup your settings!&lt;br /&gt;
{{cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Terminal ==&lt;br /&gt;
&lt;br /&gt;
=== How to enable/fix colors for git? ===&lt;br /&gt;
&lt;br /&gt;
The problem is not in git itself or terminal, but in the &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
Busybox’s &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt; doesn’t support &amp;lt;tt&amp;gt;-r&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;--raw-control-chars&amp;lt;/tt&amp;gt;) and &amp;lt;tt&amp;gt;-R&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;--RAW-CONTROL-CHARS&amp;lt;/tt&amp;gt;) options.&lt;br /&gt;
&lt;br /&gt;
The simplest (yet not ideal) solution is to install GNU less:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add less}}&lt;br /&gt;
&lt;br /&gt;
Additionally, for colorized diff while using verbose commit (&amp;lt;tt&amp;gt;git commit -v&amp;lt;/tt&amp;gt;), add this to shell init scripts (e.g.: {{Path|~/.profile}}):&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.profile|&amp;lt;nowiki&amp;gt;export GIT_EDITOR=vim&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Fix lacking lsusb / lspci output ===&lt;br /&gt;
{{Main|How to get regular stuff working}}&lt;br /&gt;
If you launch {{ic|lsusb}} or {{ic|lspci}} on a default installation, there&#039;s no device descriptions, and the latter doesn&#039;t exist. &lt;br /&gt;
&lt;br /&gt;
This can be fixed by installing the &#039;&#039;&#039;{{pkg|usbutils}}&#039;&#039;&#039; and &#039;&#039;&#039;{{pkg|hwdata}}&#039;&#039;&#039; tables.&lt;br /&gt;
&lt;br /&gt;
== Old questions, no longer frequently asked ==&lt;br /&gt;
&lt;br /&gt;
=== Alpine freezes during boot from Compact Flash, how can I fix? ===&lt;br /&gt;
Most Compact Flash card readers do not support proper DMA.&amp;lt;br /&amp;gt;&lt;br /&gt;
You should append &#039;&#039;&#039;nodma&#039;&#039;&#039; to the &#039;&#039;append&#039;&#039; line in {{path|syslinux.cfg}}.&lt;br /&gt;
&lt;br /&gt;
=== How do I remove the CD-ROM? ===&lt;br /&gt;
Since the modloop loopback device is on CD-ROM you cannot just run &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt;. You need to unmount the modloop first.&amp;lt;br /&amp;gt;&lt;br /&gt;
Unmounting both the modloop and the CDROM in one step can be done by executing:&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop}}&lt;br /&gt;
&lt;br /&gt;
Then it&#039;s possible to eject the CD-ROM:&lt;br /&gt;
{{Cmd|eject}}&lt;br /&gt;
&lt;br /&gt;
=== How can I install custom firmware in a diskless system? ===&lt;br /&gt;
&lt;br /&gt;
The modules and firmware are both special images which are mounted as read-only.&amp;lt;br /&amp;gt;&lt;br /&gt;
To fix this issue you can copy the firmware directory to your writeable media (cf/usb) and copy your custom firmware to it.&amp;lt;br /&amp;gt;&lt;br /&gt;
After reboot Alpine should automatically use the directory on your local storage instead of the loopback device.&lt;br /&gt;
&lt;br /&gt;
=== OpenNTPD reports an error with &amp;quot;adjtime&amp;quot; ===&lt;br /&gt;
Your log contains something like:&lt;br /&gt;
 reply from 85.214.86.126: offset 865033148.784255 delay 0.055466, next query 32s&lt;br /&gt;
 reply from 202.150.212.24: offset 865033148.779314 delay 0.400771, next query 3s&lt;br /&gt;
 adjusting local clock by 865033148.779835s                                      &lt;br /&gt;
 adjtime failed: Invalid argument    &lt;br /&gt;
&lt;br /&gt;
{{pkg|openntpd}} is supposed to make small adjustments in the time without causing time jumps.&amp;lt;br /&amp;gt;&lt;br /&gt;
If the adjustment is too big then something is clearly wrong and ntpd gives up. (its actually adjtime(3) that has a limit on how big adjustments are allowed)&lt;br /&gt;
&lt;br /&gt;
You can make ntpd set the time at startup by adding &#039;&#039;-s&#039;&#039; option to ntpd. This is done by setting &#039;&#039;&#039;NTPD_OPTS=&amp;quot;-s&amp;quot;&#039;&#039;&#039; in {{path|/etc/conf.d/ntpd}}.&lt;br /&gt;
&lt;br /&gt;
=== Using a cron job to keep the time in sync ===&lt;br /&gt;
The [[Cron#Basic_example|cron]] page explains how to run the command {{ic|ntpd -d -q -n -p uk.pool.ntp.orgA}} as a cron job.&lt;br /&gt;
&lt;br /&gt;
=== Windows clients reports an error when trying to sync ===&lt;br /&gt;
{{pkg|openntpd}} needs to run for a while before it is satisfied it is in sync.&lt;br /&gt;
Until then it will set a flag &amp;quot;clock not synchronized&amp;quot; and Windows will report an error while trying to sync with your openntpd server.&lt;br /&gt;
&lt;br /&gt;
Only thing to do is wait, do something else for 15-20mins and then check.&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Configure_a_Wireguard_interface_(wg)&amp;diff=32078</id>
		<title>Configure a Wireguard interface (wg)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Configure_a_Wireguard_interface_(wg)&amp;diff=32078"/>
		<updated>2026-02-19T16:26:44Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1.  Added stubs: &amp;#039;Alternative Integrations into the Network Stack&amp;#039;, &amp;#039;Tools&amp;#039; and &amp;#039;WireGuard Monitoring and Management&amp;#039;; 2. /* See also */ Added Prometheus/Grafana/Alerts setup link at medium.com.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/WireGuard WireGuard] multiple platform vpn solution. WireGuard itself is now integrated into the linux kernel since v5.6. Only the userland configuration tools are required.&lt;br /&gt;
&lt;br /&gt;
== Installation  ==&lt;br /&gt;
&lt;br /&gt;
The most straightforward method to configure WireGuard is to use the tool &amp;lt;code&amp;gt;wg-quick&amp;lt;/code&amp;gt; available in the package {{pkg|wireguard-tools-wg-quick}}. &lt;br /&gt;
&lt;br /&gt;
Install the meta package {{pkg|wireguard-tools}} to install the necessary WireGuard packages  and {{pkg|iptables}} as follows: {{Cmd|# apk add wireguard-tools iptables}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Create Server Keys and Interface Config ===&lt;br /&gt;
&lt;br /&gt;
Create a server private and public key: {{Cmd|&amp;lt;nowiki&amp;gt;# wg genkey | tee server.privatekey | wg pubkey &amp;gt; server.publickey&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Remove any permissions on the file for users and groups other than the root user to ensure that only it can access the private key: {{Cmd|&amp;lt;nowiki&amp;gt;# chmod go= server.privatekey&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Then, we create a new config file {{Path|/etc/wireguard/wg0.conf}} using these new keys as follows:{{Cat|/etc/wireguard/wg0.conf|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[Interface]&lt;br /&gt;
Address = 192.168.2.1/24, fddd::ffff/64&lt;br /&gt;
ListenPort = 45340&lt;br /&gt;
PrivateKey = &amp;lt;server private key value&amp;gt; # the key from the previously generated privatekey file&lt;br /&gt;
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;iptables -A FORWARD -o %i -j ACCEPT; ip6tables -A FORWARD -i %i -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;ip6tables -A FORWARD -o %i -j ACCEPT&lt;br /&gt;
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE;iptables -D FORWARD -o %i -j ACCEPT; ip6tables -D FORWARD -i %i -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE;ip6tables -D FORWARD -o %i -j ACCEPT&lt;br /&gt;
 &lt;br /&gt;
[Peer]&lt;br /&gt;
PublicKey = &amp;lt;client public key value&amp;gt; # obtained from client device via wireguard connection setup process&lt;br /&gt;
AllowedIPs = 192.168.2.2/32, fddd::1/128&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The PostUp and PostDown iptable rules forward traffic from the wg0 subnet (192.168.2.1/24) to the lan subnet on interface eth0. Refer to [https://github.com/pirate/wireguard-docs#user-content-config-reference this WireGuard documentation] for information on adding peers to the config file.&lt;br /&gt;
&lt;br /&gt;
Bring up the new {{ic|wg0}} interface:{{Cmd|# wg-quick up wg0}}&lt;br /&gt;
&lt;br /&gt;
To take it down, we can use &amp;lt;code&amp;gt;wg-quick down wg0&amp;lt;/code&amp;gt; which will clean up the interface and remove the iptables rules.&lt;br /&gt;
&lt;br /&gt;
{{Note|If running in a Docker container, you will need to run with &amp;lt;code&amp;gt;--cap-add{{=}}NET_ADMIN&amp;lt;/code&amp;gt; to modify your interfaces.}}&lt;br /&gt;
&lt;br /&gt;
=== Use with network interfaces ===&lt;br /&gt;
&lt;br /&gt;
To enable connecting with Wireguard on boot, open your {{Path|/etc/network/interfaces}} and add this information after your auto other network interfaces as follows:{{Cat|/etc/network/interfaces|&amp;lt;nowiki&amp;gt;...&lt;br /&gt;
auto wg0&lt;br /&gt;
iface wg0 inet static&lt;br /&gt;
pre-up wg-quick up /etc/wireguard/wg0.conf&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Service configuration ===&lt;br /&gt;
&lt;br /&gt;
Since Alpine 3.20, {{pkg|wireguard-tools-openrc}} package provides an OpenRC initd service file. &lt;br /&gt;
&lt;br /&gt;
To use this, install the package:{{Cmd|# apk add wireguard-tools-openrc }}&lt;br /&gt;
&lt;br /&gt;
To use the WireGuard OpenRC script with {{ic|wg-quick.wg0}}, create a symbolic link to it with the configuration name as follows:{{Cmd|# ln -s /etc/init.d/wg-quick /etc/init.d/wg-quick.wg0}}&lt;br /&gt;
&lt;br /&gt;
Add the {{ic|wg-quick.wg0}} service to the default runlevel:{{Cmd|# rc-update add wg-quick.wg0}}&lt;br /&gt;
To start|stop|restart the [[OpenRC]] service:{{Cmd|# rc-service wg-quick.wg0 start}}&lt;br /&gt;
&lt;br /&gt;
=== Enable IP Forwarding ===&lt;br /&gt;
&lt;br /&gt;
With a NAT destination rule in place on your router, you should be able connect to the wireguard instance and access the host. However, if you intend for peers to be able to access external resources (including the internet), you will need to enable ip forwarding.&lt;br /&gt;
&lt;br /&gt;
Edit the file {{Path|/etc/sysctl.conf}} or a &amp;lt;code&amp;gt;.conf&amp;lt;/code&amp;gt; file under {{Path|/etc/sysctl.d/}} folder add the following line as follows:{{Cat|/etc/sysctl.conf|&lt;br /&gt;
net.ipv4.ip_forward {{=}} 1&lt;br /&gt;
net.ipv6.conf.all.forwarding {{=}} 1&lt;br /&gt;
net.ipv6.conf.default.forwarding {{=}} 1}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add the sysctl service to run at boot:{{Cmd|# rc-update add sysctl}}&lt;br /&gt;
&lt;br /&gt;
Then either reboot or run {{ic|# sysctl -p /etc/sysctl.conf}} to reload the settings. To ensure forwarding is turned on, run {{ic|# sysctl -a | grep ip_forward}} and ensure &amp;lt;Code&amp;gt;net.ipv4.ip_forward&amp;lt;/code&amp;gt; is set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the file {{Path|/etc/conf.d/iptables}}, Change the setting as follows:{{Cat|/etc/conf.d/iptables|...&lt;br /&gt;
IPFORWARD{{=}}&amp;quot;yes&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
== Running with modloop ==&lt;br /&gt;
&lt;br /&gt;
If you are running [[Diskless Mode]] i.e from a RAM disk, you can&#039;t modify the modloop. &lt;br /&gt;
&lt;br /&gt;
You can get around it by unpacking the modloop, mounting the unpacked modules folder, then installing WireGuard. &lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 apk add squashfs-tools # install squashfs tools to unpack modloop&lt;br /&gt;
 unsquashfs -d /root/squash /lib/modloop-lts # unpack modloop to root dir&lt;br /&gt;
 umount /.modloop # unmount existing modloop&lt;br /&gt;
 mount /root/squash/ /.modloop/ # mount unpacked modloop&lt;br /&gt;
 apk del wireguard-lts # uninstall previous WireGuard install&lt;br /&gt;
 apk add wireguard-lts&lt;br /&gt;
 apk add wireguard-tools&lt;br /&gt;
&lt;br /&gt;
You can repack the squash filesystem or put this script in the /etc/local.d/ path so it runs at boot-up.&lt;br /&gt;
&lt;br /&gt;
== Preventing leaks ==&lt;br /&gt;
&lt;br /&gt;
When using a private network over Wireguard, it may be desirable to prevent traffic from leaking onto other networks with the same range (e.g.: a Wi-Fi network using the same range).&lt;br /&gt;
&lt;br /&gt;
Suppose we are using the network &amp;lt;code&amp;gt;fd00:feed:c0de::&amp;lt;/code&amp;gt; over Wireguard. To prevent leaks using [[nftables]], use the following &amp;lt;code&amp;gt;/etc/nftables.d/private-network.nft&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 #!/usr/sbin/nft -f&lt;br /&gt;
 &lt;br /&gt;
 table inet filter {&lt;br /&gt;
   chain output {&lt;br /&gt;
     type filter hook output priority 0;&lt;br /&gt;
 &lt;br /&gt;
     # Allow traffic to fd00:feed:c0de::1 only via wg0.&lt;br /&gt;
     ip6 daddr fd00:feed:c0de::1 oifname &amp;quot;wg0&amp;quot; accept&lt;br /&gt;
 &lt;br /&gt;
     # Drop all other attempts to reach fd00:feed:c0de::1.&lt;br /&gt;
     ip6 daddr fd00:feed:c0de::1 drop&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Alternative Integrations into the Network Stack ==&lt;br /&gt;
{{Expand|Contributions welcome.  Thank you!}}&lt;br /&gt;
&lt;br /&gt;
=== ConnMan Wireguard ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|connman-wireguard}}&#039;&#039;&#039;: An integration plugin enabling ConnMan management of WireGuard interfaces.&lt;br /&gt;
&lt;br /&gt;
=== ifupdown-ng-wireguard ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|ifupdown-ng-wireguard}}&#039;&#039;&#039;: Supplies a declarative WireGuard interface for &#039;&#039;&#039;ifupdown-ng&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== wireguard-go ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|wireguard-go}}&#039;&#039;&#039;: A userspace implementation of WireGuard in &#039;&#039;&#039;go&#039;&#039;&#039;, not used by default in Alpine Linux except in containerized or restricted environments where kernel module loading is not possible. It can be used as a fallback on older kernels that do not offer WireGuard support. &lt;br /&gt;
&lt;br /&gt;
== Tools == &lt;br /&gt;
{{Expand|Contributions are encouraged.}}&lt;br /&gt;
&lt;br /&gt;
=== Tailscale and NetBird ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|tailscale}}&#039;&#039;&#039;, &#039;&#039;&#039;{{Pkg|netbird}}&#039;&#039;&#039;: Mesh VPNs built over WireGuard that streamline peer discovery and access control.&lt;br /&gt;
&lt;br /&gt;
=== Rosenpass ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|rosenpass}}&#039;&#039;&#039;: Verified, post-quantum key exchange tool.&lt;br /&gt;
&lt;br /&gt;
=== Innernet ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|innernet}}&#039;&#039;&#039;:  A private network based on WireGuard using centralized key management.  Currently in testing repository as of February 2026:  test by [[Repositories#Using_testing_repository|enabling and tagging the testing repository]] and installing as {{ic|innernet@testing}}.  &lt;br /&gt;
&lt;br /&gt;
=== py3-wgconfig ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|py3-wgconfig}}&#039;&#039;&#039;:  Python library to parse and modify WireGuard config files that preserves comments.  Currently in testing repository as of February 2026:  ensure that the [[Repositories#Using_testing_repository|the testing repo is enabled and tagged]], and install as {{ic|py3-wgconfig@testing}}. &lt;br /&gt;
&lt;br /&gt;
=== WireGuard Bash Completion ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|wireguard-tools-bash-completion}}&#039;&#039;&#039;: Enables tab completion in bash for {{Pkg|wg}} and {{Pkg|wg-quick}}.&lt;br /&gt;
&lt;br /&gt;
== WireGuard Monitoring and Management ==&lt;br /&gt;
{{Expand|Contributions are encouraged.}}&lt;br /&gt;
&lt;br /&gt;
=== Prometheus Wireguard Exporter ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|prometheus-wireguard-exporter}}&#039;&#039;&#039;: To monitor active peers,  traffic.  Rust-based, and must run with root privileges or with {{ic|CAP_NET_ADMIN}}.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/pirate/wireguard-docs WireGuard documentation]&lt;br /&gt;
* [https://medium.com/nerd-for-tech/wireguard-vpn-monitoring-alerting-e1e1d1eaaa4e Setting up Prometheus WireGuard exporter, Grafana Dashboard, Alerts Manager.]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&amp;diff=32072</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=32072"/>
		<updated>2026-02-19T06:36:09Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Window managers */ Added mangowc;   removed spurious reference in a Pkg template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&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;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine Linux&#039;&#039;&#039; has no official desktop although setting up a graphical environment is proposed in the [[Installation#Post-Installation|post-installation]] guide.  Alpine Linux desktops may meet the needs for &#039;&#039;general&#039;&#039; daily desktop use:-&lt;br /&gt;
* Fewer packages still require [https://www.gnu.org/software/libc/ glibc], as numerous popular applications are now available here on [https://musl.libc.org/ musl]:  {{Pkg|libreoffice*}}, {{Pkg|chromium*}}, [[Firefox]], etc&lt;br /&gt;
* Several Alpine Linux desktop environments have been benchmarked to be competitive for both [https://everybytecounts.org/#desktop-environment-comparison speed and memory]&lt;br /&gt;
* Arguably, there is a reduced attack surface through the use of a comparatively lightweight &#039;&#039;&#039;musl&#039;&#039;&#039; and [[BusyBox]] system core&lt;br /&gt;
&lt;br /&gt;
All window managers and desktop environments that are available in Alpine Linux are listed on this page. A quick installation using the [[Alpine_setup_scripts#setup-desktop|setup-desktop]] script is available for several [[Setup-desktop|desktops]]. &lt;br /&gt;
&lt;br /&gt;
{{Tip|For servers, consider using [[Alpine_Configuration_Framework_Design|Alpine Configuration Framework (ACF)]] for security considerations in that use case.}}&lt;br /&gt;
&lt;br /&gt;
== Desktop environments ==&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;desktop environment&#039;&#039; (DE) is made of a bundle of programs that share a common &#039;&#039;graphical user interface&#039;&#039; (GUI), sometimes described as a &#039;&#039;graphical shell&#039;&#039;. A desktop environment typically consists of icons, windows, toolbars, folders, wallpapers and desktop widgets, and might also provide drag-and-drop functionality.&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|budgie*}}&lt;br /&gt;
* [[COSMIC]]&lt;br /&gt;
* [[GNOME]]&lt;br /&gt;
* [[KDE|KDE Plasma]]&lt;br /&gt;
* {{Pkg|lomiri*|arch=}}&lt;br /&gt;
* [[Lumina]]&lt;br /&gt;
* [[LXQt]]&lt;br /&gt;
* [[MATE]]&lt;br /&gt;
* [[Xfce]]&lt;br /&gt;
&lt;br /&gt;
=== Mobile/tablet UI ===&lt;br /&gt;
Certain desktop environments have been ported for use as &#039;&#039;mobile user interfaces&#039;&#039; (UI) while other mobile/tablet UIs may have been developed using other existing unix toolkits.  &#039;&#039;Convergent desktop environments&#039;&#039; are designed with a view to be consistent regardless of the platform used (pc, mobile, tablet, etc) such as the aforementioned &#039;&#039;&#039;lomiri&#039;&#039;&#039; environment.&lt;br /&gt;
* {{Pkg|phosh*}} - Wayland shell for GNOME on [https://phosh.mobi/ mobile devices].&lt;br /&gt;
* {{Pkg|plasma-mobile*}} - [https://plasma-mobile.org/ Mobile UI using a KDE Plasma foundation].&lt;br /&gt;
* {{Pkg|sxmo*}} - [https://sxmo.org/ Minimalist mobile Linux environment.]&lt;br /&gt;
&lt;br /&gt;
== Window managers ==&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;window manager&#039;&#039; is software that controls the placement and appearance of windows within a windowing system in a graphical user interface. In the case of [[Wayland]], these are called &#039;&#039;compositors&#039;&#039; because they additionally perform the task of a &#039;&#039;compositing window manager&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Almost all components of a desktop need to be added manually by the user.  Both [[Alpine_Linux:Glossary#S|stacking]] (a.k.a. &#039;&#039;floating&#039;&#039;) and [[Alpine_Linux:Glossary#T|tiling]]/&#039;&#039;dynamic&#039;&#039; layouts are commonly used for window management.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;&amp;quot;&lt;br /&gt;
! WM Name !! Protocol!! Style !! Toolkit!!class=&amp;quot;unsortable&amp;quot;|Inspiration &lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|2bwm|arch=}} || X11 || Stacking || C/Roff&lt;br /&gt;
 || [https://www.hack.org/~mc/hacks/mcwm mcwm]&lt;br /&gt;
|-&lt;br /&gt;
| [[AwesomeWM|Awesome]] ||X11  || Tiling || Lua ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|berry|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|bspwm|arch=}} || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
|  {{Pkg|cage |arch=}} || Wayland || Kiosk || C/wlroots || {{Pkg|ratpoison|arch=}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|cagebreak|arch=}} || Wayland || Tiling ||C/wlroots || {{Pkg|ratpoison|arch=}}, {{Pkg|cage|arch=}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|compiz|arch=}} || X11 || Compositing || C++/C/Python || &lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|cwm|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|dk|arch=}} || X11 || Tiling || C || {{Pkg|dwm|arch=}}, {{Pkg|bspwm|arch=}}, [https://xmonad.org/ xmonad]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|dwl|arch=}}  || Wayland || Tiling || C/wlroots||[[dwm]]&lt;br /&gt;
|-&lt;br /&gt;
| [[dwm]] || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Fluxbox]] || X11 || Stacking || C++ || [https://sourceforge.net/projects/blackboxwm/ blackbox]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|flwm|arch=}} || X11 || Stacking || C++/FLTK || [https://all-day-breakfast.com/wm2/ wm2]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|gamescope|arch=}} || X11/Wayland || Compositing || C++/C/Lua || &lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|goomwwm||-&lt;br /&gt;
| {{Pkg|icewm|arch=}} || X11 || Stacking || C++/C/M4 ||&lt;br /&gt;
arch=}}  || X11 || Stacking || C/Roff ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|herbstluftwm|arch=}} || X11 || Tiling || C++ ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Hyprland]] || Wayland || Tiling || C++ ||&lt;br /&gt;
|-&lt;br /&gt;
| [[I3wm|i3]] || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|icewm|arch=}} || X11 || Stacking || C++/C/M4 ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|jwm|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|kwin|arch=}} || X11/Wayland || Compositing || C++ ||&lt;br /&gt;
|-&lt;br /&gt;
| [[LabWC]] || Wayland || Stacking || C/wlroots||[[Openbox]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|mangowc|arch=}} || Wayland || Tiling || C/Nix/other || {{Pkg|dwl|arch=}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|marco|arch=}} || X11 || Stacking || C || {{Pkg|metacity|arch=}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|metacity|arch=}} || X11 || Compositing || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|mutter|arch=}} || X11/Wayland || Compositing || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|mwm|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|niri|arch=}} || Wayland || Tiling || Rust/GLSL/other || [https://github.com/paperwm/PaperWM PaperWM]&lt;br /&gt;
|-&lt;br /&gt;
| [[Openbox]] || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|pekwm|arch=}} || X11 || Stacking || C++/CMake/Perl/C || [http://sapphire.sourceforge.net/ aewm++]&lt;br /&gt;
|-&lt;br /&gt;
| [[Qtile]] || X11/Wayland || Tiling || Python ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|ratpoison|arch=}}  || X11 || Kiosk || C || &lt;br /&gt;
|-&lt;br /&gt;
| [[River|river-classic/River]] || Wayland || Tiling || Zig || [[dwm]], [https://xmonad.org/ xmonad]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|spectrwm |arch=}}  || X11 || Tiling || C||  [https://xmonad.org/ xmonad], [[dwm]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Sway]] || Wayland || Tiling || C/wlroots || [[I3wm|i3]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|sxmo-dwm|arch=}} || X11 || Tiling || C || {{Pkg|dwm|arch=}} &lt;br /&gt;
|-&lt;br /&gt;
| [[twm]] || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|wayfire|arch=}} || Wayland || Stacking || C++/wlroots || {{Pkg|compiz|arch=}} &lt;br /&gt;
|-&lt;br /&gt;
| [[Weston]] || Wayland || Stacking ||  C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|windowmaker|arch=}} || X11 || Stacking || C/Shell/M4/Perl/Makefile/Emacs Lisp/other || NeXTSTEP&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|xfwm4|arch=}} || X11 || Compositing || C/Makefile/Meson/other || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Installation#Post-Installation|Post Installation]]&lt;br /&gt;
* [[Wayland]]&lt;br /&gt;
* [[Xorg]]&lt;br /&gt;
* [[Display manager]]&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:Desktop Environments]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Compositor]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&amp;diff=32062</id>
		<title>Alpine Package Keeper</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&amp;diff=32062"/>
		<updated>2026-02-18T03:01:21Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. /*  Check file ownership */ Enhanced &amp;#039;apk info --who-owns&amp;#039; guidance;  indicated that &amp;#039;/usr&amp;#039; needs to be prepended on &amp;#039;&amp;#039;/usr merge&amp;#039;&amp;#039; systems;  2. /* apk fix */  Added that &amp;#039;apk fix&amp;#039; will not fix packages if the repo version does not match the installed version;  consider &amp;#039;apk upgrade --available&amp;#039;, if applicable.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--For searching: apk, APK--&amp;gt;&lt;br /&gt;
{{TOC right}}&lt;br /&gt;
This page documents the Alpine Package Keeper(APK), the package manager in Alpine Linux. Refer to the excellent guide [https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html Working with APK] from Alpine Linux documentation project to learn the basics quickly. &lt;br /&gt;
&lt;br /&gt;
[[Software management#Graphical software manager|Graphical software managers]] can be used for certain basic package management tasks like adding/removing and upgrading packages.&lt;br /&gt;
&lt;br /&gt;
Package management in RAM-based installs like [[Installation#Diskless_Mode|Diskless]] mode and [[Data Disk Mode|Data disk]] mode require [[#Package management in Diskless mode|additional step using lbu]]. &lt;br /&gt;
&lt;br /&gt;
== apk v3 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Add {{Pill_Clickable||v3 only|green|palegreen|right|Alpine Package Keeper#apk_v3}} in every section which deals with apk v3 only feature.This section and associated pill templates are needed until v3.22 reaches EOL on 2027-05-01. --&amp;gt;&lt;br /&gt;
{{Pill_clickable||v3 only|green|palegreen|right|Release Notes for Alpine 3.23.0#apk-tools_v3}}&lt;br /&gt;
With the release of Alpine Linux [[Release Notes for Alpine 3.23.0|v3.23]], the Alpine package manager has transitioned to [https://gitlab.alpinelinux.org/alpine/apk-tools/-/releases/v3.0.0 apk-tools v3], but the index and package formats are still at v2. apk v3 targets backwards compatibility and new features are flagged on the relevant sections of this page as seen on the right side. The diff output of the documentation between V2 and V3 is [[Apk/apkv3 doc diff|available here]] for reference.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The {{pkg|apk-tools}} provides &#039;&#039;&#039;apk&#039;&#039;&#039; and it supports the following operations:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:black; color:white&amp;quot;  colspan=2 align=center |Package installation and removal&lt;br /&gt;
|-&lt;br /&gt;
|[[#Add a Package|add]]  || Add or modify constraints in [[#World|WORLD]] and commit changes&lt;br /&gt;
|-&lt;br /&gt;
|[[#Remove a Package|del]] || Remove constraints from [[#World|WORLD]] and commit changes&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:black; color:white&amp;quot;  colspan=2 align=center |System maintenance&lt;br /&gt;
|-&lt;br /&gt;
|[[#apk fix|fix ]]    || Fix, reinstall or upgrade packages without modifying [[#World|WORLD]]&lt;br /&gt;
|-&lt;br /&gt;
|[[#Update Package list|update]]|| Update repository indexes&lt;br /&gt;
|-&lt;br /&gt;
|[[#Upgrade a Running System|upgrade]]|| Install upgrades available from repositories&lt;br /&gt;
|-&lt;br /&gt;
|[[#Local Cache|cache]]  || Manage the local package cache&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:black; color:white&amp;quot;  colspan=2 align=center |Querying package information&lt;br /&gt;
|-&lt;br /&gt;
|[[#apk query|query]]   || Query information about packages by various criteria&lt;br /&gt;
|-&lt;br /&gt;
|[[#Listing installed packages|list]] || List packages matching a pattern or other criteria&lt;br /&gt;
|-&lt;br /&gt;
|[[#apk dot|dot]]   || Render dependencies as [https://graphviz.org/ graphviz] graphs&lt;br /&gt;
|-&lt;br /&gt;
|[[#apk policy|policy]]|| Show repository policy for packages&lt;br /&gt;
|-&lt;br /&gt;
|[[#Search for Packages|search]]  || Search for packages by name or description&lt;br /&gt;
|-&lt;br /&gt;
|[[#Information on Packages|info]]  || Give detailed information about packages or repositories&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:black; color:white&amp;quot;  colspan=2 align=center |Repository and package maintenance&lt;br /&gt;
|-&lt;br /&gt;
|mkndx    || Create repository index (v3) file from packages&lt;br /&gt;
|-&lt;br /&gt;
|mkpkg  || Create package (v3)&lt;br /&gt;
|-&lt;br /&gt;
|index   || Create repository index (v2) file from packages&lt;br /&gt;
|-&lt;br /&gt;
|fetch  || Download packages from repositories to a local directory&lt;br /&gt;
|-&lt;br /&gt;
|manifest|| Show checksums of package contents&lt;br /&gt;
|-&lt;br /&gt;
|extract || Extract package file contents&lt;br /&gt;
|-&lt;br /&gt;
|verify   || Verify package integrity and signature&lt;br /&gt;
|-&lt;br /&gt;
|adbsign || Sign, resign or recompress v3 packages and indexes&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:black; color:white&amp;quot;  colspan=2 align=center |Miscellaneous&lt;br /&gt;
|-&lt;br /&gt;
|audit|| Audit system for changes&lt;br /&gt;
|-&lt;br /&gt;
|stats  || Show statistics about repositories and installations&lt;br /&gt;
|-&lt;br /&gt;
|version|| Compare package versions or perform tests on version strings&lt;br /&gt;
|-&lt;br /&gt;
|adbdump|| Dump v3 files in textual representation&lt;br /&gt;
|-&lt;br /&gt;
|adbgen  || Generate v3 files from text representation&lt;br /&gt;
|-&lt;br /&gt;
|convdb  || Convert v2 installed database to v3 format&lt;br /&gt;
|-&lt;br /&gt;
|convndx || Convert v2 indexes to v3 format&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Packages and Repositories  ==&lt;br /&gt;
{{Main|Repositories}}&lt;br /&gt;
Official software packages for Alpine Linux have the extension &amp;lt;code&amp;gt;.apk&amp;lt;/code&amp;gt;, and are often called &amp;quot;a-packs&amp;quot;. Packages in Alpine Linux are organized into [[Repositories|&#039;&#039;&#039;repositories&#039;&#039;&#039;]] and are defined in the {{Path|/etc/apk/repositories}} file. [[Apk spec#Package Format V2|apk v2]] packages are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. &lt;br /&gt;
&lt;br /&gt;
=== Subpackages ===&lt;br /&gt;
&lt;br /&gt;
In Alpine Linux, software packages are thinned out and split into subpackages to give more control over what features are installed and keeps the installation as small and efficient as possible. &lt;br /&gt;
&lt;br /&gt;
Subpackages related to service files, documentation and shell completions are installed automatically by the package manager using &#039;&#039;&#039;auto-install&#039;&#039;&#039; rule based on [[APKBUILD_Reference#install_if|install_if]] directive. For example, if {{pkg|zsh}} is already installed, on installing any package with {{pkg|*zsh-completion*}} subpackage, apk automatically installs the associated subpackage. The {{pkg|docs}} meta package for pulling in [[Alpine_Linux:FAQ#Why_don&#039;t_I_have_man_pages_or_where_is_the_&#039;man&#039;_command?|all documentation]] works the same way.&lt;br /&gt;
&lt;br /&gt;
Alpine Linux [https://pkgs.alpinelinux.org package database] page shows the list of available subpackages for any package.&lt;br /&gt;
&lt;br /&gt;
== World ==&lt;br /&gt;
&lt;br /&gt;
At {{Path|/etc/apk/world}}, apk maintains the world, that is, a list of constraints the package selection needs to fulfill. World describes the desired system state. {{Path|/etc/apk/world}} is a plaintext file with one constraint using dependency notation per line. Each line has the format:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;code&amp;gt;[!]NAME{@tag}{[&amp;lt;&amp;gt;~=]version}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There can be only one line with a given package NAME in the file and except the package NAME, all the other options are optional.&lt;br /&gt;
&lt;br /&gt;
*  &#039;&#039;&#039;!&#039;&#039;&#039; is used for [[#Masking a specific package|masking a specific package]] &lt;br /&gt;
*  &#039;&#039;&#039;@tag&#039;&#039;&#039; allows apk to use the [[Repositories#Tagged_repository|tagged repository]] for the named package &lt;br /&gt;
*  &#039;&#039;&#039;[&amp;lt;&amp;gt;~=]version&#039;&#039;&#039; are used for [[#Package pinning|package pinning]].&lt;br /&gt;
&lt;br /&gt;
The commands {{ic|apk add foo}} and {{ic|apk del bar}} manipulate the desired state by adding or removing packages &amp;lt;code&amp;gt;foo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; respectively as a dependency constraint in {{Path|/etc/apk/world}}. If the {{Path|/etc/apk/world}} is edited manually, run the command [[#apk fix|apk fix]] to apply the changes. &lt;br /&gt;
&lt;br /&gt;
Every constraint listed in {{Path|/etc/apk/world}} must be solvable in order for the system to be considered correct, and no transaction may be committed that is incorrect. If apk cannot verify the correctness of the requested change, it will back out adding the constraint before attempting to change what packages are actually installed on the system. Thus apk will never [[#ERROR:_unsatisfiable_constraints|commit]] a change to the system that leaves it unbootable. &lt;br /&gt;
&lt;br /&gt;
{{Warning| The option {{ic|force-broken-world}}, will delete world constraints until a solution without conflicts is found to boot. This does not allow installation of packages with unjustifiable dependencies. Using this will likely result in unexpected removal of some packages.}}&lt;br /&gt;
&lt;br /&gt;
== Update Package list ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux [[Repositories|&#039;&#039;&#039;repositories&#039;&#039;&#039;]] change as packages are added and upgraded. To get the latest list of available packages, use the &#039;&#039;update&#039;&#039; command.  This command downloads the {{Path|APKINDEX.tar.gz}} from each repository and stores it in the local cache, typically {{Path|/var/cache/apk/}}, {{Path|/var/lib/apk/}} or {{Path|/etc/apk/cache/}}. {{Cmd|# apk update}}&lt;br /&gt;
&lt;br /&gt;
Adding the &amp;lt;code&amp;gt;--update-cache&amp;lt;/code&amp;gt;, or for short &amp;lt;code&amp;gt;-U&amp;lt;/code&amp;gt; switch to another apk command, as in &amp;lt;code&amp;gt;apk --update-cache upgrade&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;apk -U add ...&amp;lt;/code&amp;gt;, the command has the same effect as first running &amp;lt;code&amp;gt;apk update&amp;lt;/code&amp;gt; before the other apk command.&lt;br /&gt;
&lt;br /&gt;
It is a good idea to always do an &#039;&#039;&#039;update&#039;&#039;&#039; right &#039;&#039;&#039;before&#039;&#039;&#039; doing an &#039;&#039;&#039;upgrade or add&#039;&#039;&#039; command. That way the command will install the latest available packages from the repositories.&lt;br /&gt;
&lt;br /&gt;
== Add a Package ==&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;add&#039;&#039;&#039; to install packages from a [[Repositories|&#039;&#039;&#039;repository&#039;&#039;&#039;]]. Any necessary dependencies are also installed. If you have multiple repositories, the &#039;&#039;&#039;add&#039;&#039;&#039; command installs the newest package. {{Cmd|&amp;lt;nowiki&amp;gt;# apk add openssh&lt;br /&gt;
# apk add openssh openntp vim &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Packages from a [[Repositories#Tagged repository|tagged repository]] can be installed by adding tags to them:{{cmd|# apk add wireguard-go@testing}}&lt;br /&gt;
&lt;br /&gt;
A specific package can also be [[#Package pinning|held back or pinned]] at a specific level or version. &lt;br /&gt;
&lt;br /&gt;
=== Add a local Package ===&lt;br /&gt;
&lt;br /&gt;
To install a locally available apk package, for example if this device has no internet access but you can upload apk packages directly to it, use the &#039;&#039;&#039;--allow-untrusted&#039;&#039;&#039; flag: {{cmd|# apk add --allow-untrusted /path/to/file.apk}}&lt;br /&gt;
&lt;br /&gt;
Note that multiple packages can be given.  When installing a local package, all dependencies should also be specified. For example:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add --allow-untrusted /var/tig-2.2-r0.apk /var/git-2.11.1-20.apk}}&lt;br /&gt;
&lt;br /&gt;
When a non-repository package is added, a version constraint is added with the package identity hash in the World file. &lt;br /&gt;
&lt;br /&gt;
{{Note|If {{ic|&#039;&#039;&#039;--available&#039;&#039;&#039;}} option is used with [[#Upgrade a Running System|apk upgrade]] command, local packages are upgraded or downgraded back to a repository version.}}&lt;br /&gt;
&lt;br /&gt;
== Remove a Package  ==&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;del&#039;&#039;&#039; to remove a package along with dependencies that are no longer needed.{{cmd|&amp;lt;nowiki&amp;gt;# apk del openssh&lt;br /&gt;
# apk del openssh openntp vim&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Upgrade a Running System ==&lt;br /&gt;
{{Seealso|Upgrading Alpine Linux to a new release branch}}&lt;br /&gt;
To get the latest security upgrades and bugfixes available for all the installed packages from the [[Repositories#Release_Branches|current release branch]] of a running system, always [[#Update Package list| update the packages list]] before issuing the &#039;&#039;&#039;upgrade&#039;&#039;&#039; command as shown below:{{cmd|&amp;lt;nowiki&amp;gt;# apk update&lt;br /&gt;
# apk upgrade &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Or, combining the same into one single command:{{cmd|# apk -U upgrade}}&lt;br /&gt;
&lt;br /&gt;
To upgrade only &#039;&#039;specific&#039;&#039; packages, use the &#039;&#039;&#039;upgrade&#039;&#039;&#039; command and specify them: {{cmd|&amp;lt;nowiki&amp;gt;# apk update&lt;br /&gt;
# apk upgrade busybox&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
When upgrading packages, the package manager may create &amp;lt;var&amp;gt;apk-new&amp;lt;/var&amp;gt; files to avoid overwriting configuration files. Once the packages are updated, remember to [[#Handling apk-new files|handle such &amp;lt;var&amp;gt;apk-new&amp;lt;var&amp;gt;]] files.&lt;br /&gt;
&lt;br /&gt;
Here is an example, showing the procedure on a system that has [[Repositories#Using testing repository|testing repository tagged]]:&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
 # apk update&lt;br /&gt;
 fetch &amp;lt;nowiki&amp;gt;https://dl-3.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 fetch &amp;lt;nowiki&amp;gt;https://dl-3.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 fetch &amp;lt;nowiki&amp;gt;https://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 v3.6.2-191-gf98d79930f &amp;lt;nowiki&amp;gt;[https://dl-3.alpinelinux.org/alpine/v3.6/main]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 v3.6.2-190-ga5d68c47df &amp;lt;nowiki&amp;gt;[https://dl-3.alpinelinux.org/alpine/v3.6/community]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 v3.6.0-4624-g11f1b9c8ab &amp;lt;nowiki&amp;gt;[https://dl-3.alpinelinux.org/alpine/edge/testing]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 OK: 20118 distinct packages available&lt;br /&gt;
 &lt;br /&gt;
 # apk upgrade&lt;br /&gt;
 (1/2) Upgrading extra-cmake-modules@testing (5.38.0-r0 -&amp;gt; 5.39.0-r0)&lt;br /&gt;
 (2/2) Upgrading extra-cmake-modules-doc@testing (5.38.0-r0 -&amp;gt; 5.39.0-r0)&lt;br /&gt;
 Executing mdocml-apropos-1.14.1-r0.trigger&lt;br /&gt;
 OK: 2635 MiB in 803 packages&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upgrading &amp;quot;diskless&amp;quot; and &amp;quot;data&amp;quot; disk mode installs ===&lt;br /&gt;
&lt;br /&gt;
When upgrading packages, the kernel and firmware packages are &#039;&#039;&#039;not&#039;&#039;&#039; upgraded. Upgrading them requires [[Diskless Mode#update-kernel script|&#039;&#039;&#039;update-kernel&#039;&#039;&#039;]] script.&lt;br /&gt;
&lt;br /&gt;
=== Handling apk-new files ===&lt;br /&gt;
&lt;br /&gt;
apk avoids overwriting configuration files in the {{path|/etc}} directory. Whenever apk installs a file there, but realizes a potentially edited one is already present, it will write its file to that filename with {{path|.apk-new}} appended. When upgrading, you see a message like below: {{Cmd|# apk upgrade &lt;br /&gt;
(1/2) Upgrading openrc-user-pam (0.62.2-r2 -&amp;gt; 0.62.2-r3)&lt;br /&gt;
(2/2) Upgrading openrc (0.62.2-r2 -&amp;gt; 0.62.2-r3)&lt;br /&gt;
openrc-0.62.2-r3: installing file to etc/rc.conf.apk-new&lt;br /&gt;
openrc-0.62.2-r3.post-upgrade: Executing script}} &lt;br /&gt;
&lt;br /&gt;
You may handle these by hand, or use the [[Alpine configuration management scripts#update-conf|update-conf]] utility:- &lt;br /&gt;
&lt;br /&gt;
* To list files where changes to configurations from the new packages exist: {{Cmd|# update-conf -l}}&lt;br /&gt;
:Paths appear to locations, possibly using double-slash (&#039;&#039;&amp;quot;//&amp;quot;&#039;&#039;) unix notation, where both the old file and the new file with the {{Path|.apk-new}} extension exist.&lt;br /&gt;
* Simply invoking {{ic|update-conf}} will present you with the difference between the two files and offer various choices for dealing with the conflicts.{{Cmd|# update-conf}}&lt;br /&gt;
:&#039;&#039;&#039;Be very careful&#039;&#039;&#039; not to choose &#039;&#039;&amp;quot;u&amp;quot;&#039;&#039; to &#039;&#039;use&#039;&#039; the new file versions for files such as {{Path|passwd}}, {{Path|doas.conf}}, {{Path|shadow}}, {{Path|hosts}}, etc., because otherwise the existing password hashes, user doas settings, etc. &#039;&#039;&#039;&#039;&#039;would be wiped, and lockouts would occur!&#039;&#039;&#039;&#039;&#039; Instead, one could choose to compare the new lines (shown with a &#039;&#039;&amp;quot;+&amp;quot;&#039;&#039;) with the lines that would be removed (&#039;&#039;&amp;quot;-&amp;quot;&#039;&#039;) and edit (&#039;&#039;&amp;quot;e&amp;quot;&#039;&#039;) the files if so wished, or zap (&#039;&#039;&amp;quot;z&amp;quot;&#039;&#039;) the new version – i.e. delete the new version – if no essential changes are required. &lt;br /&gt;
:Therefore, &#039;&#039;&#039;update-conf&#039;&#039;&#039; does not currently have a merge function set up by default to preserve essential data unlike, say, Debian&#039;s &#039;&#039;&#039;update-passwd&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;!-- Editors - there is a need to elaborate on update-conf merge rules functionality that is reportedly available;  this could be elaborated under Alpine_configuration_management_scripts#update-conf --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Autoupdate tool for apk ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux [https://github.com/jirutka/apk-autoupdate tool for automatic updates] is available as {{pkg|apk-autoupdate}} package. It can be used with [[Cron]] to enable unattended, automatic upgrades of packages.&lt;br /&gt;
&lt;br /&gt;
== Package management in Diskless mode ==&lt;br /&gt;
&lt;br /&gt;
Besides using [[#Local Cache|Local Cache]], all package management tasks in [[Diskless Mode|diskless]] and [[Data Disk Mode|Data disk]] mode systems like adding, removing and [[#Upgrading &amp;quot;diskless&amp;quot; and &amp;quot;data&amp;quot; disk mode installs|upgrading]] packages requires running the command: {{Cmd|&#039;&#039;&#039;# [[Alpine_local_backup#Committing changes|lbu commit]]&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
Only when the above command is run, the changes will take effect on next reboot.&lt;br /&gt;
&lt;br /&gt;
== apk query ==&lt;br /&gt;
{{Pill_clickable||v3 only|green|palegreen|right|Alpine Package Keeper#apk_v3}}&lt;br /&gt;
The query applet is a superset of [[#Information on Packages|info]], [[#Listing installed packages|list]] and [[#Search for Packages|search]] commands to interrogate the installed database and indexes for information related to packages. The command outputs human readable format in addition to json and yaml output.&lt;br /&gt;
&lt;br /&gt;
== Search for Packages ==&lt;br /&gt;
&lt;br /&gt;
{{Tip|Alpine Linux provides a specialized [https://pkgs.alpinelinux.org web interface] dedicated to looking through various available packages.}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;search&#039;&#039;&#039; command searches the repository Index files for installable packages. &lt;br /&gt;
&lt;br /&gt;
The return format is &#039;&#039;&#039;Package&#039;&#039;&#039;-&#039;&#039;&#039;Version&#039;&#039;&#039;. Omit &#039;&#039;&#039;Version&#039;&#039;&#039; for &#039;&#039;apk add &#039;&#039;&#039;Package&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* To list all packages available, along with their descriptions: {{cmd|$ apk search -v}}&lt;br /&gt;
* To list all packages are part of the ACF system: {{cmd|$ apk search -v &#039;acf*&#039; }}&lt;br /&gt;
* To list all packages that list NTP as part of their description, use the &#039;&#039;-d&#039;&#039; or &#039;&#039;--description&#039;&#039; option: {{cmd|$ apk search -v --description &#039;NTP&#039; }}&lt;br /&gt;
* To list all packages that provide the &amp;lt;code&amp;gt;git&amp;lt;/code&amp;gt; command: {{cmd|$ apk search -v &#039;cmd:git&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Information on Packages ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;info&#039;&#039;&#039; command provides information on the contents of packages, their dependencies, and which files belong to a package.&lt;br /&gt;
&lt;br /&gt;
For a given package, each element can be chosen (for example, &#039;&#039;-w&#039;&#039; to show just the webpage information), or all information displayed with the &#039;&#039;-a&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Example: {{cmd|$ apk info -a zlib}}&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 description:&#039;&#039;&#039;&lt;br /&gt;
 A compression/decompression Library&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 webpage:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;https://zlib.net&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 installed size:&#039;&#039;&#039;&lt;br /&gt;
 94208&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 depends on:&#039;&#039;&#039;&lt;br /&gt;
 libc0.9.32&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 is required by:&#039;&#039;&#039;&lt;br /&gt;
 libcrypto1.0-1.0.0-r0&lt;br /&gt;
 apk-tools-2.0.2-r4&lt;br /&gt;
 openssh-client-5.4_p1-r2&lt;br /&gt;
 openssh-5.4_p1-r2&lt;br /&gt;
 libssl1.0-1.0.0-r0&lt;br /&gt;
 freeswitch-1.0.6-r6&lt;br /&gt;
 atop-1.25-r0 &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 contains:&#039;&#039;&#039;&lt;br /&gt;
 lib/libz.so.1.2.5&lt;br /&gt;
 lib/libz.so.1&lt;br /&gt;
 lib/libz.so &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 triggers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As shown in the example you can determine&lt;br /&gt;
* The &#039;&#039;&#039;description&#039;&#039;&#039; of the package (&#039;&#039;-d&#039;&#039; or &#039;&#039;--description&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;webpage&#039;&#039;&#039; where the application is hosted (&#039;&#039;-w&#039;&#039; or &#039;&#039;--webpage&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;size&#039;&#039;&#039; the package will require once installed (in bytes) (&#039;&#039;-s&#039;&#039; or &#039;&#039;--size&#039;&#039;)&lt;br /&gt;
* What packages are required to use this one  (&#039;&#039;&#039;depends&#039;&#039;&#039;) (&#039;&#039;-R&#039;&#039; or &#039;&#039;--depends&#039;&#039;)&lt;br /&gt;
* What packages require this one to be installed (&#039;&#039;&#039;required by&#039;&#039;&#039;) (&#039;&#039;-r&#039;&#039; or &#039;&#039;--rdepends&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;contents&#039;&#039;&#039; of the package, that is, which files it installs (&#039;&#039;-L&#039;&#039; or &#039;&#039;--contents&#039;&#039;)&lt;br /&gt;
* Any &#039;&#039;&#039;triggers&#039;&#039;&#039; this package sets. (&#039;&#039;-t&#039;&#039; or &#039;&#039;--triggers&#039;&#039;) Listed here are directories that are watched; if a change happens to the directory, then the trigger script is run at the end of the apk add/delete. For example, doing a depmod once after installing all packages that add kernel modules.&lt;br /&gt;
&lt;br /&gt;
===  Check file ownership ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;info&#039;&#039;&#039; command is also useful to determine which package a file belongs to when used with the {{ic|--who-owns}} option, or simply {{ic|-W}}.  For example: {{cmd|$ apk info --who-owns /sbin/lbu}} &lt;br /&gt;
will display&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/lbu is owned by alpine-conf-x.x-rx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|The {{ic|apk info --who-owns}} command is currently subject to requiring the declaration of a file&#039;s path to be updated in the case where &#039;&#039;&#039;[https://wiki.alpinelinux.org/wiki/Upgrading_Alpine_Linux_to_a_new_release_branch#Upgrading_to_Edge /usr merge]&#039;&#039;&#039; had been previously applied and where, additionally, the file was originally assigned to paths under {{Path|/lib}}, {{Path|/bin}} or {{Path|/sbin}}.  Otherwise, an error is returned, seeing how these are now soft-linked into {{Path|/usr}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ apk info --who-owns /sbin/lbu&lt;br /&gt;
ERROR: /sbin/lbu: Could not find owner package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further to the [https://alpinelinux.org/posts/2025-10-01-usr-merge.html /usr merge] announcement, in order for this facility to function in such cases, {{Path|/usr}} currently needs to be prepended to the declaration of the path for all such files, seeing how those files are now soft-linked to {{Path|/usr/lib}}, {{Path|/usr/bin}} or {{Path|/usr/sbin}}:  {{cmd|$ apk info --who-owns /usr/sbin/lbu}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===  Check Dependencies ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;info&#039;&#039;&#039; command specific to check package dependency and reverse dependency is explained below:&lt;br /&gt;
&lt;br /&gt;
The option &#039;&#039;&#039;-R&#039;&#039;&#039; or &#039;&#039;&#039;--depends&#039;&#039;&#039; lists the dependencies of the package: {{Cmd|$ apk info --depends pipewire}} &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pipewire-1.0.6-r1 depends on:&lt;br /&gt;
/bin/sh&lt;br /&gt;
so:libc.musl-x86_64.so.1&lt;br /&gt;
so:libpipewire-0.3.so.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The option &#039;&#039;&#039;-r&#039;&#039;&#039; or  &#039;&#039;&#039;--rdepends&#039;&#039;&#039; lists the  reverse dependencies of the package (all other packages which depend on the package). {{Cmd|$ apk info --rdepends pipewire}}  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pipewire-1.0.6-r1 is required by:&lt;br /&gt;
xdg-desktop-portal-wlr-0.7.1-r0&lt;br /&gt;
pipewire-pulse-1.0.6-r1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Listing installed packages ===&lt;br /&gt;
&lt;br /&gt;
To list all installed packages, use: {{Cmd|$ apk info}}&lt;br /&gt;
&lt;br /&gt;
To list all installed packages in alphabetical order, with a description of each, do:{{Cmd|$ apk -vv info|sort}}&lt;br /&gt;
&lt;br /&gt;
To list packages locally installed that are not longer available in repositories, use {{Cmd|$ apk list --orphaned}}&lt;br /&gt;
&lt;br /&gt;
To browse details of installed package in a &amp;quot;TUI&amp;quot; with:{{Cmd|&amp;lt;nowiki&amp;gt;$ apk list --installed -q | fzf --preview &#039;apk query {1}&#039;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To list subpackages for a package, for e.g {{pkg|util-linux}}:{{Cmd|$ apk list --quiet --origin util-linux}}&lt;br /&gt;
&lt;br /&gt;
The apk tool does not have a subcommand to list manually-installed packages that do not have reverse dependencies. To get this information on a traditional system that is not using [[Alpine local backup|lbu]], try this script. Note that this approach will also list core packages like alpine-base that should not be removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
apk info | grep -ve &#039;-doc$&#039; | sort | while read pkg&lt;br /&gt;
        do&lt;br /&gt;
                rdep=`apk info -qr &amp;quot;$pkg&amp;quot;`&lt;br /&gt;
                [ -z &amp;quot;$rdep&amp;quot; ] &amp;amp;&amp;amp; echo $pkg&lt;br /&gt;
        done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List packages by installed size ===&lt;br /&gt;
{{Pill_clickable||v3 only|green|palegreen|right|Alpine Package Keeper#apk query}}&lt;br /&gt;
The below command lists all installed packages by installed size. It requires {{pkg|jq}} package and uses [[#apk query|query]] option. Use the below command with &amp;lt;Code&amp;gt;less&amp;lt;/Code&amp;gt; or &amp;lt;Code&amp;gt;head&amp;lt;/Code&amp;gt; command:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;$ apk --installed query --format json --fields name,installed-size &#039;*&#039;|jq -r &#039;.[] | [.&amp;quot;installed-size&amp;quot;, .&amp;quot;name&amp;quot;] | @tsv&#039; | sort -nr&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Local Cache ==&lt;br /&gt;
{{Seealso|Local APK cache}}&lt;br /&gt;
APK can keep a cache of installed packages on a local disk. HDD or [[Installation#System_Disk_Mode|sys mode]] installs don&#039;t need an apk cache, it still allows to serve packages over the network, though, e.g. to get installed by other local machines.&lt;br /&gt;
&lt;br /&gt;
{{Note|For [[Diskless Mode|diskless]] installations, [[Local APK cache|local package cache]] is needed to automatically (re-)install packages when booting.}} &lt;br /&gt;
&lt;br /&gt;
When newer packages are added to the cache over time, the older versions of the packages default to remain in the cache directory.  The older versions of packages can be removed with the &#039;&#039;&#039;clean&#039;&#039;&#039; command.  {{cmd|# apk cache clean}} Or to see what is deleted include the verbose switch: {{cmd|# apk -v cache clean}}&lt;br /&gt;
&lt;br /&gt;
If packages got deleted accidentally from the cache directory, then use the &#039;&#039;&#039;download&#039;&#039;&#039; command, {{cmd|# apk cache download}}&lt;br /&gt;
&lt;br /&gt;
The above two steps can be combined  into one with the &#039;&#039;&#039;sync&#039;&#039;&#039; command - this cleans out old packages and downloads missing packages. {{cmd|# apk cache -v sync}}&lt;br /&gt;
&lt;br /&gt;
== apk dot ==&lt;br /&gt;
&lt;br /&gt;
The dot option renders package dependencies as {{pkg|graphviz}} graphs.[[File:Seatd dependencies.png|800px|center|alt=Seatd dependencies|Seatd dependencies]] Steps to use the dot option is documented below:&lt;br /&gt;
# Save the output of apk dot option to a dot file.{{Cmd|$ apk dot seatd &amp;gt; seatd_dependencies.dot}}&lt;br /&gt;
# Use &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; utility from {{pkg|graphviz}} package to convert the {{Path|seatd_dependencies.dot}} file into a graphical format such as PNG, PDF, or SVG. {{Cmd|$ dot -Tpng seatd_dependencies.dot -o seatd_dependencies.png}}&lt;br /&gt;
&lt;br /&gt;
== apk fix ==&lt;br /&gt;
&lt;br /&gt;
If a package is specified, the &#039;&#039;&#039;fix&#039;&#039;&#039; subcommand applies repair strategies to correct errors in the installation of the specified packages. If no packages are specified, this command synchronizes all the installed packages with the [[#World|desired system state]].&lt;br /&gt;
&lt;br /&gt;
However, if the currently installed &#039;&#039;&#039;&#039;&#039;version&#039;&#039;&#039;&#039;&#039; of the package (say, &amp;lt;var&amp;gt;foo&amp;lt;/var&amp;gt; version &amp;lt;var&amp;gt;1.2.3-r4&amp;lt;/var&amp;gt;) is no longer available in the operating system&#039;s repositories (i.e. the repos specified in {{Path|/etc/apk/repositories}}) following the latest system update, then &#039;&#039;&#039;apk fix&#039;&#039;&#039; will not fix the package and will report &#039;&#039;&amp;quot;[APK unavailable, skipped]&amp;quot;&#039;&#039; instead:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas apk fix &amp;lt;var&amp;gt;foo&amp;lt;/var&amp;gt;&lt;br /&gt;
(1/1) [APK unavailable, skipped] Reinstalling foo (1.2.3-r4)}}&lt;br /&gt;
&lt;br /&gt;
This outcome applies both with &#039;&#039;&#039;apk v3&#039;&#039;&#039; and &#039;&#039;&#039;v2&#039;&#039;&#039;, and includes cases where either a higher or lower version of the package is found in the employed repos.  In such cases where a different version exists, consider replacing the package using the [[Alpine_Package_Keeper#Add_a_local_Package|{{ic|apk upgrade --available}}]] command, which will either upgrade or downgrade &#039;&#039;all packages&#039;&#039; to the versions currently offered. &lt;br /&gt;
&lt;br /&gt;
== apk policy ==&lt;br /&gt;
&lt;br /&gt;
To display the repository a package was installed from and will be updated from, plus any [[#Repository_pinning|tagged]] or enabled repositories where it is also offered, if any, for this architecture - its &#039;&#039;&#039;policy&#039;&#039;&#039;: {{Cmd|$ apk policy &#039;&#039;package&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ apk policy vlc&lt;br /&gt;
 vlc policy:&lt;br /&gt;
  2.2.6-r1:&lt;br /&gt;
    lib/apk/db/installed&lt;br /&gt;
    https://dl-3.alpinelinux.org/alpine/v3.7/community&lt;br /&gt;
  3.0.0_rc2-r1:&lt;br /&gt;
    @edgecommunity https://dl-3.alpinelinux.org/alpine/edge/community&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration file ==&lt;br /&gt;
{{Pill_clickable||v3 only|green|palegreen|right|Alpine Package Keeper#apk_v3}}&lt;br /&gt;
Support for config file for setting  default global options has been enabled. The user defined config file {{path|/etc/config/apk}}, if present overrides the {{path|/lib/apk/config}}, intended for distribution default options. To override the default config file name, the environment variable {{ic|APK_CONFIG}} can be used.&lt;br /&gt;
&lt;br /&gt;
The configuration file contains one long option per line as shown here for reference:{{Cat|/etc/config/apk|no-cache &lt;br /&gt;
timeout 120}}&lt;br /&gt;
&lt;br /&gt;
The following aliases are available: {{ic|cache}} equals {{ic|cache yes}} and {{ic|no-cache}} equals {{ic|cache no}}.&lt;br /&gt;
&lt;br /&gt;
== Transaction logs == &lt;br /&gt;
{{Pill_clickable||v3 only|green|palegreen|right|Alpine Package Keeper#apk_v3}}&lt;br /&gt;
All apk commands which modify the database i.e write transactions are logged to {{Path|/var/log/apk.log}}. To disable the writing of the log file, the configuration option {{ic|logfile}} in the [[#Configuration file|configuration file]] must be set as follows:{{Cat|/etc/config/apk|logfile no}}&lt;br /&gt;
&lt;br /&gt;
== Advanced APK Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Commandline repository options ===&lt;br /&gt;
&lt;br /&gt;
By default, the &#039;&#039;&#039;apk&#039;&#039;&#039; utility will use the system repositories for all operations. This behavior can be overridden by the following options:&lt;br /&gt;
{|&lt;br /&gt;
| --repositories-file REPOFILE&lt;br /&gt;
| Override the system repositories by specifying a repositories file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-X|--repository REPO&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Specify a supplemental repository that will be used in addition to the system repositories. This option can be provided multiple times.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add cherokee --update-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted}}&lt;br /&gt;
&lt;br /&gt;
=== apk Command Line Parsing ===&lt;br /&gt;
&lt;br /&gt;
==== Use of Single Quotes ====&lt;br /&gt;
Advanced use of &#039;&#039;&#039;apk&#039;&#039;&#039; could require the use of single quotes around its argument (e.g. {{ic|apk &amp;lt;var&amp;gt;add&amp;lt;/var&amp;gt; &#039;&amp;lt;var&amp;gt;argument&amp;lt;/var&amp;gt;&#039;}}) when certain characters are being employed, since Unix shells – including the default &#039;&#039;&#039;sh&#039;&#039;&#039; (&#039;&#039;&#039;ash&#039;&#039;&#039;/&#039;&#039;&#039;busybox&#039;&#039;&#039;) shell, &#039;&#039;&#039;bash&#039;&#039;&#039; or &#039;&#039;&#039;zsh&#039;&#039;&#039;/&#039;&#039;&#039;fish&#039;&#039;&#039; – will attempt to interpret the argument if it is not enveloped in single quotes:-&lt;br /&gt;
* {{ic|&amp;lt;}} in an argument would be unintendedly interpreted as &amp;quot;input redirection&amp;quot;; {{ic|asterisk&amp;lt;1.6.1}} without quotes would prompt the shell to attempt to read from an {{Path|asterisk}} file;   similarly, {{ic|&amp;gt;}} would be interpreted unintendedly as &amp;quot;output redirection&amp;quot;&lt;br /&gt;
* {{ic|~}} would attempt to expand the argument to include the user’s home directory path&lt;br /&gt;
* {{ic|*}}, {{ic|?}}, {{ic|[0-9]}} without single quotes around the argument could cause globbing, meaning that the shell would try to expand the package name using the meaning of those characters ({{ic|*}} meaning any string of alphanumeric characters, for example) and then try to apply &#039;&#039;&#039;apk&#039;&#039;&#039; to any &#039;&#039;file&#039;&#039; fitting that name in the current working directory as an unintended interpretation&lt;br /&gt;
* {{ic|!}} in a &#039;&#039;&#039;bash&#039;&#039;&#039; or &#039;&#039;&#039;zsh&#039;&#039;&#039; shell without using quotes would be interpreted as &amp;quot;history expansion&amp;quot; as opposed to [[#Package_masking|&amp;quot;negate installation&amp;quot;]], as intended.   Note that, if using &#039;&#039;&#039;ash&#039;&#039;&#039; (Alpine Linux’s default), the lack of single quotes is not problematic there as that shell does not support history expansion.  History expansion is &#039;&#039;disabled by default&#039;&#039; in &#039;&#039;&#039;fish&#039;&#039;&#039;.&lt;br /&gt;
Therefore, the use of single quotes is typically required in various shells to enclose the package name/version, with or with any &#039;!&#039; symbol, to be handed directly to the &#039;&#039;&#039;apk&#039;&#039;&#039; tool so that it is not attempted to be interpreted by the shell.&lt;br /&gt;
&lt;br /&gt;
=== Package pinning ===&lt;br /&gt;
{{Seealso|Repositories#Tagged repository}}&lt;br /&gt;
&lt;br /&gt;
In certain cases, you may want to upgrade a system, but keep a specific package at a specific level or version by pinning a Package. It is possible to add &amp;quot;sticky&amp;quot; or versioned dependencies. &lt;br /&gt;
&lt;br /&gt;
{{Warning| If you desire deterministic, repeatable package installation (such as with containerized environments) via package pinning, it is important to understand your package repo&#039;s version retention rules. Always pin to a package version that is intended for your [[Repositories#Release_Branches|release branch]]. Pinning to a version on the [[Repositories#Edge|edge]] branch may stop working after the package version is revoked from the repo.}}&lt;br /&gt;
&lt;br /&gt;
For instance, to hold the &#039;&#039;asterisk&#039;&#039; package to the 1.6.2 level or lower:{{cmd|&amp;lt;nowiki&amp;gt;# apk add asterisk=1.6.0.21-r0&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
or – note the need for [[#Use_of_Single_Quotes|single quotes]]:{{cmd|# apk add &#039;asterisk&amp;lt;1.6.1&#039;}}&lt;br /&gt;
&lt;br /&gt;
To upgrade the entire system, keeping the asterisk package at the 1.6.0 or lower level:{{cmd|# apk upgrade}}&lt;br /&gt;
&lt;br /&gt;
To later upgrade to the current version, and ensure that 1.6.1 is the minimum version used. {{cmd|# apk add &#039;asterisk&amp;gt;1.6.1&#039;}}&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;quot;fuzzy&amp;quot; version matching to pin the version to a major/minor release. To match any version of asterisk that starts with 1.6 (such as 1.6.0.21-r0 or 1.6.9.31-r9) use the command: {{cmd|&amp;lt;nowiki&amp;gt;# apk add &#039;asterisk=~1.6&#039;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==== Holding a specific package back ====&lt;br /&gt;
See [[#Package pinning|Package pinning]]&lt;br /&gt;
&lt;br /&gt;
=== Package masking ===&lt;br /&gt;
&lt;br /&gt;
In case a package is pulled in yet is superfluous or unwanted, or if it were to be installed and conflict with another, one could &#039;&#039;mask&#039;&#039; it i.e. &#039;&#039;exclude it&#039;&#039; from being installed unless &#039;&#039;&#039;apk&#039;&#039;&#039; is later instructed &#039;&#039;explicitly&#039;&#039; to add it.  To mask/exclude an unwanted package hypothetically called &#039;&#039;foo&#039;&#039;:&lt;br /&gt;
{{Cmd|# apk add &#039;!foo&#039;}}&lt;br /&gt;
Beforehand, ensure that the &#039;&#039;&#039;&#039;&#039;package is not installed&#039;&#039;&#039;&#039;&#039;.  If so, &#039;&#039;uninstall it first&#039;&#039;, as otherwise, it would become an &#039;&#039;&amp;quot;orphaned package&amp;quot;&#039;&#039;:  installed, yet not being managed by the &#039;&#039;&#039;apk&#039;&#039;&#039; package keeper, which could cause an obfuscated problem(s) if it or its dependencies linger and later conflict with another package;  it could be harder to trace the issue(s) then.&lt;br /&gt;
&lt;br /&gt;
The exclamation mark (!) is often used in logic and IT to express negation.&lt;br /&gt;
&lt;br /&gt;
As [[#Use_of_Single_Quotes|detailed above]], be sure to employ the single quotes (&#039;) if using certain shells &#039;&#039;other than&#039;&#039; the unaffected &#039;&#039;&#039;ash&#039;&#039;&#039; shell so as to avoid an unintended interpretation by the shell interpreter.&lt;br /&gt;
&lt;br /&gt;
The package then appears negated in &#039;&#039;world&#039;&#039;:&lt;br /&gt;
{{Cat|/etc/apk/world|fon&lt;br /&gt;
!foo&lt;br /&gt;
fop}}&lt;br /&gt;
&lt;br /&gt;
==== Unmasking a specific package ====&lt;br /&gt;
&lt;br /&gt;
Simply install it &#039;&#039;explicitly&#039;&#039; using &#039;&#039;&#039;apk&#039;&#039;&#039;.  Say:&lt;br /&gt;
{{Cmd|# apk add foo}}&lt;br /&gt;
Uninstall it afterwards, if not required.&amp;lt;/br&amp;gt;&lt;br /&gt;
Alternatively, delete the line in {{Path|/etc/apk/world}} where the package is negated.  Be sure not to leave any spurious character.&lt;br /&gt;
&lt;br /&gt;
=== Commit hooks ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;d like to trigger an action or run a certain script on every commit made by apk, there&#039;s a built-in method for that. On every commit apk looks for executables located in the &amp;quot;/etc/apk/commit_hooks.d/&amp;quot; directory, and executes them both before and after the commit. To provide some way to selectively run hooks either before or after a change is commited by apk, the scripts are called with &amp;quot;pre-commit&amp;quot; or &amp;quot;post-commit&amp;quot; as argument 1.&lt;br /&gt;
This is an example of a hook to do different things before and after commit:&lt;br /&gt;
&lt;br /&gt;
{{cmd|1=#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; = &amp;quot;pre-commit&amp;quot; ]; then&lt;br /&gt;
    do_something&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;post-commit&amp;quot; ]; then&lt;br /&gt;
    do_something_else&lt;br /&gt;
fi}}&lt;br /&gt;
&lt;br /&gt;
Commit hooks are $PATH-aware, so for the sake of security it&#039;s recommended to specify absolute paths to executables.&lt;br /&gt;
&lt;br /&gt;
==  Rosetta Stone ==&lt;br /&gt;
	&lt;br /&gt;
[[Comparison with other distros#Comparison chart/Rosetta Stone|Rosetta Stone]] or a Comparison chart shows how standard things related to package management are done in Alpine Linux compared to other popular distributions. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR: unable to select packages ===&lt;br /&gt;
&lt;br /&gt;
This error typically indicates that the package manager cannot find a suitable package to install. On issuing a command to add a package for eg: {{ic|# apk add labwc}}, you may receive below error message:&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
ERROR: unable to select packages:&lt;br /&gt;
 labwc (no such package):&lt;br /&gt;
 required by: world[labwc]&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above error indicates {{pkg|labwc}} does not exist in the [[Repositories|repositories]] currently configured in {{Path|/etc/apk/repositories}}. Ensure that &amp;lt;code&amp;gt;community&amp;lt;/code&amp;gt; repository is [[Repositories#Managing_repositories|enabled]], as by default only &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; repository is enabled. You may also want to check [https://pkgs.alpinelinux.org/packages packages database] to identify the correct package name and the [[Repositories|repository]] in which the package is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
ERROR: unable to select packages:&lt;br /&gt;
  so:libxml2.so.2 (no such package):&lt;br /&gt;
    required by: llvm19-libs-19.1.7-r1[so:libxml2.so.2]&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above error message may occur in [[Edge|Edge]] branch in certain other situations, even if all the necessary [[Repositories|repositories]] are enabled. Temporary non-availability of the packages from the repositories can occur, when software packages are [https://build.alpinelinux.org/ rebuilt]. You may want to wait for some time to try again.&lt;br /&gt;
&lt;br /&gt;
=== ERROR: unsatisfiable constraints === &lt;br /&gt;
&lt;br /&gt;
This error signifies a dependency conflict. It means that the package you&#039;re trying to install has dependencies that cannot be simultaneously satisfied within the current package repository. &lt;br /&gt;
&lt;br /&gt;
You may want to check [https://pkgs.alpinelinux.org/packages packages database] to identify the correct package name and version and the [[Repositories|repository]] in which the package is available. &lt;br /&gt;
&lt;br /&gt;
=== WARNING: This apk-tools is OLD! ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;apk update&#039;&#039;&#039;, &#039;&#039;&#039;apk upgrade&#039;&#039;&#039; or &#039;&#039;&#039;apk add&#039;&#039;&#039; may report the following: &lt;br /&gt;
 WARNING: This apk-tools is OLD! Some packages might not function properly&lt;br /&gt;
&lt;br /&gt;
This may happen if you are running Alpine Linux stable version with a [[Repositories#Edge|Edge]] package(s) also installed.  One resolution is to consider upgrading {{pkg|apk-tools}}. If edge/main is already [[Repositories#Tagged repository|tagged]] as &#039;&#039;@edgemain&#039;&#039; in your {{Path|/etc/apk/repositories}} file, then try: {{Cmd|# apk add --upgrade apk-tools@edgemain}}&lt;br /&gt;
&lt;br /&gt;
=== ERROR:  UNTRUSTED signature ===&lt;br /&gt;
&lt;br /&gt;
This happens when the release version changes. You need to update the local apk keys.&lt;br /&gt;
&lt;br /&gt;
If you have already updated your repositories, allow them to update without the trusted key:&lt;br /&gt;
{{Cmd|# apk update --allow-untrusted}}&lt;br /&gt;
&lt;br /&gt;
Then install the keys upgrade:&lt;br /&gt;
{{Cmd|# apk fix --upgrade --allow-untrusted alpine-keys}}&lt;br /&gt;
&lt;br /&gt;
Now updates and upgrades should proceed normally.&lt;br /&gt;
&lt;br /&gt;
Alternative, the updated alpine-keys package may be obtained, verified, installed directly, as covered earlier, prior to a repository update.&lt;br /&gt;
&lt;br /&gt;
=== ERROR: unable to select packages: breaks: world ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add vim&lt;br /&gt;
ERROR: unable to select packages:&lt;br /&gt;
  vim-common-9.1.1566-r0:&lt;br /&gt;
    breaks: world[!vim-common]&lt;br /&gt;
    satisfies: vim-9.1.1566-r0[vim-common=9.1.1566-r0]&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
When issuing package management commands, the above error will arise, if the command cannot be solved without breaking the [[#World|World]]. &amp;lt;!-- This probaly has to be added to it&#039;s own section for package exclusion&lt;br /&gt;
If the {{Path|/etc/apk/world}} file has a constraint {{ic|!vim-common}}, then issuing the command to install {{pkg|vim}} will fail, as {{pkg|vim}} has a dependency on {{pkg|vim-common}} as shown [[#ERROR: unable to select packages: breaks: world|below]]. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== World updated but the following packages are not removed === &lt;br /&gt;
&lt;br /&gt;
On issuing a command to remove a package for eg: {{ic|# apk del btrfs-progs}}, you may receive below error message:&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
World updated, but the following packages are not removed due to:&lt;br /&gt;
  btrfs-progs: btrbk&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the removal of package {{Pkg|btrfs-progs}} affects another package {{Pkg|btrbk}} in the constraints file [[#World|/etc/apk/world]]. So the package {{Pkg|btrfs-progs}} will be removed from the constraints file, but not removed from the system. The {{Pkg|btrfs-progs}} will remain in the system, until the constraint i.e {{Pkg|btrbk}} which depends on {{Pkg|btrfs-progs}} is removed. &lt;br /&gt;
&lt;br /&gt;
If {{ic|apk del btrbk}} is issued, the package {{Pkg|btrfs-progs}} will be automatically removed from system as the constraint {{Pkg|btrfs-progs}} does not exist in {{Path|/etc/apk/world}}.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://git.alpinelinux.org/apk-tools/tree/doc/apk.8.scd Manual for apk(8)]&lt;br /&gt;
* [https://git.alpinelinux.org/apk-tools/tree/doc/apk-world.5.scd Manual for apk-world(5)]&lt;br /&gt;
* [https://pkgs.alpinelinux.org Official web interface for packages] &lt;br /&gt;
* [[Software management]]&lt;br /&gt;
* [https://ariadne.space/2021/04/24/why-apktools-is-different-than.html  Why apk-tools is different than other package managers]&lt;br /&gt;
* [https://ariadne.space/2021/10/30/spelunking-through-the-apktools-dependency.html spelunking through the apk-tools dependency solver]&lt;br /&gt;
* [https://whynothugo.nl/journal/2023/02/18/in-praise-of-alpine-and-apk/ In praise of alpine and apk]&lt;br /&gt;
* [https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ 10 Alpine Linux apk Command Examples]&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:System_Administration]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Steam&amp;diff=32053</id>
		<title>Steam</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Steam&amp;diff=32053"/>
		<updated>2026-02-15T06:02:33Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* See also */ Added &amp;#039;Gamescope&amp;#039;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to run [https://store.steampowered.com/about/ Steam], a popular game distribution platform by Valve on Alpine Linux. Steam requires glibc to run, and thus won&#039;t run natively on Alpine Linux. The simplest approach is to run it as [[Flatpak]]. Other workarounds involve using a virtual machine, a chroot or a container. It is theoretically possible to run the windows version of Steam using {{Pkg|wine}}.&lt;br /&gt;
&lt;br /&gt;
== Installation via Flatpak ==&lt;br /&gt;
&lt;br /&gt;
# Follow the [[Flatpak#Installing_Flatpak|Flatpak]] wiki page and ensure that [[Flatpak#Installing_Flatpak|Flathub repository]] is enabled. &lt;br /&gt;
# Install the Steam flatpak package from Flathub.{{Cmd|$ flatpak --user install com.valvesoftware.Steam}}&lt;br /&gt;
# After installation Steam can be started either using its .desktop file or from the command line: {{Cmd|$ flatpak run com.valvesoftware.Steam}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== My controllers aren&#039;t detected ===&lt;br /&gt;
&lt;br /&gt;
By default Steam doesn&#039;t have permission to read your controllers.&lt;br /&gt;
This can be fixed by installing an [[udev]] rule from the official Steam package, but the udev rules are also available as an Alpine package.&lt;br /&gt;
&lt;br /&gt;
  # apk add {{pkg|steam-devices|arch=x86_64}}&lt;br /&gt;
&lt;br /&gt;
These udev rules rely on the &amp;lt;code&amp;gt;TAG+=&amp;quot;uaccess&amp;quot;&amp;lt;/code&amp;gt;, and are therefore only expected to work reliably when using [[Elogind]].&lt;br /&gt;
&lt;br /&gt;
=== SteamVR won&#039;t launch ===&lt;br /&gt;
&lt;br /&gt;
Out of the box SteamVR might not be able to launch and give you various errors. Steam tries to fix this itself by setting the right capabilities on the SteamVR binary, but this doesn&#039;t work in the Flatpak. Instead we&#039;ll have do it manually.&lt;br /&gt;
&lt;br /&gt;
  # setcap CAP_SYS_NICE+ep ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher&lt;br /&gt;
&lt;br /&gt;
Then restart Steam.&lt;br /&gt;
&lt;br /&gt;
There is an issue for this [https://github.com/flathub/com.valvesoftware.Steam/issues/636#issuecomment-779763326 on the Flathub repository].&lt;br /&gt;
&lt;br /&gt;
=== Steam - Error: OpenGL GLX extension not supported by display ===&lt;br /&gt;
&lt;br /&gt;
Add the Mesa gallium driver and reboot your system.&lt;br /&gt;
&lt;br /&gt;
 # apk add {{pkg|mesa-dri-gallium|arch=x86_64}}&lt;br /&gt;
&lt;br /&gt;
=== eventfd: Too many open files ===&lt;br /&gt;
&lt;br /&gt;
Due to a low amount of allowed open file descriptors, Proton games may crash shortly after launching. This can be worked around by disabling esync but many games will perform measurably worse without it. Instead, user limits should be increased. In order to do this, you will need [[PAM]] and a PAM enabled login.&lt;br /&gt;
&lt;br /&gt;
Add the following to &amp;lt;code&amp;gt;/etc/security/limits.conf&amp;lt;/code&amp;gt;:&lt;br /&gt;
 @users hard nofile 524288&lt;br /&gt;
&lt;br /&gt;
{{Note|Although you should already belong to the users group, you can run &amp;lt;code&amp;gt;groups&amp;lt;/code&amp;gt; to check.}}&lt;br /&gt;
&lt;br /&gt;
Reboot and run &amp;lt;code&amp;gt;ulimit -Hn&amp;lt;/code&amp;gt; to verify the new limits are applied.&lt;br /&gt;
&lt;br /&gt;
=== dbus-launch: no such file or directory ===&lt;br /&gt;
&lt;br /&gt;
Set up [[D-Bus|dbus]] for your session.&lt;br /&gt;
&lt;br /&gt;
=== Steam games launched via Proton crash before creating a window ===&lt;br /&gt;
&lt;br /&gt;
Instead of just using the in-Steam menu to install and select a Proton version, try installing the flatpak community build for Proton onto your system. There are several versions, depending on your desired stability, and the experimental version available in Flathub is called &amp;quot;com.valvesoftware.Steam.CompatibilityTool.Proton-Exp&amp;quot;. After you install your chosen version, go into Steam to specify compatibility tool for a game as usual. The installed community build will now be an option. Select that and try launching the game again.&lt;br /&gt;
&lt;br /&gt;
As your last resort, you can try installing [https://github.com/GloriousEggroll/proton-ge-custom proton-ge-custom], but please note that in order for this to be even detected by Steam, you will need to install Steam via Nix due to high level of isolation that Flatpaks utilize. This can however come at the expense of your [https://tosdr.org/en/service/180 privacy].&lt;br /&gt;
&lt;br /&gt;
=== Steam spams dmesg with x86/split lock detection entries ===&lt;br /&gt;
&lt;br /&gt;
Add the below line to {{path|/etc/sysctl.conf}}:&lt;br /&gt;
  kernel.split_lock_mitigate = 0&lt;br /&gt;
&lt;br /&gt;
=== Steam hangs on start with a steamwebhelper popup ===&lt;br /&gt;
&lt;br /&gt;
If this happens and {{path|~/.var/app/com.valvesoftware.Steam/.local/share/Steam/logs/steamwebhelper.log}} says that you are missing X server or &amp;lt;var&amp;gt;DISPLAY&amp;lt;/var&amp;gt;, it means your &amp;lt;var&amp;gt;DISPLAY&amp;lt;/var&amp;gt; is not present in the activation environment. For more information please see https://github.com/ValveSoftware/steam-for-linux/issues/10554 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Sway]]&#039;&#039;&#039;: Go into your sway config file and ensure that &amp;lt;var&amp;gt;DISPLAY&amp;lt;/var&amp;gt; appears in the {{ic|dbus-update-activation environment}} line, as well as the [https://github.com/swaywm/sway/wiki#systemd-and-dbus-activation-environments others stated here], then restart:&lt;br /&gt;
&amp;lt;pre&amp;gt;exec dbus-update-activation-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP=sway SWAYSOCK I3SOCK XCURSOR_SIZE XCURSOR_THEME&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information about this line, please see the [[Sway|Alpine Linux wiki entry]] on Sway&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hyprland&#039;&#039;&#039;: Add an exec-once to the configuration file at {{path|~/.config/hypr/hyprland}} to set &amp;lt;var&amp;gt;DISPLAY&amp;lt;/var&amp;gt;. Similarly to Sway you may already have a line that sets other variables. If so, add &amp;lt;var&amp;gt;DISPLAY&amp;lt;/var&amp;gt; to the line. The line should look similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;exec-once = dbus-update-activation-environment DISPLAY&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Gaming on Alpine|Gaming on Alpine Linux]]&lt;br /&gt;
* [[Flatpak]]&lt;br /&gt;
* [https://github.com/ValveSoftware/gamescope Gamescope] - SteamOS session compositing window manager, available on Alpine Linux as {{Pkg|gamescope}}&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Steam Steam on postmarketOS]&lt;br /&gt;
&lt;br /&gt;
[[category:Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Game_development_on_Alpine_Linux&amp;diff=32052</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=32052"/>
		<updated>2026-02-15T06:00:27Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Added &amp;#039;Gaming&amp;#039; category.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the various software development libraries available in Alpine Linux from the perspective of developing games on Alpine Linux.  Visit [[Gaming on Alpine]] page, if you are interested in knowing about various ways to play games in 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;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Gamepad&amp;diff=32051</id>
		<title>Gamepad</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Gamepad&amp;diff=32051"/>
		<updated>2026-02-15T05:56:15Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Added /* See also */ section:  Gaming on Alpine - Support Software section, &amp;#039;qt5-qtgamepad&amp;#039; and &amp;#039;razercfg&amp;#039;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article covers gamepads, joysticks and other game controllers.&lt;br /&gt;
&lt;br /&gt;
== With [[Eudev|eudev]] ==&lt;br /&gt;
&lt;br /&gt;
By default, only members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; group can access gamepad and joystick devices. However, making users members of the &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; group has a negative security impact on which processes can obtain raw keyboard and mouse input.&lt;br /&gt;
&lt;br /&gt;
To grant members of the &amp;lt;code&amp;gt;plugdev&amp;lt;/code&amp;gt; group access to gamepads, create an udev rule. For example, {{Cat|/etc/udev/rules.d/90-joysticks.rules|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ACTION==&amp;quot;add&amp;quot;, KERNEL==&amp;quot;js[0-9]*&amp;quot;, SUBSYSTEM==&amp;quot;input&amp;quot;, RUN+=&amp;quot;/bin/chown root:plugdev /dev/input/js%n&amp;quot;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Reload all rules with&lt;br /&gt;
&lt;br /&gt;
{{cmd|# udevadm control --reload}}&lt;br /&gt;
&lt;br /&gt;
Then (re)connect the game controller.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Gaming_on_Alpine#Support_Software|Gaming on Alpine - Support Software section]].&lt;br /&gt;
* {{Pkg|qt5-qtgamepad}} - Adds support to get events from gamepad devices.&lt;br /&gt;
* {{Pkg|razercfg}} - Razer mouse configuration tool.&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[Category:Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Gaming_on_Alpine&amp;diff=32050</id>
		<title>Gaming on Alpine</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Gaming_on_Alpine&amp;diff=32050"/>
		<updated>2026-02-15T05:50:27Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* See also */ &amp;#039;obs-studio&amp;#039; syntax restored.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the various game-related packages that are available in Alpine Linux and lists alternative ways to game. If you are interested in developing games on Alpine Linux, visit [[Game development on Alpine Linux]].&lt;br /&gt;
&lt;br /&gt;
== Installing Games ==&lt;br /&gt;
&lt;br /&gt;
As when installing any other package, run the following:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas apk add &amp;lt;var&amp;gt;game&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;var&amp;gt;game&amp;lt;/var&amp;gt; is the name of the package containing the game, such as {{Pkg|micro-tetris}} from among the [[#List of games|available games]].&lt;br /&gt;
&lt;br /&gt;
== Steam ==&lt;br /&gt;
{{Main|Steam}}&lt;br /&gt;
Steam, a popular game distribution platform by Valve, can be run on Alpine Linux as a [[Flatpak]] or as this [https://github.com/ivan-hc/Steam-appimage AppImage].&lt;br /&gt;
&lt;br /&gt;
== Wine ==&lt;br /&gt;
&lt;br /&gt;
{{Pkg|wine}} enables a variety of Windows software to be run, including games, under Linux. If one is using x86_64 architecture, then 32-bit applications will run in Wine&#039;s &#039;&#039;WoW64&#039;&#039; mode, which may not be compatible with all software.&lt;br /&gt;
&lt;br /&gt;
=== Wine inside docker ===&lt;br /&gt;
&lt;br /&gt;
To run windows app/games inside a [https://www.reddit.com/r/linux4noobs/comments/1fegh0i/winealpine/ docker container] on Alpine Linux, {{pkg|libcap}} is required in order to fix issues related to [https://gitlab.winehq.org/wine/wine/-/wikis/FAQ#failed-to-use-icmp-network-ping-this-requires-special-permissions raw sockets].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
RUN apk add --no-cache libcap&lt;br /&gt;
RUN setcap cap_net_raw+epi /usr/bin/wine-preloader&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
&lt;br /&gt;
To make sure that your user&#039;s account (&amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt;) is in the &#039;&#039;&amp;quot;games&amp;quot;&#039;&#039; group, first check whether the group is listed in &amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt;&#039;s groups listing:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ id &amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&amp;quot;games&amp;quot;&#039;&#039; does not appear in the listing, then add the group to the user by executing the following:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas adduser &amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt; games}}&lt;br /&gt;
&lt;br /&gt;
Log-off and then log back on in order for the changes to take effect. Most games do not require this in order to work.&lt;br /&gt;
&lt;br /&gt;
== List of games ==&lt;br /&gt;
&lt;br /&gt;
Below is a list of game packages that are available on Alpine Linux:-&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#333333; color:#ffffff; font-size: 0.9em; text-align:center;&amp;quot;&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; |Game &lt;br /&gt;
|width=&amp;quot;20%&amp;quot; | Package name &lt;br /&gt;
|| Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.advancemame.it/ AdvanceMAME] || {{Pkg|advancemame}} || Arcade simulator.&lt;br /&gt;
|-&lt;br /&gt;
| [https://gitlab.gnome.org/GNOME/aisleriot Aisleriot] || {{Pkg|aisleriot}} || Solitaire card games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://bsd-games.sourceforge.io/ bsd-games] || {{Pkg|bsd-games}} || Traditional text mode games from BSD.&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.chocolate-doom.org/wiki/index.php/Chocolate_Doom Chocolate Doom] || {{Pkg|chocolate-doom}} || Portable release of Doom, Heretic, Hexen, and Strife.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.dosbox-staging.org/ DOSBox Staging] || {{Pkg|dosbox-staging}} || DOS-emulator that uses SDL.&lt;br /&gt;
|-&lt;br /&gt;
| [http://juzzlin.github.io/DustRacing2D/ Dust Racing 2D (dustrac)] || {{Pkg|dustracing2d}} || Traditional top-down car racing game including a level editor.&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.flarerpg.org/ Flare (game)] || {{Pkg|flare-game}} || Fantasy action RPG using the FLARE engine (not to be confused with {{Pkg|flare}}, the unofficial Signal GTK client).&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.flightgear.org/ FlightGear]|| {{Pkg|flightgear}} || Flight simulator.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.freeciv.org Freeciv]|| {{Pkg|freeciv}} || Free and Open Source empire-building strategy game.&lt;br /&gt;
|-&lt;br /&gt;
|[https://freedoom.github.io/ Freedoom]|| {{Pkg|freedoom}} || an entirely free software game running on a Doom engine.&lt;br /&gt;
|-&lt;br /&gt;
| [https://davidgriffith.gitlab.io/frotz/ Frotz] || {{Pkg|frotz}} || Z machine (Infocom interactive fiction) Interpreter.&lt;br /&gt;
|-&lt;br /&gt;
| [https://gcompris.net/index-en.html GCompris] || {{Pkg|gcompris-qt}} || Educational software suite comprising of numerous activities for children aged 2 to 10.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.gnu.org/software/chess/ GNU Chess]|| {{Pkg|gnuchess}} || Play chess against the computer.&lt;br /&gt;
|-&lt;br /&gt;
|[https://zdoom.org/index GZDoom] || {{Pkg|gzdoom}} || Modern game engine resembling modern FPSes compatible with Doom WADs&lt;br /&gt;
|-&lt;br /&gt;
| [https://gitlab.gnome.org/World/highscore Highscore] || {{Pkg|highscore}} || A &#039;rewrite&#039; of Highscore, formerly known as gnome-games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://apps.kde.org/kpat/ KPat (KPatience)] || {{Pkg|kpat}} || A selection of solitaire card games packaged by KDE.&lt;br /&gt;
|-&lt;br /&gt;
| [https://lgames.sourceforge.io/LBreakout2/ LBreakout2]|| {{Pkg|lbreakout2}} || Ball-and-paddle game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://lgames.sourceforge.io/LBreakoutHD LBreakoutHD] || {{Pkg|lbreakouthd}} || {{Note|No level editor available.}}&lt;br /&gt;
The successor to LBreakout2. &lt;br /&gt;
{{Pkg|lbreakout2}} is needed for level creation.&lt;br /&gt;
|-&lt;br /&gt;
| [https://lgames.sourceforge.io/LPairs LPairs]|| {{Pkg|lpairs2}} || Classical memory game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.luanti.org/ Luanti] || {{Pkg|luanti}} || An open source voxel game engine.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/troglobit/tetris Micro Tetris] || {{Pkg|micro-tetris}} || A version of Tetris that uses ANSI escape sequences and can fit in embedded devices.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.nethack.org NetHack] || {{Pkg|nethack}} || A single player Rogue-like dungeon crawler or dungeon exploration game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/abakh/nbsdgames New BSD Games] || {{Pkg|nbsdgames}} || A package of 18 text-based modern games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://openrct2.io/ OpenRCT2] || {{Pkg|openrct2}} || A free and open-source reimplementation of “RollerCoaster Tycoon 2”.&lt;br /&gt;
{{Note| Requires original files of “RollerCoaster Tycoon 2” to play.}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.openttd.org/ OpenTTD]|| {{Pkg|openttd}} || A business simulation game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.retroarch.com/ RetroArch] || {{Pkg|retroarch}} || Frontend for emulators, game engines, and media players using libretro.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.scummvm.org/ ScummVM]|| {{Pkg|scummvm}} || Engine for several graphical adventure games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ Simon Tatham&#039;s Portable Puzzle Collection] || {{Pkg|sgt-puzzles}} || Small programs offering puzzle games for one player.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.supertux.org/ SuperTux] || {{Pkg|supertux}} || Classic 2D jump&#039;n&#039;run side-scroller game in a style similar to the original Super Mario games.&lt;br /&gt;
|-&lt;br /&gt;
|[https://supertuxkart.net/Main_Page SuperTuxKart] || {{pkg|supertuxkart}} || Kart racing game with OSS mascots.&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.xonotic.org/ Xonotic] || {{Pkg|xonotic}} || The Free and Fast Arena Shooter.&lt;br /&gt;
Clients are: {{Pkg|xonotic-sdl}} or {{Pkg|xonotic-glx}}.  Install {{Pkg|xonotic-server}} to run a dedicated server.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Support Software ==&lt;br /&gt;
{{Expand|Contributions/guidance encouraged – here or as new wiki pages.  Thank you!}}{{Seealso|Gamepad}}&lt;br /&gt;
Available on Alpine Linux:-&lt;br /&gt;
* {{Pkg|game-devices-udev}} - Udev rules for various game controllers.&lt;br /&gt;
* {{Pkg|gamemode}} - Optimise Linux system performance on demand.&lt;br /&gt;
* {{Pkg|kodi-game-libretro*}} - Emulator add-ons for [[Kodi]] to enable older/retro games using the Libretro system.&lt;br /&gt;
* {{Pkg|libgnome-games-support}} - Code shared between GNOME games.&lt;br /&gt;
* {{Pkg|libkdegames}} - Common code and data for many KDE games.&lt;br /&gt;
* {{Pkg|py3-pygame}} - Python library for making applications and games based on SDL.&lt;br /&gt;
* {{Pkg|texlive-games}} - TeX Live games typesetting tools.&lt;br /&gt;
* {{Pkg|texmf-dist-games}} - Games typesetting using texmf-dist.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Steam|Steam on Alpine Linux]]&lt;br /&gt;
* [https://wine.htmlvalidator.com/install-wine-on-alpine-linux-3.html How to Install Wine on Alpine Linux 3]&lt;br /&gt;
* [https://gitlab.winehq.org/wine/wine/-/wikis/FAQ  Wine FAQ]&lt;br /&gt;
* [https://obsproject.com/ OBS Studio] ({{Pkg|obs-studio}}) - Used by live streamers on streaming platforms such as YouTube and Twitch.&lt;br /&gt;
* [[Using Distrobox For VR Gaming]]&lt;br /&gt;
&lt;br /&gt;
[[category:Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Gaming_on_Alpine&amp;diff=32049</id>
		<title>Gaming on Alpine</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Gaming_on_Alpine&amp;diff=32049"/>
		<updated>2026-02-15T05:47:22Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. /*Permissions*/Added &amp;#039;id&amp;#039; cli to check whether the user is in the games group;  2.  /* List of games */ Added bsd-games, dustracing2d, flare-game, highscore, kpat, nbsdgames and sgt-puzzles;  3. Added /*Support Software*/ section with encouragement to expand it;  4. /* See also */ Promoted &amp;#039;How to Install Wine on Alpine Linux 3&amp;#039; link;  added Using Distrobox For VR Gaming;   5.  Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the various game-related packages that are available in Alpine Linux and lists alternative ways to game. If you are interested in developing games on Alpine Linux, visit [[Game development on Alpine Linux]].&lt;br /&gt;
&lt;br /&gt;
== Installing Games ==&lt;br /&gt;
&lt;br /&gt;
As when installing any other package, run the following:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas apk add &amp;lt;var&amp;gt;game&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;var&amp;gt;game&amp;lt;/var&amp;gt; is the name of the package containing the game, such as {{Pkg|micro-tetris}} from among the [[#List of games|available games]].&lt;br /&gt;
&lt;br /&gt;
== Steam ==&lt;br /&gt;
{{Main|Steam}}&lt;br /&gt;
Steam, a popular game distribution platform by Valve, can be run on Alpine Linux as a [[Flatpak]] or as this [https://github.com/ivan-hc/Steam-appimage AppImage].&lt;br /&gt;
&lt;br /&gt;
== Wine ==&lt;br /&gt;
&lt;br /&gt;
{{Pkg|wine}} enables a variety of Windows software to be run, including games, under Linux. If one is using x86_64 architecture, then 32-bit applications will run in Wine&#039;s &#039;&#039;WoW64&#039;&#039; mode, which may not be compatible with all software.&lt;br /&gt;
&lt;br /&gt;
=== Wine inside docker ===&lt;br /&gt;
&lt;br /&gt;
To run windows app/games inside a [https://www.reddit.com/r/linux4noobs/comments/1fegh0i/winealpine/ docker container] on Alpine Linux, {{pkg|libcap}} is required in order to fix issues related to [https://gitlab.winehq.org/wine/wine/-/wikis/FAQ#failed-to-use-icmp-network-ping-this-requires-special-permissions raw sockets].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
RUN apk add --no-cache libcap&lt;br /&gt;
RUN setcap cap_net_raw+epi /usr/bin/wine-preloader&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
&lt;br /&gt;
To make sure that your user&#039;s account (&amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt;) is in the &#039;&#039;&amp;quot;games&amp;quot;&#039;&#039; group, first check whether the group is listed in &amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt;&#039;s groups listing:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ id &amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&amp;quot;games&amp;quot;&#039;&#039; does not appear in the listing, then add the group to the user by executing the following:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas adduser &amp;lt;var&amp;gt;youruser&amp;lt;/var&amp;gt; games}}&lt;br /&gt;
&lt;br /&gt;
Log-off and then log back on in order for the changes to take effect. Most games do not require this in order to work.&lt;br /&gt;
&lt;br /&gt;
== List of games ==&lt;br /&gt;
&lt;br /&gt;
Below is a list of game packages that are available on Alpine Linux:-&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#333333; color:#ffffff; font-size: 0.9em; text-align:center;&amp;quot;&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; |Game &lt;br /&gt;
|width=&amp;quot;20%&amp;quot; | Package name &lt;br /&gt;
|| Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.advancemame.it/ AdvanceMAME] || {{Pkg|advancemame}} || Arcade simulator.&lt;br /&gt;
|-&lt;br /&gt;
| [https://gitlab.gnome.org/GNOME/aisleriot Aisleriot] || {{Pkg|aisleriot}} || Solitaire card games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://bsd-games.sourceforge.io/ bsd-games] || {{Pkg|bsd-games}} || Traditional text mode games from BSD.&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.chocolate-doom.org/wiki/index.php/Chocolate_Doom Chocolate Doom] || {{Pkg|chocolate-doom}} || Portable release of Doom, Heretic, Hexen, and Strife.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.dosbox-staging.org/ DOSBox Staging] || {{Pkg|dosbox-staging}} || DOS-emulator that uses SDL.&lt;br /&gt;
|-&lt;br /&gt;
| [http://juzzlin.github.io/DustRacing2D/ Dust Racing 2D (dustrac)] || {{Pkg|dustracing2d}} || Traditional top-down car racing game including a level editor.&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.flarerpg.org/ Flare (game)] || {{Pkg|flare-game}} || Fantasy action RPG using the FLARE engine (not to be confused with {{Pkg|flare}}, the unofficial Signal GTK client).&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.flightgear.org/ FlightGear]|| {{Pkg|flightgear}} || Flight simulator.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.freeciv.org Freeciv]|| {{Pkg|freeciv}} || Free and Open Source empire-building strategy game.&lt;br /&gt;
|-&lt;br /&gt;
|[https://freedoom.github.io/ Freedoom]|| {{Pkg|freedoom}} || an entirely free software game running on a Doom engine.&lt;br /&gt;
|-&lt;br /&gt;
| [https://davidgriffith.gitlab.io/frotz/ Frotz] || {{Pkg|frotz}} || Z machine (Infocom interactive fiction) Interpreter.&lt;br /&gt;
|-&lt;br /&gt;
| [https://gcompris.net/index-en.html GCompris] || {{Pkg|gcompris-qt}} || Educational software suite comprising of numerous activities for children aged 2 to 10.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.gnu.org/software/chess/ GNU Chess]|| {{Pkg|gnuchess}} || Play chess against the computer.&lt;br /&gt;
|-&lt;br /&gt;
|[https://zdoom.org/index GZDoom] || {{Pkg|gzdoom}} || Modern game engine resembling modern FPSes compatible with Doom WADs&lt;br /&gt;
|-&lt;br /&gt;
| [https://gitlab.gnome.org/World/highscore Highscore] || {{Pkg|highscore}} || A &#039;rewrite&#039; of Highscore, formerly known as gnome-games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://apps.kde.org/kpat/ KPat (KPatience)] || {{Pkg|kpat}} || A selection of solitaire card games packaged by KDE.&lt;br /&gt;
|-&lt;br /&gt;
| [https://lgames.sourceforge.io/LBreakout2/ LBreakout2]|| {{Pkg|lbreakout2}} || Ball-and-paddle game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://lgames.sourceforge.io/LBreakoutHD LBreakoutHD] || {{Pkg|lbreakouthd}} || {{Note|No level editor available.}}&lt;br /&gt;
The successor to LBreakout2. &lt;br /&gt;
{{Pkg|lbreakout2}} is needed for level creation.&lt;br /&gt;
|-&lt;br /&gt;
| [https://lgames.sourceforge.io/LPairs LPairs]|| {{Pkg|lpairs2}} || Classical memory game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.luanti.org/ Luanti] || {{Pkg|luanti}} || An open source voxel game engine.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/troglobit/tetris Micro Tetris] || {{Pkg|micro-tetris}} || A version of Tetris that uses ANSI escape sequences and can fit in embedded devices.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.nethack.org NetHack] || {{Pkg|nethack}} || A single player Rogue-like dungeon crawler or dungeon exploration game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/abakh/nbsdgames New BSD Games] || {{Pkg|nbsdgames}} || A package of 18 text-based modern games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://openrct2.io/ OpenRCT2] || {{Pkg|openrct2}} || A free and open-source reimplementation of “RollerCoaster Tycoon 2”.&lt;br /&gt;
{{Note| Requires original files of “RollerCoaster Tycoon 2” to play.}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.openttd.org/ OpenTTD]|| {{Pkg|openttd}} || A business simulation game.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.retroarch.com/ RetroArch] || {{Pkg|retroarch}} || Frontend for emulators, game engines, and media players using libretro.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.scummvm.org/ ScummVM]|| {{Pkg|scummvm}} || Engine for several graphical adventure games.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ Simon Tatham&#039;s Portable Puzzle Collection] || {{Pkg|sgt-puzzles}} || Small programs offering puzzle games for one player.&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.supertux.org/ SuperTux] || {{Pkg|supertux}} || Classic 2D jump&#039;n&#039;run side-scroller game in a style similar to the original Super Mario games.&lt;br /&gt;
|-&lt;br /&gt;
|[https://supertuxkart.net/Main_Page SuperTuxKart] || {{pkg|supertuxkart}} || Kart racing game with OSS mascots.&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.xonotic.org/ Xonotic] || {{Pkg|xonotic}} || The Free and Fast Arena Shooter.&lt;br /&gt;
Clients are: {{Pkg|xonotic-sdl}} or {{Pkg|xonotic-glx}}.  Install {{Pkg|xonotic-server}} to run a dedicated server.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Support Software ==&lt;br /&gt;
{{Expand|Contributions/guidance encouraged – here or as new wiki pages.  Thank you!}}{{Seealso|Gamepad}}&lt;br /&gt;
Available on Alpine Linux:-&lt;br /&gt;
* {{Pkg|game-devices-udev}} - Udev rules for various game controllers.&lt;br /&gt;
* {{Pkg|gamemode}} - Optimise Linux system performance on demand.&lt;br /&gt;
* {{Pkg|kodi-game-libretro*}} - Emulator add-ons for [[Kodi]] to enable older/retro games using the Libretro system.&lt;br /&gt;
* {{Pkg|libgnome-games-support}} - Code shared between GNOME games.&lt;br /&gt;
* {{Pkg|libkdegames}} - Common code and data for many KDE games.&lt;br /&gt;
* {{Pkg|py3-pygame}} - Python library for making applications and games based on SDL.&lt;br /&gt;
* {{Pkg|texlive-games}} - TeX Live games typesetting tools.&lt;br /&gt;
* {{Pkg|texmf-dist-games}} - Games typesetting using texmf-dist.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Steam|Steam on Alpine Linux]]&lt;br /&gt;
* [https://wine.htmlvalidator.com/install-wine-on-alpine-linux-3.html How to Install Wine on Alpine Linux 3]&lt;br /&gt;
* [https://gitlab.winehq.org/wine/wine/-/wikis/FAQ  Wine FAQ]&lt;br /&gt;
* [https://obsproject.com/ OBS Studio] ({Pkg|obs-studio}}) - Used by live streamers on streaming platforms such as YouTube and Twitch.&lt;br /&gt;
* [[Using Distrobox For VR Gaming]]&lt;br /&gt;
&lt;br /&gt;
[[category:Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Display_manager&amp;diff=32048</id>
		<title>Display manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Display_manager&amp;diff=32048"/>
		<updated>2026-02-15T04:47:48Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Added passage describing display managers as a subset of login managers, and elaborated on the latter; indicated not to mistake Greetd greeters as login managers;  2. Amended listings for both of these types of login managers, as agetty and greetd should not be listed as display managers;  3. Added getty as console login manager; 4. Added &amp;#039;Configuration&amp;#039; section:  &amp;#039;PAM&amp;#039;;  5. Added &amp;#039;See also&amp;#039; section: Elogind, Seatd, PAM, Setup-desktop, Getty howto;  6. Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [https://en.wikipedia.org/wiki/X_display_manager &#039;&#039;display manager (DM)&#039;&#039;] presents the user with a login screen. A session starts when a user successfully enters a valid combination of username and password. It is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;basic login manager&#039;&#039; only handles basic console authentication:  a prompt for username and password.  This is what Alpine Linux displays when it is first run — the &#039;&#039;getty&#039;&#039; basic login manager, launched by inittab.  &lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;full login manager&#039;&#039; would additionally provide:-&lt;br /&gt;
* Session type detection ({{ic|XDG_SESSION_TYPE}}) and automatic [[XDG_RUNTIME_DIR]] setup, possibly through &#039;&#039;&#039;elogind&#039;&#039;&#039;/&#039;&#039;&#039;seatd&#039;&#039;&#039; session managers (requires [[#PAM|PAM]] when using &#039;&#039;&#039;elogind&#039;&#039;&#039;).&lt;br /&gt;
* A desktop environment selection for the session.&lt;br /&gt;
* Optional PAM integration - [[Display_manager#PAM|see PAM section below]].&lt;br /&gt;
* A graphical greeter may optionally be included.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Display managers&#039;&#039; are a subset of full login managers that offer further features:-&lt;br /&gt;
* A graphical user interface (GUI) greeter, possibly with a choice of themes.&lt;br /&gt;
* Autologin, guest sessions and/or fast user switching.&lt;br /&gt;
* Wayland/X11 display server control.&lt;br /&gt;
* Remote login facility e.g. a [[Remote Desktop Server]] or the X-display manager&#039;s XDMCP protocol.&lt;br /&gt;
&lt;br /&gt;
There also exist [[Greetd]] &#039;&#039;greeters&#039;&#039;:  user interface (UI) frontends (not to be mistaken for actual login managers) that run under the [[Greetd]] daemon login manager:-&lt;br /&gt;
* {{Pkg|greetd-agreety}} - Simple, text-based greeter (console UI).&lt;br /&gt;
* {{Pkg|greetd-tuigreet}} - A graphical, text-based user interface (TUI) console greeter for Greetd.&lt;br /&gt;
&lt;br /&gt;
== List of Display Managers (Graphical Login Managers) ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.gnome.org/GNOME/gdm GDM] ({{Pkg|gdm}}): [[GNOME]] display manager&lt;br /&gt;
* [https://github.com/canonical/lightdm LightDM] ({{Pkg|lightdm}}): Cross-desktop display manager&lt;br /&gt;
* [[SDDM]] ({{Pkg|sddm}}): Simple Desktop Display Manager. Recommended for [[KDE]] (Plasma) and [[LXQt]].&lt;br /&gt;
* [https://gitlab.freedesktop.org/xorg/app/xdm XDM] ({{Pkg|xdm}}): X Display Manager&lt;br /&gt;
* [[LXDM]] ({{Pkg|lxdm}}): A lightweight desktop login manager&lt;br /&gt;
* [[SLiM]] ({{Pkg|slim}}): Desktop-independent graphical login manager for X11 (abandoned since 2013)&lt;br /&gt;
&lt;br /&gt;
== List of Non-Graphical or Daemon-Based Login Managers ==&lt;br /&gt;
&lt;br /&gt;
=== Console ===&lt;br /&gt;
&lt;br /&gt;
* [https://linuxvox.com/blog/linux-getty/ Getty login] - Part of the {{Pkg|util-linux}} package&lt;br /&gt;
* [[TTY_Autologin|Agetty]] ({{Pkg|agetty}}): Console-based login manager&lt;br /&gt;
&lt;br /&gt;
=== Daemon ===&lt;br /&gt;
&lt;br /&gt;
* [[greetd|Greetd]] ({{Pkg|greetd}}): Desktop-independent, lightweight login manager daemon&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== PAM ===&lt;br /&gt;
{{Main|PAM}}&lt;br /&gt;
&lt;br /&gt;
PAM provides improved security, but it is not mandatory.  It is recommended for advanced features, such as [[Configure OpenLDAP|LDAP]], 2-factor-authentification (2FA)/multi-factor-authentification (MFA) and session setup via [[elogind]].&lt;br /&gt;
 &lt;br /&gt;
Most login managers – including display managers – on Alpine Linux do not use PAM by default, in keeping with the operating system&#039;s minimalistic goal;  those login managers would require manual setup of PAM:  &lt;br /&gt;
&lt;br /&gt;
* Basic login managers, such as &#039;&#039;&#039;getty&#039;&#039;&#039; or &#039;&#039;&#039;login&#039;&#039;&#039;, authenticate directly with {{Path|/etc/passwd}} and {{Path|/etc/shadow}}. &lt;br /&gt;
* Display managers such as &#039;&#039;&#039;lightdm&#039;&#039;&#039;, &#039;&#039;&#039;sddm&#039;&#039;&#039;, plus the &#039;&#039;&#039;greetd&#039;&#039;&#039; login manager, support PAM, but they would need PAM to be installed and configured.&lt;br /&gt;
&lt;br /&gt;
See Alpine Linux&#039;s [[PAM]] wiki page for further information.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Elogind]] - Session and seat management integration.&lt;br /&gt;
* [[Seatd]] - An alternative to &#039;&#039;&#039;elogind&#039;&#039;&#039; for session and seat management.&lt;br /&gt;
* [[PAM]] - For advanced authentication and session configuration. &lt;br /&gt;
* [[Setup-desktop]] - Set up desktops and display managers automatically.&lt;br /&gt;
* [https://tldp.org/HOWTO/Text-Terminal-HOWTO-15.html Getty howto] - From the Linux Documentation Project ([https://tldp.org tldp.org]).&lt;br /&gt;
&lt;br /&gt;
[[Category:Display Managers]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Repositories&amp;diff=32009</id>
		<title>Repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Repositories&amp;diff=32009"/>
		<updated>2026-02-03T23:57:01Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Style/grammar amendments;  repos standardized to italics, as per majority use on this page, but preserving boldface in introductory instances.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
A [https://en.wikipedia.org/wiki/Software_repository repository] is a storage location with a collection of Alpine Linux [[Alpine Package Keeper#Packages and Repositories|packages]]. In addition to the three [[#Official repositories|official repositories]], technically, any directory with a collection of {{ic|*.apk}} files with a special index file named {{Path|APKINDEX.tar.gz}} can be considered a repository, albeit a personal repository. [[Alpine Package Keeper|Alpine Package Keeper (&#039;&#039;&#039;apk&#039;&#039;&#039;)]] loads repository definitions from {{Path|/etc/apk/repositories}}, has sub-commands to query repositories, and maintains the desired system state as per [[Alpine_Package_Keeper#World|world]].&lt;br /&gt;
&lt;br /&gt;
== Official repositories ==&lt;br /&gt;
&lt;br /&gt;
There are three official package repositories available in Alpine Linux:  [[#Main|main]], [[#Community|community]] and [[#Testing|testing]]. These repositories directly correspond to three directories of [[Aports tree|aports]].&lt;br /&gt;
&lt;br /&gt;
=== Main ===&lt;br /&gt;
&lt;br /&gt;
Packages in the &#039;&#039;&#039;main&#039;&#039;&#039; repository are the software that has direct support and updates from the Alpine core team. Alpine Linux tries to limit the amount of packages in &#039;&#039;main&#039;&#039; to only include essential base system packages i.e. those that are required to set up a minimal functional system, along with those packages&#039; dependencies.&lt;br /&gt;
&lt;br /&gt;
=== Community ===&lt;br /&gt;
&lt;br /&gt;
Packages in the &#039;&#039;&#039;community&#039;&#039;&#039; repository are those made by users in team with the official developers and are close to the Alpine Linux packaging process. They are supported by those user(s) contributions, and support ends [https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html#_repositories_releases_and_mirrors six months after their release]. They may also be removed in a future release due to lack of support by upstream authors or, rarely, if the user contribution(s) stop(s). &lt;br /&gt;
&lt;br /&gt;
If packages from the &#039;&#039;community&#039;&#039; repository are used, one would need to upgrade that repo [[Upgrading_Alpine#Upgrading_to_latest_release|to the latest stable release branch]] to continue to have support.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;testing&#039;&#039;&#039; repository is only available on the [[#Edge|edge]] branch, i.e. the development branch, and this is where new packages go. These are made by any contributor to Alpine Linux. Packages from &#039;&#039;testing&#039;&#039; that are accepted go to the &#039;&#039;community&#039;&#039; repository or (more rarely) to the &#039;&#039;main&#039;&#039; repository. Packages in &#039;&#039;testing&#039;&#039; have no support (staging only) and are built only for the [[#Edge|edge]] branch.&lt;br /&gt;
&lt;br /&gt;
== Release Branches ==&lt;br /&gt;
&lt;br /&gt;
Each stable release branch of Alpine Linux has its own &#039;&#039;main&#039;&#039; and &#039;&#039;community&#039;&#039; repositories. The [https://alpinelinux.org/releases/ releases] page has information on all the release branches along with support status. Support entails security patches for the given feature versions. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The current stable release branch of Alpine Linux is {{#expr:{{AlpineLatest}}}}&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
== Edge ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Edge&#039;&#039;&#039; is the name given to the current [[Aports tree|development tree]] of Alpine Linux.  The &#039;&#039;edge&#039;&#039; branch includes all three [[#Official repositories|official repositories]] and contains the latest build of all available Alpine Linux packages. Those packages are updated on a regular basis. Since &#039;&#039;edge&#039;&#039; is a development branch, many changes are not heavily tested (or tested at all), and packages can and sometimes do break without warning. &#039;&#039;edge&#039;&#039; can be considered as the &#039;&#039;&#039;rolling release version&#039;&#039;&#039; of Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
[[#Upgrading to edge|Upgrading to the &#039;&#039;edge&#039;&#039;]] branch and installing packages from [[Repositories#Testing|&#039;&#039;testing&#039;&#039;]] repository, and then submitting &#039;&#039;&#039;[https://gitlab.alpinelinux.org/alpine/aports/issues bug reports]&#039;&#039;&#039; is one of the best ways to [[Contribute|contribute]] to Alpine Linux. This is a very valuable activity that helps Alpine Linux development, as it ensures that the quality of stable releases is high.&lt;br /&gt;
&lt;br /&gt;
The currently installed &#039;&#039;edge&#039;&#039; version – i.e the build date that is attached to the &#039;&#039;edge&#039;&#039; release – may be checked with the command:{{Cmd|$ cat /etc/alpine-release}}&lt;br /&gt;
{{Warning|Do not use the [[#Edge|&#039;&#039;edge&#039;&#039; branch]] in production nor if you desire deterministic, repeatable package installation (such as with containerized environments) via [[Alpine Package Keeper#Package pinning|package pinning]], as it is under constant development.  Instead, use a [[#Release Branches|stable release branch]].}}&lt;br /&gt;
&lt;br /&gt;
=== Message on /usr merge ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Edge&#039;&#039; currently issues a message encouraging users to install the {{pkg|merge-usr}} package that would update the base filesystem hierarchy. Consult the [https://alpinelinux.org/posts/2025-10-01-usr-merge.html news release on /usr merge] for background information, including its rationale. &lt;br /&gt;
&lt;br /&gt;
This is currently not a requirement but will be implemented in the future as part of standard system upgrade to a [[Upgrading_Alpine#Upgrading_to_latest_release|new release]], as mentioned in gitlab issue {{Issue|17624}}. You can disable this nag message by [[Alpine_Package_Keeper#Package_masking|masking]] the {{Pkg|usr-merge-nag}} package: {{Cmd|$ doas apk add &#039;!usr-merge-nag&#039;}}&lt;br /&gt;
&lt;br /&gt;
{{Warning|If any error is reported upon trying a dry run by using {{ic|$ doas merge-usr --dryrun}}, do not proceed with the &#039;&#039;/usr merge&#039;&#039;, as this would break your system. Instead, it would be appreciated if you could kindly submit a &#039;&#039;&#039;[https://gitlab.alpinelinux.org/alpine/aports/issues bug report]&#039;&#039;&#039; and provide all requested information when doing so.}}&lt;br /&gt;
&lt;br /&gt;
== Managing repositories ==&lt;br /&gt;
&lt;br /&gt;
The package repositories that &#039;&#039;&#039;apk&#039;&#039;&#039; uses to retrieve package files for installation are specified in the {{path|/etc/apk/repositories}} file. Each line in {{path|/etc/apk/repositories}} specifies the location of a package repository, one repository per line, and optionally with a [[#Tagged_repository|tag]]. Lines that start with a hash character (#) are there for comments or to disable a &amp;quot;repo&amp;quot; line (temporarily or not) and are ignored by &#039;&#039;&#039;apk&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The location may be an &amp;lt;code&amp;gt;http://&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt; URL, or the path to a directory on the local filesystem. If you booted from a USB stick ({{Path|/media/sda1}}) or CD-ROM ({{Path|/media/cdrom}}), then your repository file probably looks something like this: {{Cat|/etc/apk/repositories|/media/sda1/apks/}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|During [[installation]], only the [[#Main|&#039;&#039;main&#039;&#039;]] repository is enabled, so [[#Enabling the community repository|enable the &#039;&#039;community&#039;&#039; repository]] if required, as follows.}}&lt;br /&gt;
&lt;br /&gt;
=== Enabling the community repository ===&lt;br /&gt;
&lt;br /&gt;
The [[Alpine setup scripts#setup-apkrepos|setup-apkrepos]] script can be used to enable the [[#Community|&#039;&#039;community&#039;&#039;]] repository, as follows: {{cmd|# setup-apkrepos -c}}&lt;br /&gt;
&lt;br /&gt;
With the above change, the {{path|/etc/apk/repositories}} file will look something like: {{cat|/etc/apk/repositories|#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v{{#expr:{{AlpineLatest}}}}/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v{{#expr:{{AlpineLatest}}}}/community}}&lt;br /&gt;
&lt;br /&gt;
{{Note|For better security, you should probably change the urls from &#039;&#039;&#039;http&#039;&#039;&#039; to &#039;&#039;&#039;https&#039;&#039;&#039;.  Some Alpine Linux package mirrors may not support &#039;&#039;&#039;https&#039;&#039;&#039;. If that is the case, you will need to change mirrors or revert back. You can check whether your mirror supports &#039;&#039;&#039;https&#039;&#039;&#039; on the [https://mirrors.alpinelinux.org official mirrors listing].}}&lt;br /&gt;
&lt;br /&gt;
=== Tagged repository ===&lt;br /&gt;
&lt;br /&gt;
A tagged repository is prefixed with the &amp;lt;code&amp;gt;@tag&amp;lt;/code&amp;gt; specifier, followed by a space and the repository location in the {{Path|/etc/apk/repositories}} file, as follows.{{Cat|/etc/apk/repositories|https://dl-cdn.alpinelinux.org/alpine/v{{#expr:{{AlpineLatest}}}}/main&lt;br /&gt;
https://dl-cdn.alpinelinux.org/alpine/v{{#expr:{{AlpineLatest}}}}/community&lt;br /&gt;
@personal https:/personal-repo.example.com/alpine-apks/}}&lt;br /&gt;
&lt;br /&gt;
The optional &amp;lt;code&amp;gt;@tag&amp;lt;/code&amp;gt; specifier, when used as shown above (&amp;lt;code&amp;gt;@personal&amp;lt;/code&amp;gt;), indicates that the tagged repository should not be used by default: [[apk]] will by default only use the untagged repositories, but adding a package from an &amp;lt;code&amp;gt;@&amp;lt;/code&amp;gt;-tagged repository will make &#039;&#039;&#039;apk&#039;&#039;&#039; prefer the tagged repository for the named package, even if a later version of the &#039;&#039;same package&#039;&#039; is available in another repository. It allows pulling in dependencies for the tagged package from the tagged repository, though it &#039;&#039;prefers to use untagged repositories to satisfy dependencies&#039;&#039; when possible. &lt;br /&gt;
&lt;br /&gt;
For example, {{ic|apk add busybox@personal}} enables the selection of {{ic|busybox}} from a tagged repository named &amp;lt;code&amp;gt;@personal&amp;lt;/code&amp;gt;. That command enables the installation of {{ic|busybox}} and its dependencies from the &amp;lt;code&amp;gt;@personal&amp;lt;/code&amp;gt; tagged repository.  Since tagged repositories are &#039;&#039;not&#039;&#039; prioritized, if a version of {{ic|busybox}}&#039;s &#039;&#039;dependency&#039;&#039; from an untagged repository is a better fit, it will be used.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to edge ===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [[Upgrading_Alpine_Linux_to_a_new_release_branch#Upgrading_to_Edge|Upgrading to Edge]]. &lt;br /&gt;
&lt;br /&gt;
When using edge branch, the [[Repositories#Testing|&#039;&#039;testing&#039;&#039;]] repository can be added as a [[Repositories#Tagged repository|tagged repository]]. Remember that packages in [[Repositories#Testing|&#039;&#039;testing&#039;&#039;]] repository have no support.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Do not enable &#039;&#039;main&#039;&#039;/&#039;&#039;community&#039;&#039; repositories from both the [[Repositories#Release Branches|&#039;&#039;&#039;stable&#039;&#039;&#039; release branch]] and from [[Repositories#Edge|&#039;&#039;&#039;edge&#039;&#039;&#039;]] at the same time. This can break your system. Either use edge &#039;&#039;&#039;or&#039;&#039;&#039; stable. If you mix stable and edge repositories, you&#039;re on your own.}}&lt;br /&gt;
&lt;br /&gt;
=== Using testing repository ===&lt;br /&gt;
&lt;br /&gt;
Unlike [[#Edge|edge]] branch, installing packages from &#039;&#039;testing&#039;&#039; repository in a &#039;&#039;&#039;stable&#039;&#039;&#039; [[#Release Branches|release branch]] is not recommended and is not guaranteed to work. However, if you need a package that is only available in the [[#Testing|&#039;&#039;testing&#039;&#039;]] repository, add the &#039;&#039;testing&#039;&#039; repository as a [[#Tagged repository|tagged repository]] by editing the {{path|/etc/apk/repositories}} file as follows:{{Cat|/etc/apk/repositories|https://dl-cdn.alpinelinux.org/alpine/v{{#expr:{{AlpineLatest}}}}/main&lt;br /&gt;
https://dl-cdn.alpinelinux.org/alpine/v{{#expr:{{AlpineLatest}}}}/community&lt;br /&gt;
@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing}}&lt;br /&gt;
&lt;br /&gt;
Before installing a package from the &#039;&#039;testing&#039;&#039; repository, [[Alpine_Package_Keeper#Check_Dependencies|check for dependencies]]. Installing a package from &#039;&#039;testing&#039;&#039; repository that depends on libraries in &#039;&#039;main&#039;&#039; or &#039;&#039;community&#039;&#039; often won&#039;t work due to a potential version mismatch. Alpine Linux does not officially support mixing branches this way, as mixing packages from stable and edge releases can break your system. &lt;br /&gt;
&lt;br /&gt;
For example, with the command {{ic|# apk add wireguard-go@testing}}, the &amp;lt;code&amp;gt;@testing&amp;lt;/code&amp;gt; tag allows [[apk]] to pull the necessary package(s) from the &#039;&#039;testing&#039;&#039; repository without potentially messing up your installation (too badly).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_Package_Keeper|Alpine Package Keeper]]&lt;br /&gt;
* [[Alpine_Package_Keeper#World| The Alpine Linux world file]]&lt;br /&gt;
* [https://git.alpinelinux.org/apk-tools/tree/doc/apk-repositories.5.scd Manual for apk-repositories(5)]&lt;br /&gt;
* [[Alpine Linux in a chroot]]&lt;br /&gt;
* [https://bugs.alpinelinux.org/ Report Bugs]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Mumble&amp;diff=32008</id>
		<title>Talk:Mumble</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Mumble&amp;diff=32008"/>
		<updated>2026-02-02T04:26:20Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Mumble page created with contents of of Murmur page */ Thanks for the useful tip about moving page;  how to find previous history, if required.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Mumble page created with contents of of Murmur page ==&lt;br /&gt;
#Murmur was the old name for the {{Pkg|mumble-server}} package, and &#039;&#039;&#039;Mumble&#039;&#039;&#039; is the preferred naming of the joint client/server program upstream.&lt;br /&gt;
#Expanded Beginning section to describe distinction between the client and server.&lt;br /&gt;
#Updated &amp;quot;murmur&amp;quot; package and service to their renamed version: &amp;quot;mumble-server&amp;quot;.&lt;br /&gt;
#Indicated that installing &amp;quot;murmur&amp;quot; will install &amp;quot;mumble-server&amp;quot; due to the &amp;quot;Provides&amp;quot; directive, etc.&lt;br /&gt;
#Added that Alpine Linux v3.21 and earlier still retain the original &amp;quot;murmur&amp;quot; package &amp;amp; service naming.&lt;br /&gt;
#Added that the {{Pkg|mumble-server-openrc}} package would be installed automatically on Alpine Linux&#039;s default openrc init installations&lt;br /&gt;
#Added command prompts and doas.&lt;br /&gt;
#Added &#039;&#039;See also&#039;&#039;: [[Generating SSL certs with ACF]].&lt;br /&gt;
#Style/grammar amendments. &lt;br /&gt;
[[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 04:55, 1 February 2026 (UTC)&lt;br /&gt;
: Dear [[User:John3-16|John3-16]], Thanks for updating the wiki.  For examples like this Murmur-&amp;gt;Mumble, you may want to consider &#039;&#039;&#039;moving a page&#039;&#039;&#039; instead of creating a new page as that will provide an option to preserve all the previous editing history. Moving a page will add also the redirect tag automatically. Thanks again for your contributions. -[[User:Prabuanand|Prabuanand]] ([[User talk:Prabuanand|talk]]) 04:02, 2 February 2026 (UTC)&lt;br /&gt;
::Thank you for your useful points, [[User:Prabuanand|Prabuanand]], which I hope to remember to apply next time.  In case it could help users, in order to find the history of the original contents, users could search the wiki for &amp;quot;murmur&amp;quot;, which will redirect to the &amp;quot;Mumble&amp;quot; page, and it will display a subheading:  &#039;&#039;&amp;quot;(Redirected from [https://wiki.alpinelinux.org/w/index.php?title=Murmur&amp;amp;redirect=no Murmur])&amp;quot;&#039;&#039;.  By clicking on that Murmur link, users will find the Murmur page without a redirect, and then click on its [https://wiki.alpinelinux.org/w/index.php?title=Murmur&amp;amp;action=history history] link.  Your approach would have quicker and preferable, thank you. [[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 04:26, 2 February 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Mumble&amp;diff=32006</id>
		<title>Talk:Mumble</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Mumble&amp;diff=32006"/>
		<updated>2026-02-01T04:55:11Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Mumble page created with contents of of Murmur page */ Moved and updated contents of Murmur page further to preferred naming upstream.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Mumble page created with contents of of Murmur page ==&lt;br /&gt;
#Murmur was the old name for the {{Pkg|mumble-server}} package, and &#039;&#039;&#039;Mumble&#039;&#039;&#039; is the preferred naming of the joint client/server program upstream.&lt;br /&gt;
#Expanded Beginning section to describe distinction between the client and server.&lt;br /&gt;
#Updated &amp;quot;murmur&amp;quot; package and service to their renamed version: &amp;quot;mumble-server&amp;quot;.&lt;br /&gt;
#Indicated that installing &amp;quot;murmur&amp;quot; will install &amp;quot;mumble-server&amp;quot; due to the &amp;quot;Provides&amp;quot; directive, etc.&lt;br /&gt;
#Added that Alpine Linux v3.21 and earlier still retain the original &amp;quot;murmur&amp;quot; package &amp;amp; service naming.&lt;br /&gt;
#Added that the {{Pkg|mumble-server-openrc}} package would be installed automatically on Alpine Linux&#039;s default openrc init installations&lt;br /&gt;
#Added command prompts and doas.&lt;br /&gt;
#Added &#039;&#039;See also&#039;&#039;: [[Generating SSL certs with ACF]].&lt;br /&gt;
#Style/grammar amendments. &lt;br /&gt;
[[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 04:55, 1 February 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Murmur&amp;diff=32005</id>
		<title>Murmur</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Murmur&amp;diff=32005"/>
		<updated>2026-02-01T04:50:00Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Moved contents to new &amp;quot;Mumble&amp;quot; page, further to the preferred main program name (Mumble) upstream, including recent renaming of the murmur server to mumble-server  See Talk:Mumble.  Added redirect. Also: 1. &amp;quot;Mumble&amp;quot; wiki page had been referred to in the Beginning paragraph, but the page did not exist;  2. [https://wiki.mumble.info/wiki/Running_Murmur Murmur] was a broken link, but is now updated in the Mumble page;  3. mention of mumble.ini also needed updating, now named murmur.ini.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Mumble]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Mumble&amp;diff=32004</id>
		<title>Mumble</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Mumble&amp;diff=32004"/>
		<updated>2026-02-01T04:48:14Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Created Mumble page by moving and updating contents of Murmur page, further to preferred and updated naming upstream;  2. Expanded Beginning to include client side;  3. Added &amp;#039;See also&amp;#039;.  See Talk:Mumble.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://www.mumble.info/ Mumble] is an open source, cross platform, low-latency, high quality voice over IP (VoIP) voice-chat program. It uses a client/server architecture and is primarily used by gamers, but can be used for any VoIP purpose:-&lt;br /&gt;
* {{Pkg|mumble}} (lowercase) is the client.&lt;br /&gt;
* {{Pkg|mumble-server}} is the server component.  It was previously called [https://github.com/mumble-voip/mumble#mumble---open-source-voice-chat-software murmur] and still retains that package name and service name in Alpine Linux v3.21 and earlier.  &lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
First of all, we need &#039;&#039;&#039;mumble-server&#039;&#039;&#039;.  Its dependencies will be pulled in automatically, including {{Pkg|mumble-server-openrc}} on Alpine Linux installations where OpenRC has been conserved as the init system.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas apk add mumble-server}}&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
* On Alpine Linux 3.22 and above, installing &#039;&#039;&#039;murmur&#039;&#039;&#039; will install &#039;&#039;&#039;mumble-server&#039;&#039;&#039; thanks to the {{ic|Provides: murmur}} directive of {{Pkg|mumble-server}}, thus providing backward compatibility for the &#039;&#039;packages&#039;&#039;.&lt;br /&gt;
* Thanks to the {{Pkg|murmur-compat}} subpackage of {{Pkg|mumble-server}} on Alpine Linux v3.22 and above, references to &#039;&#039;&#039;murmur&#039;&#039;&#039; there are recognized as &#039;&#039;&#039;mumble-server&#039;&#039;&#039; (via a symlink from {{Path|/etc/init.d/murmur}} pointing to {{Path|/etc/init.d/mumble-server}}), thus providing backward compatibility for the &#039;&#039;services&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
=== Setting up SSL certificates ===&lt;br /&gt;
If you already have used Certbot to set up certificates in your web server, then you can easily make a new certificate for a subdomain &#039;mumble&#039; and add the cert paths to the {{Path|murmur.ini}} configuration file. You can use nano or vim, etc., to edit the file manually.&lt;br /&gt;
{{Cmd|$ doas nano /etc/murmur.ini}}&lt;br /&gt;
It should look something like this.&lt;br /&gt;
{{Cat|/etc/murmur.ini|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sslCert=/etc/letsencrypt/live/your_domain.com/fullchain.pem&lt;br /&gt;
sslKey=/etc/letsencrypt/live/your_domain.com/privkey.pem&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Running as a service ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
Make sure that the following line is present in your {{Path|murmur.ini}}:&lt;br /&gt;
{{Cat|/etc/murmur.ini|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
pidfile=/var/run/murmur/murmur.pid&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
This will allow OpenRC to track the status of the process.&lt;br /&gt;
&lt;br /&gt;
=== Starting up the service ===&lt;br /&gt;
Start the &#039;&#039;&#039;mumble-server&#039;&#039;&#039; service.&lt;br /&gt;
{{Cmd|$ doas rc-service mumble-server start}}&lt;br /&gt;
You can add the &#039;&#039;&#039;mumble-server&#039;&#039;&#039; service to the default runlevel:&lt;br /&gt;
{{Cmd|$ doas rc-update add mumble-server default}}&lt;br /&gt;
In case at one point you don&#039;t want &#039;&#039;&#039;mumble-server&#039;&#039;&#039; to be on the default runlevel, rollback with this command:&lt;br /&gt;
{{Cmd|$ doas rc-update delete mumble-server default}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Generating SSL certs with ACF]] - Configuration of &#039;&#039;sslCert&#039;&#039; and &#039;&#039;sslKey&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category: telephony]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Custom_Kernel&amp;diff=32003</id>
		<title>Custom Kernel</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Custom_Kernel&amp;diff=32003"/>
		<updated>2026-02-01T02:05:47Z</updated>

		<summary type="html">&lt;p&gt;John3-16: &amp;quot;Work-in-progress&amp;quot; flag removed further to no objections;  see Talk:Custom Kernel/Page ready for regular release?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This process of building a &#039;&#039;&#039;custom configured kernel&#039;&#039;&#039; assumes you are running on Alpine Linux utilizing abuild &amp;amp; aports.&lt;br /&gt;
&lt;br /&gt;
== But why? ==&lt;br /&gt;
&lt;br /&gt;
You want to build a custom kernel to enable experimental hardware or features or outdated hardware, to reduce bloat further, to tune the kernel to the hardware.&lt;br /&gt;
&lt;br /&gt;
The lts kernel for most Alpine ARCHs uses defaults to balance throughput at the expense of some responsiveness, and support for many devices.  You can tweak the kernel for desktop use and low latency and responsiveness.&lt;br /&gt;
&lt;br /&gt;
You should disable modules to increase security.  By default, Alpine will install modules but not disable most of them.  Disabling modules will reduce an DMA attack but not eliminate it completely.  If you have a newer processor with VT-d, you can mitigate as long as you:&lt;br /&gt;
&lt;br /&gt;
Leave &amp;lt;code&amp;gt;CONFIG_INTEL_IOMMU_DEFAULT_ON=y&amp;lt;/code&amp;gt; or pass &amp;lt;code&amp;gt;intel_iommu=on&amp;lt;/code&amp;gt; as a kernel parameter and disable kernel logging so the attacker doesn&#039;t gain DMAR address information through dmesg.[https://blog.frizk.net/2016/11/disable-virtualization-based-security.html]  Also remove references to the kernel version to calculate the IOMMU addresses.[https://link.springer.com/content/pdf/10.1186/s13173-017-0066-7.pdf]&lt;br /&gt;
&lt;br /&gt;
You may also want to harden your kernel by adding at least some of the config changes recommended by &amp;lt;code&amp;gt;kernel-hardening-checker&amp;lt;/code&amp;gt; [https://github.com/a13xp0p0v/kernel-hardening-checker/]&lt;br /&gt;
&lt;br /&gt;
To increase the security of the boot process, if you have a TPM, you could set &amp;lt;code&amp;gt;CONFIG_INTEL_TXT=y&amp;lt;/code&amp;gt; (Enable Intel(R) Trusted Execution Technology (Intel(R) TXT)) (which is not enabled in the hardened kernel by default), then you would need the SINIT module (provided only by Intel)[https://software.intel.com/en-us/articles/intel-trusted-execution-technology], a possibly compiled TrustedGrub2[https://github.com/Rohde-Schwarz-Cybersecurity/TrustedGRUB2], trousers[https://sourceforge.net/projects/trousers/?source=navbar], tboot[https://sourceforge.net/projects/tboot/].  These packages are not in aports and it is unknown if these tools work on musl.  It&#039;s not recommended for Edge.  Also, there would be trigger packages to generate hashes for the kernel and the mkinitfs updates.&lt;br /&gt;
&lt;br /&gt;
== Setting up the Alpine Build System ==&lt;br /&gt;
&lt;br /&gt;
First, you need to follow the steps in [[Creating_an_Alpine_package#Setup_your_system_and_account|Setup your system and account for building packages]].  You also need to configure your {{path|/etc/apk/repositories}} so that they search locally for your apks.  See [[Creating_an_Alpine_package#Testing_the_package_locally|Testing the package locally]] for details.&lt;br /&gt;
&lt;br /&gt;
After setting up accounts and repos, change your shell&#039;s current working directory to &#039;&#039;&#039;aports&#039;&#039;&#039; that you just cloned.&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ cd aports}}&lt;br /&gt;
&lt;br /&gt;
== Working with aports ==&lt;br /&gt;
&lt;br /&gt;
We will try using an existing lts kernel just tweaking the {{path|lts.ARCH.config}} file.  &lt;br /&gt;
&lt;br /&gt;
=== Switching to the proper release version ===&lt;br /&gt;
&lt;br /&gt;
You need to switch to the proper branch that matches the release so that the kernel compiles against the dependencies properly.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Alpine version&lt;br /&gt;
! Remote branch&lt;br /&gt;
|-&lt;br /&gt;
| Edge&lt;br /&gt;
| master&lt;br /&gt;
|-&lt;br /&gt;
|{{#expr:{{AlpineLatest}}}}&lt;br /&gt;
|{{#expr:{{AlpineLatest}}}}-stable&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following is required to get access to the {{path|APKBUILD}} released for that version of Alpine and which you will create a commit for.&lt;br /&gt;
&lt;br /&gt;
If you are on {{#expr:{{AlpineLatest}}}} do:&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ git checkout -b {{#expr:{{AlpineLatest}}}}-stable origin/{{#expr:{{AlpineLatest}}}}-stable}}&lt;br /&gt;
&lt;br /&gt;
If you are on Edge do:&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ git checkout master}}&lt;br /&gt;
&lt;br /&gt;
=== Creating your config ===&lt;br /&gt;
&lt;br /&gt;
You can use {{pkg|linux-lts}} but what you should do is create a local branch by doing:&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;var&amp;gt;linux-lts&amp;lt;/var&amp;gt; kernel on Alpine {{#expr:{{AlpineLatest}}}}:&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ git checkout -b my-custom-kernel origin/{{#expr:{{AlpineLatest}}}}-stable}}&lt;br /&gt;
&lt;br /&gt;
For Alpine Edge:&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ git checkout -b my-custom-kernel}}&lt;br /&gt;
&lt;br /&gt;
Doing it this way, you do less work in maintaining.  All you need to do is keep &#039;&#039;master&#039;&#039; or &#039;&#039;{{#expr:{{AlpineLatest}}}}-stable&#039;&#039; in sync[https://help.github.com/articles/syncing-a-fork/][https://help.github.com/articles/configuring-a-remote-for-a-fork/] and merge any conflicts.  &lt;br /&gt;
&lt;br /&gt;
First switch to the branch by doing:{{cmd|$ git checkout my-custom-kernel}} &lt;br /&gt;
Then, you need to navigate to the {{path|main/linux-lts}} folder where you should see a APKBUILD and some config- files.&lt;br /&gt;
&lt;br /&gt;
It is a good idea to use custom `FLAVOR` in order to change the name of your kernel and package (custom flavor or revision) so you newly build kernel will not override the existing linux-lts and it&#039;s modules. Flavor build will only use your config and omit files that are not for your cpu architectures or virt* configs.(Virt configs provide optimized kernel configurations for running Alpine as a guest in virtual machines.)&lt;br /&gt;
This will also speed up the process of applying kernel patches by applying it for your architecture only. (Obviously ARCH in the following example is whatever architecture x86, x86_64...you use.)&lt;br /&gt;
&lt;br /&gt;
First make a copy of your ARCH config file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp lts.x86_64.config lts-my_custom.x86_64.config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit your custom config file and add your changes. When you are done with your edits you need to run checksum to update APKBUILD:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;FLAVOR=lts-my_custom abuild checksum&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then commit your changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git commit -a -m &amp;quot;Enabled these options ....&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You do this so that git can keep your code separate from Alpine&#039;s and so your changes float forward between kernel updates.&lt;br /&gt;
&lt;br /&gt;
== Adding custom patches ==&lt;br /&gt;
&lt;br /&gt;
Custom patches should be added to &#039;&#039;sources=&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
After you added the URL, you need to produce a checksum by doing &amp;lt;code&amp;gt;abuild checksum&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The custom patches may not be autopatched, due to being distributed as an archive or different patch level, so you need to define what to do with it in the prepare().&lt;br /&gt;
&lt;br /&gt;
== Configuring kernel ==&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to prepare and change kernel config. The basic one is to just edit your custom config file. You can also attempt to create a config tailored for your currently running system and modules.&lt;br /&gt;
&lt;br /&gt;
To create a kernel config based on your currently running PC, use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make localmodconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command reads your current kernel&#039;s configuration from /proc/config.gz (if available) or /boot/config-* and creates a .config file that includes only the modules currently loaded on your system. This results in a minimal configuration tailored to your hardware.&lt;br /&gt;
Alternatively, you can use:&lt;br /&gt;
&amp;lt;pre&amp;gt;make localyesconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is similar to &#039;&#039;localmodconfig&#039;&#039;, but instead of building features as modules (m), it builds them directly into the kernel (y), which can result in a larger kernel image but eliminates the need for separate module files.&lt;br /&gt;
Note: Before running either command, make sure you have all the hardware you want to support actively in use (USB devices plugged in, network cards active, etc.) so their modules are loaded and included in the configuration.&lt;br /&gt;
&lt;br /&gt;
The alternative is to use the kernel configuration menu in the build-NAME folder, but before you do that you need to &amp;lt;code&amp;gt;sudo apk add {{pkg|ncurses-dev}}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you are done using the menu in the build-NAME folder by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;make menuconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You want to remove &amp;lt;code&amp;gt;ncurses-dev&amp;lt;/code&amp;gt;.  When you are done, it will be stored in &#039;&#039;.config&#039;&#039; which you need to again override the {{path|lts.ARCH.config}} file.&lt;br /&gt;
&lt;br /&gt;
When you are done updating the {{path|config-NAME.ARCH}}, you need to update sums:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abuild checksum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The options in the kernel config are typically defaults.  If your device is old, it may be set to n by default.&lt;br /&gt;
&lt;br /&gt;
=== Vanilla targets and tuning ===&lt;br /&gt;
&lt;br /&gt;
{|cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!ARCH&lt;br /&gt;
!Processor Type / CPU Selection / System Type&lt;br /&gt;
!Code Generation / Instruction Extensions&lt;br /&gt;
!Timer Frequency&lt;br /&gt;
!Preemption Model&lt;br /&gt;
!Bitness&lt;br /&gt;
|-&lt;br /&gt;
|s390x&lt;br /&gt;
|IBM zEnterprise 114 and 196&lt;br /&gt;
|IBM zBC12 and zEC12 (&amp;lt;code&amp;gt;-march=zEC12 -mtune=zEC12&amp;lt;/code&amp;gt;)&lt;br /&gt;
|1000 Hz&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|ppc64le&lt;br /&gt;
|Server processors&lt;br /&gt;
|POWER8 (&amp;lt;code&amp;gt;-mcpu=power8&amp;lt;/code&amp;gt;), AltiVec (&amp;lt;code&amp;gt;-Wa,-maltivec&amp;lt;/code&amp;gt; to assembler or &amp;lt;code&amp;gt;-maltivec -mabi=altivec&amp;lt;/code&amp;gt;), VSX&lt;br /&gt;
|1000 HZ&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|ppc&lt;br /&gt;
|&lt;br /&gt;
512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx&lt;br /&gt;
* Apple PowerMac based machines&lt;br /&gt;
|AltiVec (&amp;lt;code&amp;gt;-Wa,-maltivec&amp;lt;/code&amp;gt; to assembler or &amp;lt;code&amp;gt;-maltivec -mabi=altivec&amp;lt;/code&amp;gt;) on &amp;gt;=74xx&lt;br /&gt;
|1000 HZ&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|x86_64&lt;br /&gt;
|Generic-x86-64&lt;br /&gt;
|(-mtune=generic ; SIMD assembly modules enabled based on simple compile test and/or presence of CPU flag)&lt;br /&gt;
|1000 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|x86&lt;br /&gt;
|586/K5/5x86/6x86/6x86MX&lt;br /&gt;
|(-mtune=generic ; SIMD assembly modules enabled based on simple compile test and/or presence of CPU flag)&lt;br /&gt;
|1000 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|armv7&lt;br /&gt;
|&lt;br /&gt;
* ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)&lt;br /&gt;
* Freescale i.MX family -- Cortex A (i.MX51, i.MX53, i.MX6 Quad/DualLite, i.MX6 SoloLite, i.MX6 SoloX, i.MX6 UltraLite, i.MX7 Dual)&lt;br /&gt;
* Qualcomm -- (MSM8X60, MSM8960, MSM8974)&lt;br /&gt;
* Allwinner SoCs -- (A10 (sun4i), A10s / A13 (sun5i), A31 (sun6i), A20 (sun7i), sun8i Family, (sun9i))&lt;br /&gt;
* ARM Ldt Versatile Express family -- &lt;br /&gt;
|Either &amp;lt;code&amp;gt;-march=armv7-a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-march=armv5t -Wa,-march=armv7-a&amp;lt;/code&amp;gt; based on a compile test. &amp;lt;code&amp;gt;-mfpu=vfp&amp;lt;/code&amp;gt;&lt;br /&gt;
|1000 Hz&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|aarch64&lt;br /&gt;
|&lt;br /&gt;
* Allwinner sunxi 64-bit SoC Family&lt;br /&gt;
* Broadcom BCM2835 family&lt;br /&gt;
* Marvell Berlin SoC Family&lt;br /&gt;
* ARMv8 based Samsung Exynos SoC family&lt;br /&gt;
* ARMv8 based Freescale Layerscape SoC family&lt;br /&gt;
* Hisilicon SoC Family&lt;br /&gt;
* Mediatek MT65xx &amp;amp; MT81xx ARMv8 SoC&lt;br /&gt;
* Marvell EBU SoC Family&lt;br /&gt;
* Qualcomm Platforms&lt;br /&gt;
* Rockchip Platforms&lt;br /&gt;
* AMD Seattle SoC Family&lt;br /&gt;
* Altera&#039;s Stratix 10 SoCFPGA Family&lt;br /&gt;
* NVIDIA Tegra SoC Family&lt;br /&gt;
* Spreadtrum SoC platform&lt;br /&gt;
* Cavium Inc. Thunder SoC Family&lt;br /&gt;
* ARMv8 software model (Versatile Express)&lt;br /&gt;
* AppliedMicro X-Gene SOC Family&lt;br /&gt;
* Xilinx ZynqMP Family&lt;br /&gt;
|&lt;br /&gt;
|1000 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
If you do desktop multitasking, you may want to switch to Voluntary Kernel Preemption (Desktop) or Preemptible Kernel (Low-Latency Desktop) and up the Timer Frequency.  If you run a dedicated render farm node or a dedicated bitcoin miner use No Forced Preemption (Server) and decrease the Timer Frequency.&lt;br /&gt;
&lt;br /&gt;
Optimized modules (most are already compiled as modules):&lt;br /&gt;
* raid6 -- altivec, avx512, ssse3, avx2, mmx, sse, sse2, neon&lt;br /&gt;
* some operations of raid5 -- mmx (32 bit), sse (64 bit), avx&lt;br /&gt;
For Kernel API:&lt;br /&gt;
* 32-bit memcpy -- 3dnow&lt;br /&gt;
* 32-bit memory page clearing and copying -- sse (Athlon/K7 only), mmx&lt;br /&gt;
From x86/crypto, arm/crypto, powerpc/crypto:&lt;br /&gt;
* CAMELLIA -- avx2, avx, aes-ni&lt;br /&gt;
* CHACHA20 -- avx2, neon&lt;br /&gt;
* CAST5 -- avx&lt;br /&gt;
* CAST6 -- avx&lt;br /&gt;
* TWOFISH -- avx&lt;br /&gt;
* SERPENT -- avx2, avx, sse2&lt;br /&gt;
* SHA1 -- avx2, ssse3, neon, spe&lt;br /&gt;
* SHA2 -- avx2&lt;br /&gt;
* SHA256 -- ssse3, neon, spe&lt;br /&gt;
* SHA512 -- avx2, ssse3, neon&lt;br /&gt;
* POLY1305 -- avx2&lt;br /&gt;
* GHASH -- pclmulqdq (part of aes-ni), vmx (power8)&lt;br /&gt;
* AES -- aes-ni, neon, vmx (power8), spe&lt;br /&gt;
* CRC32 -- pclmulqdq, sse, neon, vmx (power8)&lt;br /&gt;
* CRCT10DIF -- pclmulqdq, sse, neon, vmx (power8)&lt;br /&gt;
&lt;br /&gt;
=== Fast reboots with kexec ===&lt;br /&gt;
{{main|kexec}}&lt;br /&gt;
&lt;br /&gt;
If you want to reboot the kernel fast avoiding the POST test, you need {{ic|doas apk add {{pkg|kexec-tools}}}} and enable kexec in the kernel:&lt;br /&gt;
&lt;br /&gt;
  Processor type and features&lt;br /&gt;
    [*] kexec system call&lt;br /&gt;
&lt;br /&gt;
=== Hibernation to prevent data loss ===&lt;br /&gt;
&lt;br /&gt;
  Power management and ACPI options&lt;br /&gt;
    [*] Hibernation (aka &#039;suspend to disk&#039;)&lt;br /&gt;
&lt;br /&gt;
Hibernation should be used if you have a laptop.  You don&#039;t want the laptop to suddenly shut off resulting in data loss, you want it to save your work based on a percentage of battery life (this requires special script).  When hibernation resumes, should lock and ask for credentials.  Depending on your needs, the hibernated image can be encrypted/decrypted which again requires additional customization to scripts.&lt;br /&gt;
&lt;br /&gt;
Hibernation with an unsanitized swap file is generally insecure because data and unlocked memory pages are swapped out in plaintext.  To increase the security either disable swap or use an encrypted swap.  The swap file/partition is typically used as the hibernation resume image.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Before building, make sure you have ccache installed.  This should reduce compile time on multiple builds.&lt;br /&gt;
You may also want to read up on compile flags - perhaps you want your build to be optimized for speed (or size which is the default).&lt;br /&gt;
Review &amp;lt;code&amp;gt;/etc/abuild.conf&amp;lt;/code&amp;gt; and set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PACKAGER_PRIVKEY=&amp;quot;/home/MY_USER_HERE/.abuild/my-email@mydomain.com-ID.rsa&amp;quot;&lt;br /&gt;
USE_CCACHE=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Please note that kernel build process may not use some of the settings you set in `abuild.conf` so in order to customize compiler or linker and/or it&#039;s flags you may need to edit APKBUILD.&lt;br /&gt;
If you have your config ready, first try building with:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FLAVOR=lts-my_custom abuild -rK 2&amp;gt;&amp;amp;1 | tee build1.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will install most of the dependencies and keep buildtime temp dirs and files (srcdir/pkgdir/deps).&lt;br /&gt;
&lt;br /&gt;
If it complains about a dependency like {{pkg|elfutils-dev}} use &amp;lt;code&amp;gt;-rKd&amp;lt;/code&amp;gt;.&lt;br /&gt;
Then, when it prompts for values for new found config options just hold enter till it starts compiling the kernel.&lt;br /&gt;
Unless you use &amp;lt;code&amp;gt;FLAVOR&amp;lt;/code&amp;gt; or removed or commented out &amp;lt;code&amp;gt;virt.*.config&amp;lt;/code&amp;gt; configs in APKBUILD there should be two sets one for -lts and the other for the -virt.&lt;br /&gt;
Just {{Key|Ctrl}}+{{Key|C}} out of the compilation process after &lt;br /&gt;
the second set so you can further customize the config.&lt;br /&gt;
Then you go into the {{path|src/linux-VER}} and edit the config file.&lt;br /&gt;
Copy the {{path|.config}} file overriding the {{path|lts.ARCH.config}} in the srcdir.&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
&lt;br /&gt;
If the build was successful the kernel packages are located in &amp;lt;code&amp;gt;~/packages/main/ARCH&amp;lt;/code&amp;gt;&lt;br /&gt;
You probably already know how to install a package in your Alpine Linux...&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
In case your new kernel may be missing a module and can&#039;t boot it is generally a good idea to keep the default &amp;lt;code&amp;gt;linux-lts&amp;lt;/code&amp;gt;, so make sure you have it installed using the command: {{Cmd|# apk add {{pkg|linux-lts}}}}&lt;br /&gt;
&lt;br /&gt;
Normally during the installation using with [[apk]], there are tools that will update initramfs and a boot loader automatically for you. For easier debugging you may want to change boot loader config and remove &amp;lt;code&amp;gt;quiet&amp;lt;/code&amp;gt; from linux command line in {{Path|/etc/default/grub}} or {{Path|/etc/update-extlinux.conf}}.&lt;br /&gt;
Or perhaps you want to change other kernel options in {{Path|/etc/mkinitfs/mkinitfs.conf}}. Please remember to generate initramfs and update your bootloader manually, eg:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# mkinitfs&lt;br /&gt;
# grub-mkconfig -o /boot/grub/grub.cfg&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
In case something goes wrong with a boot process it is also a good idea to have a bootable rescue Alpine USB ready.&lt;br /&gt;
&lt;br /&gt;
Once you have the default lts kernel and rescue USB &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt; the computer.&lt;br /&gt;
&lt;br /&gt;
If you are curious about correctness testing, some kernel modules or components do preform self tests at the beginning of the boot process.  The tools may have test suites that you run with the make command.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Kernels]]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Kernel Archwiki Kernels]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Kernel Gentoo Wiki Kernel]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Kernel/Configuration Gentoo Wiki Kernel Configuration]&lt;br /&gt;
* [[How to build the Alpine Linux kernel]]&lt;br /&gt;
* [[Kernel_live_patching|Kernel Live Patching (KLP)]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Kernel]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Custom_Kernel&amp;diff=32002</id>
		<title>Talk:Custom Kernel</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Custom_Kernel&amp;diff=32002"/>
		<updated>2026-02-01T02:02:28Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Page ready for regular release? */ &amp;quot;Work-in-progress&amp;quot; flag removed further to no objections.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Needs to be adjusted for other archs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;—&amp;amp;nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Orson Teodoro|Orson Teodoro]] ([[User talk:Orson Teodoro|{{int:talkpagelinktext}}]] • [[Special:Contributions/Orson Teodoro|{{int:contribslink}}]]) 03:36, 4 March 2018&amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;‎&lt;br /&gt;
&lt;br /&gt;
== Locations/paths of build config files ==&lt;br /&gt;
&lt;br /&gt;
My goal is to build the Virt (not Standard/LTS) kernel using the defaults for Virt, and I don&#039;t understand which files are needed in exactly which paths.&lt;br /&gt;
&lt;br /&gt;
I had difficulty understanding the excerpt below. Is anyone willing to assist me in understanding it? For example, where/what is the &amp;quot;linux-4.15&amp;quot; folder?&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;When you are done with your edits either by editing directly the APKBUILD and copying the lts.ARCH.config as .config in the linux-4.15 folder. You will then move the .config back overriding the lts.ARCH.config generated by make menuconfig.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;—&amp;amp;nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:-anthumchris-|-anthumchris-]] ([[User talk:-anthumchris-|{{int:talkpagelinktext}}]] • [[Special:Contributions/-anthumchris-|{{int:contribslink}}]]) 17:34, 23 November 2024‎&amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== build_NAME ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After you are done using the menu in the build-NAME folder by doing make menuconfig&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is really not clear what is meant by &amp;quot;the build-NAME folder&amp;quot; here.&lt;br /&gt;
&lt;br /&gt;
== Locations/paths of build config files Answer ==&lt;br /&gt;
&lt;br /&gt;
Usually these are the directories you would look for in linux-lts apk package development (replace &amp;quot;x86_64&amp;quot; with different $ARCH if needed) (replace $YOUR_WORK_DIR to which directory you downloaded aports to), &lt;br /&gt;
&lt;br /&gt;
Below should contain &amp;lt;code&amp;gt;APKBUILD&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;lts.x86_64.config&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;virt.x86_64.config&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.patch&amp;lt;/code&amp;gt; files (and more $ARCH&#039;s by default, but to keep it simple, I will just state the x86_64 files)&lt;br /&gt;
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts}}&lt;br /&gt;
&lt;br /&gt;
ALL &amp;lt;code&amp;gt;.patch&amp;lt;/code&amp;gt; files that are in $YOUR_WORK_DIR/aports/main/linux-lts are also in below&lt;br /&gt;
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src}}&lt;br /&gt;
&lt;br /&gt;
Below is a tar compressed linux file that decompresses into linux-$VERSION&lt;br /&gt;
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION.tar.gz}}&lt;br /&gt;
&lt;br /&gt;
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION}}&lt;br /&gt;
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/build-lts.x86_64}}&lt;br /&gt;
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/build-virt.x86_64}}&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;&amp;lt;code&amp;gt;APKBUILD&amp;lt;/code&amp;gt;&amp;quot; file, change this &amp;quot;&amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;&amp;quot; line to this:&lt;br /&gt;
{{cat|$YOUR_WORK_DIR/aports/main/linux-lts/APKBUILD|...&lt;br /&gt;
source{{=}}&amp;quot;https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/linux-$_kernver.tar.xz&lt;br /&gt;
    0001-powerpc-boot-wrapper-Add-z-notext-flag-for-ppc64le.patch&lt;br /&gt;
    0002-x86-Compress-vmlinux-with-zstd-19-instead-of-22.patch&lt;br /&gt;
    0003-kexec-add-kexec_load_disabled-boot-option.patch&lt;br /&gt;
    0004-objtool-respect-AWK-setting.patch&lt;br /&gt;
    0005-powerpc-config-defang-gcc-check-for-stack-protector-.patch&lt;br /&gt;
&lt;br /&gt;
    lts.x86_64.config&lt;br /&gt;
&lt;br /&gt;
    virt.x86_64.config&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
do &amp;lt;code&amp;gt;make menuconfig&amp;lt;/code&amp;gt; within &amp;lt;code&amp;gt;$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION&amp;lt;/code&amp;gt; and copy the .config file to &amp;lt;code&amp;gt;$YOUR_WORK_DIR/aports/main/linux-lts/lts.x86_64.config&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;$YOUR_WORK_DIR/aports/main/linux-lts/virt.x86_64.config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;—&amp;amp;nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Pursuable1652|Pursuable1652]] ([[User talk:Pursuable1652|{{int:talkpagelinktext}}]] • [[Special:Contributions/Pursuable1652|{{int:contribslink}}]]) 16:55, 25 December 2024‎&amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== build_NAME Answer ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;After you are done using the menu in the build-NAME folder by doing make menuconfig&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
the &amp;quot;build-NAME&amp;quot; folder should actually be &amp;lt;code&amp;gt;$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;—&amp;amp;nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Pursuable1652|Pursuable1652]] ([[User talk:Pursuable1652|{{int:talkpagelinktext}}]] • [[Special:Contributions/Pursuable1652|{{int:contribslink}}]]) 16:55, 25 December 2024‎&amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Page ready for regular release? ==&lt;br /&gt;
Perhaps this [[Custom Kernel]] page is now ready for regular use, and the &amp;quot;This material is work-in-progress&amp;quot; banner can be removed, unless there is a shortcoming found.  This draft state has held since it was helpfully created in 2014.  &lt;br /&gt;
Thanks for kind updates by [[User:Prabuanand|Prabuanand]], [[User:Pawciobiel|Pawciobiel]], [[User:Teopp7|Teopp7]], [[User:Fossdd|Fossdd]], [[User:Anthumchris|Anthumchris]], [[User:Gsora|Gsora]], [[User:Zcrayfish|Zcrayfish]], [[User:Omni|Omni]], [[User:Nabbi|Nabbi]], [[User:Psykose|Psykose]], [[User:Egberts|Egberts]] and thanks also for kind contributions by others that have not been active on the wiki for over five years. [[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 19:22, 30 December 2025 (UTC)&lt;br /&gt;
:Further to one month without objections, having tagged recent contributors, the &#039;&#039;&amp;quot;Work-in-progress&amp;quot;&#039;&#039; flag is being removed.  The contributor who kindly initiated this useful page duly placed the flag in the original [https://wiki.alpinelinux.org/w/index.php?title=Custom_Kernel&amp;amp;oldid=10201 draft version] in 2014 and last contributed to the wiki that year. [[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 02:02, 1 February 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Xen_PCI_Passthrough&amp;diff=32001</id>
		<title>Xen PCI Passthrough</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Xen_PCI_Passthrough&amp;diff=32001"/>
		<updated>2026-02-01T01:33:35Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide is to show how to configure PCI Passthrough on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
First, use &#039;&#039;lspci&#039;&#039; to find the PCI address of the device that you want to passthrough:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
node03:~# lspci&lt;br /&gt;
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 Processor Family DRAM Controller (rev 09)&lt;br /&gt;
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 05)&lt;br /&gt;
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)&lt;br /&gt;
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)&lt;br /&gt;
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)&lt;br /&gt;
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)&lt;br /&gt;
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a5)&lt;br /&gt;
00:1f.0 ISA bridge: Intel Corporation C204 Chipset Family LPC Controller (rev 05)&lt;br /&gt;
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05)&lt;br /&gt;
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)&lt;br /&gt;
01:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)&lt;br /&gt;
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection&lt;br /&gt;
03:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, let&#039;s passthrough the SAS controller. So the address is &#039;&#039;01:00.0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Make sure that &#039;&#039;xen_pciback&#039;&#039; is in your {{Path|/etc/modules}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
node03:~# grep pciback /etc/modules &lt;br /&gt;
xen_pciback&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit {{Path|/etc/conf.d/xen-pci}} to add the device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
node03:~# cat /etc/conf.d/xen-pci&lt;br /&gt;
# /etc/conf.d/xen-pci&lt;br /&gt;
&lt;br /&gt;
# PCI devices that will be used by domUs&lt;br /&gt;
DEVICES=&amp;quot;01:00.0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the &#039;&#039;xen-pci&#039;&#039; daemon to the default runlevel, and reboot:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rc-update add xen-pci default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After rebooting, you should be able to verify that the PCI device is using the pciback kernel module, and that it is visible to passthrough via &#039;&#039;xl&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
node03:~# lspci -k | grep -A2 &#039;01:00.0&#039;&lt;br /&gt;
01:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)&lt;br /&gt;
        Subsystem: LSI Logic / Symbios Logic Device 3020&lt;br /&gt;
        Kernel driver in use: pciback&lt;br /&gt;
node03:~# xl pci-assignable-list&lt;br /&gt;
0000:01:00.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following line to your DomU&#039;s configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pci = [ &#039;01:00.0&#039; ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Known Issue with LSI Controllers====&lt;br /&gt;
As the kernel module for LSI controllers is built into the Alpine Linux initramfs, the real module is loaded before the pciback module can be assigned.&lt;br /&gt;
&amp;lt;BR&amp;gt;You will need to blacklist the &#039;&#039;mpt2sas&#039;&#039; module in {{Path|/etc/modprobe.d/blacklist.conf}} and rebuild your initramfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
node03:~# grep sas /etc/modprobe.d/blacklist.conf &lt;br /&gt;
blacklist mpt2sas&lt;br /&gt;
node03:~# mkinitfs &lt;br /&gt;
==&amp;gt; initramfs: creating /boot/initramfs-grsec&lt;br /&gt;
11538 blocks&lt;br /&gt;
33641 blocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Software_management&amp;diff=31992</id>
		<title>Talk:Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Software_management&amp;diff=31992"/>
		<updated>2026-01-26T07:38:46Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* AppImage */ Flatpaks prioritized over AppImages:  subsection order restored further to testing.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please add the following if pertinent:&lt;br /&gt;
https://github.com/sgerrand/alpine-pkg-glibc/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;—&amp;amp;nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Mekineer|Mekineer]] ([[User talk:Mekineer|{{int:talkpagelinktext}}]] • [[Special:Contributions/Mekineer|{{int:contribslink}}]]) 11:04, 26 February 2024‎&amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I thought about the MegaCli wrapper.&lt;br /&gt;
It should be possible to make it read the name it was called by and then launch the respective program&lt;br /&gt;
(i.e. symlink any to-be-wrapped command to /var/lib/glibcstuff ...)&lt;br /&gt;
&lt;br /&gt;
that way you get along with one wrapper script and symlinks to it in /usr/bin.&lt;br /&gt;
&lt;br /&gt;
Another thing I couldnt figure is if it&#039;s important to use all 32bit versions?&lt;br /&gt;
&lt;br /&gt;
And the download links for archlinux are not working because they forward wget to an https url.&lt;br /&gt;
maybe this is some limitation in the default wget version. If i figure it out i&#039;ll do updates on this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this is my /usr/bin/MegaCli now, using a minimal Debian install in /debian.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KEYS=&amp;quot;kernel.grsecurity.chroot_caps kernel.grsecurity.chroot_deny_chmod \&lt;br /&gt;
kernel.grsecurity.chroot_deny_chroot kernel.grsecurity.chroot_deny_fchdir \&lt;br /&gt;
kernel.grsecurity.chroot_deny_mknod kernel.grsecurity.chroot_deny_mount \&lt;br /&gt;
kernel.grsecurity.chroot_deny_pivot kernel.grsecurity.chroot_deny_shmat \&lt;br /&gt;
kernel.grsecurity.chroot_deny_sysctl kernel.grsecurity.chroot_deny_unix \&lt;br /&gt;
kernel.grsecurity.chroot_enforce_chdir kernel.grsecurity.chroot_findtask \&lt;br /&gt;
kernel.grsecurity.chroot_restrict_nice&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for key in $KEYS ; do&lt;br /&gt;
   sysctl -w ${key}=0 1&amp;gt;/dev/null&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
export CHROOT=/debian&lt;br /&gt;
user=$(whoami)&lt;br /&gt;
if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
exit&lt;br /&gt;
fi&lt;br /&gt;
mount -t proc proc $CHROOT/proc/&lt;br /&gt;
mount --bind /dev/ $CHROOT/dev/&lt;br /&gt;
mount --bind /sys/ $CHROOT/sys/&lt;br /&gt;
#we may need dev and maybe proc too to use this program&lt;br /&gt;
chroot $CHROOT /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
umount $CHROOT/proc&lt;br /&gt;
umount $CHROOT/dev&lt;br /&gt;
umount $CHROOT/sys&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;—&amp;amp;nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Darkfader|Darkfader]] ([[User talk:Darkfader|{{int:talkpagelinktext}}]] • [[Special:Contributions/Darkfader|{{int:contribslink}}]]) 15:32, 11 July 2014‎&amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
If you know how to relax grsecurity without using vanilla on Gentoo to allow PAM to not trigger a postinst error, you should edit the Gentoo section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;—&amp;amp;nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Orson Teodoro|Orson Teodoro]] ([[User talk:Orson Teodoro|{{int:talkpagelinktext}}]] • [[Special:Contributions/Orson Teodoro|{{int:contribslink}}]]) 13:12, 3 February 2018‎&amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I&#039;m unsure, if it&#039;s OK to add the following to page: will leave it here for reference:&lt;br /&gt;
Here are the steps to run vscode, If running [[Sway]] on Alpine Linux.&lt;br /&gt;
# From your Alpine Linux host, download Visual Studio Code from the official website https://code.visualstudio.com/docs/?dv=linux64_deb to your home folder.&lt;br /&gt;
# Install the vscode as follows: {{Cmd|$ distrobox enter my-debian --sudo apt-get install -f /home/&amp;lt;Username&amp;gt;/code_&amp;lt;version_number&amp;gt;_amd64.deb}}&lt;br /&gt;
# Run vscode as follows: {{Cmd|&amp;lt;nowiki&amp;gt;$ distrobox enter my-debian -- code --ozone-platform=wayland&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
--[[User:Prabuanand|Prabuanand]] ([[User talk:Prabuanand|talk]]) 11:10, 2 June 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== AppImage ==&lt;br /&gt;
&lt;br /&gt;
Dear [[User:John3-16|John3-16]], your [https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;amp;diff=prev&amp;amp;oldid=31876 edit] changed the preferred method of running glibc applications from [[Flatpak]] to [[AppImage]]. Flathub is a known repository with a lot of applications that is guaranteed to work in Alpine Linux. I&#039;m not aware of an equivalent reliable i.e trusted source for AppImages that is guaranteed to work in Alpine Linux. &lt;br /&gt;
I tested a few from http://www.appimagehub.com and many did not work. &lt;br /&gt;
&lt;br /&gt;
Please reconsider the above edit and consider restoring the Flatpak suggestion, until AppImages consistently work in Alpine Linux. -[[User:Prabuanand|Prabuanand]] ([[User talk:Prabuanand|talk]]) 13:43, 25 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Thank you very much for comparing use, which is helpful.  It&#039;s good to feed your useful point into the wiki about so many AppImages currently failing in Alpine Linux, assuming that you had applied the gcompat layer instruction.  In view of your examination and feedback, the order of the subsections and the preference for flatpaks have been restored, as flatpaks would therefore work out easier to install in the long run despite AppImages taking fewer steps to install when they do work.  [[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 07:38, 26 January 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=31991</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=31991"/>
		<updated>2026-01-26T07:35:24Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Flatpaks prioritized over AppImages:  subsection order restored further to testing – see Talk:Software_management#AppImage.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents various ways to [[#Running glibc programs|run software compiled with glibc]] and to manage software using [[#Graphical software manager|graphical software managers]] in Alpine Linux. There are pages elsewhere regarding compiling [[Compile software from source|software from source]] and for creating a [[Custom Kernel|custom kernel]].&lt;br /&gt;
&lt;br /&gt;
== Alpine package keeper ==&lt;br /&gt;
{{Main|Alpine Package Keeper}}&lt;br /&gt;
The official package manager in Alpine Linux, [[Alpine Package Keeper|Alpine Package Keeper(apk)]], is a &#039;&#039;cli&#039;&#039; tool. [[Comparison_with_other_distros#Comparison_chart/Rosetta_Stone|Rosetta stone]] shows how standard package management tasks are done in Alpine Linux compared to other popular distributions. &lt;br /&gt;
&lt;br /&gt;
== Graphical software manager ==&lt;br /&gt;
&lt;br /&gt;
The following graphical tools are available to manage official software packages from Alpine Linux [[Repositories|repositories]] and [[#Flatpak|flatpaks]] instead of using the [[#Alpine Package Keeper|cli-based apk tool]].&lt;br /&gt;
&lt;br /&gt;
=== GNOME software ===&lt;br /&gt;
&lt;br /&gt;
[[GNOME#Configuration|GNOME software]] can be used as a GUI front end for apk to manage official software packages and flatpaks.&lt;br /&gt;
&lt;br /&gt;
=== KDE Discover ===&lt;br /&gt;
&lt;br /&gt;
[[KDE#Discover|KDE Discover]] can be used as a GUI front end for apk to manage official software packages and flatpaks.&lt;br /&gt;
&lt;br /&gt;
== Flatpak ==&lt;br /&gt;
{{Main|Flatpak}}&lt;br /&gt;
&lt;br /&gt;
[[Flatpak#Installing_Flatpak|Flatpaks]] are by far the easiest method for running programs that are not available in the official Alpine Linux [[Repositories|repositories]]. To use flatpaks, ensure that the [[Flatpak#Installing_Flatpak|Flathub repository]] is enabled.&lt;br /&gt;
&lt;br /&gt;
== AppImage ==&lt;br /&gt;
{{Main|AppImage}}&lt;br /&gt;
&lt;br /&gt;
[[AppImage|AppImages]] are another alternative to [[Flatpak|flatpaks]] for running programs that are not available in the official Alpine Linux [[Repositories|repositories]]. However, not as many AppImages work on Alpine Linux as compared to Flatpaks, since AppImages are more commonly built for glibc operating systems, as opposed to Alpine Linux&#039;s use of musl.&lt;br /&gt;
Refer to the [[AppImage]] page for prerequisites and for detailed instructions to run AppImages in Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Coldbrew ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coldbrew&#039;&#039;&#039; is a package manager that can install Alpine Linux aports Edge packages without needing root access, somewhat similar to &#039;&#039;&#039;brew&#039;&#039;&#039;.  This is particularly useful on immutable operating systems such as with [https://postmarketos.org/blog/2025/10/12/pmOS-update-2025-09/#immutable-postmarketos PostmarketOS&#039;s duranium image].  &#039;&#039;&#039;Coldbrew&#039;&#039;&#039; is available in Alpine Linux Edge testing repository as of January 2026;  the testing repository is [[Repositories#Using_testing_repository|recommended to be tagged]] if installing &#039;&#039;&#039;coldbrew&#039;&#039;&#039; on any supported Alpine Linux release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coldbrew&#039;&#039;&#039; replaces the [https://github.com/kcxt/iced &#039;&#039;&#039;iced&#039;&#039;&#039;] package on Alpine Linux, which used the {{Pkg|mkosi-sandbox}};   packages run inside a chroot using &#039;&#039;&#039;bubblewrap&#039;&#039;&#039; instead.  They have access to the home directory, but have only controlled access to all other files through explicit bind mounts.  Packages installed using &#039;&#039;&#039;coldbrew&#039;&#039;&#039; are referred to as tools.  See [https://gitlab.postmarketos.org/postmarketOS/coldbrew further details upstream].&lt;br /&gt;
&lt;br /&gt;
To install &#039;&#039;&#039;coldbrew&#039;&#039;&#039;:&lt;br /&gt;
{{Cmd|$ doas apk add coldbrew@testing}}&lt;br /&gt;
&lt;br /&gt;
To install a tool to be run by &#039;&#039;&#039;coldbrew&#039;&#039;&#039;, say, {{Pkg|corepad}}:&lt;br /&gt;
{{Cmd|$ coldbrew install corepad}}&lt;br /&gt;
&lt;br /&gt;
Note that even though the output ends...&lt;br /&gt;
&lt;br /&gt;
 Installed binary /usr/bin/corepad&lt;br /&gt;
&lt;br /&gt;
...the path being referred to exists within a new mount namespace using bind mounts in the &#039;&#039;&#039;bubblewrap&#039;&#039;&#039; sandbox.&lt;br /&gt;
&lt;br /&gt;
A wrapper program is installed to {{Path|~/.local/bin}} on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
To run the tool under &#039;&#039;&#039;coldbrew&#039;&#039;&#039;:&lt;br /&gt;
{{Cmd|$ coldbrew run corepad}}&lt;br /&gt;
&lt;br /&gt;
To remove the tool:&lt;br /&gt;
{{Cmd|$ coldbrew remove corepad}}&lt;br /&gt;
&lt;br /&gt;
All installed tools can be listed through the {{ic|$ coldbrew ls}} command.&lt;br /&gt;
&lt;br /&gt;
== Running glibc programs ==&lt;br /&gt;
&lt;br /&gt;
If you want to run [https://www.gnu.org/software/libc/ glibc] programs in Alpine Linux, there are a few ways of doing so. &lt;br /&gt;
&lt;br /&gt;
For simpler binaries, you can install [[#gcompat|gcompat]], which is a compatibility layer;  or you could do it the easy way and use [[#Flatpak|Flatpaks]] or [[#AppImage|AppImages]]. See [[#Containers|containers]] or the [[#Chroot|chroot]] section for ways to run glibc programs, including graphical ones such as {{ic|VSCode}}, {{ic|google-chrome}}, {{ic|obsidian}}, etc.&lt;br /&gt;
&lt;br /&gt;
=== gcompat ===&lt;br /&gt;
&lt;br /&gt;
[https://git.adelielinux.org/adelie/gcompat gcompat] is a library that provides glibc-compatible APIs for use on musl libc systems such as Alpine Linux. To install, issue the command: {{cmd|$ doas apk add {{pkg|gcompat}}}}&lt;br /&gt;
After that, you run your binaries as normally.&lt;br /&gt;
&lt;br /&gt;
For an usage example, refer to the [[Firefox#DRM_content_using_Widevine_workaround|Firefox]] page where gcompat is used to run the glibc-compiled Widevine binary.&lt;br /&gt;
&lt;br /&gt;
== Chroot ==&lt;br /&gt;
{{Main|Chroot}}&lt;br /&gt;
&lt;br /&gt;
An option that is easier to generalize to other glibc applications is to install a glibc-based distribution into a chroot. You can then either chroot into it, or use a symlink and some configuration to make its glibc (and associated libraries) usable from Alpine.&lt;br /&gt;
&lt;br /&gt;
{{Tip|The most reliable way to enter a chroot is to use the [[Chroot#Enter_chroot|start-chroot]] script.}}&lt;br /&gt;
&lt;br /&gt;
After setting up a chroot using any of the methods described below, the loader can be set up in Alpine as follows (these instructions are for a Debian chroot in {{Path|/var/chroots/debian}}, on x86_64, but can be adapted to other systems by using the appropriate paths):&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ doas mkdir -p /lib64&lt;br /&gt;
$ doas ln -s /var/chroots/debian/lib/x86_64-linux-gnu/ld-2.33.so /lib64&lt;br /&gt;
$ doas printf &#039;/var/chroots/debian/lib/x86_64-linux-gnu\n/var/chroots/debian/usr/lib/x86_64-linux-gnu\n&#039; &amp;gt; /etc/ld.so.conf&lt;br /&gt;
$ doas /var/chroots/debian/sbin/ldconfig}}&lt;br /&gt;
&lt;br /&gt;
=== Gentoo Linux ===&lt;br /&gt;
&lt;br /&gt;
Select a &#039;&#039;stage3&#039;&#039; from [https://www.gentoo.org/downloads/ here] and the &#039;&#039;portage&#039;&#039; latest from [https://www.gentoo.org/downloads/mirrors/ here] at gentoo/snapshots/portage-latest.tar.xz.&lt;br /&gt;
&lt;br /&gt;
First,{{cmd|$ doas apk add {{pkg|xz}}}}&lt;br /&gt;
&lt;br /&gt;
Enter the chroot:&lt;br /&gt;
{{cmd|$ doas mkdir ~/chroot&lt;br /&gt;
$ doas cd ~/chroot&lt;br /&gt;
$ doas tar -xvf stage3-*.tar.xz&lt;br /&gt;
$ doas tar -xvf portage-latest.tar.xz&lt;br /&gt;
$ doas mv portage usr&lt;br /&gt;
$ doas mount --bind /dev dev&lt;br /&gt;
$ doas mount --bind /sys sys&lt;br /&gt;
$ doas mount -t proc proc proc&lt;br /&gt;
$ doas cp /etc/resolv.conf etc&lt;br /&gt;
$ doas chroot . /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
And voilà, you have your working Gentoo chroot!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now take a look at [https://wiki.gentoo.org/wiki/Handbook:Main_Page Gentoo&#039;s Handbook] to find out how you can configure and install your system, or simply extract/copy the program that you need to run in your chroot enviroment, and then execute it.&lt;br /&gt;
&lt;br /&gt;
Here is a wrapper script that is similar to {{ic|arch-chroot}} when you frequently reuse this chroot.  Also, create an account with the same username as host current user to the chroot, or make changes to the {{ic|userspec}} option to chroot line:&lt;br /&gt;
&lt;br /&gt;
{{Cat|gentoo-chroot.sh|&amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
CHROOT_PATH=&amp;quot;/home/$USER/chroot&amp;quot;&lt;br /&gt;
cd $CHROOT_PATH&lt;br /&gt;
mount | grep $CHROOT_PATH/dev || doas mount --bind /dev dev&lt;br /&gt;
mount | grep $CHROOT_PATH/sys || doas mount --bind /sys sys&lt;br /&gt;
mount | grep $CHROOT_PATH/proc || doas mount -t proc proc proc&lt;br /&gt;
cp /etc/resolv.conf etc&lt;br /&gt;
doas chroot --userspec=$USER:users . /bin/bash&lt;br /&gt;
echo &amp;quot;You must manually unmount $CHROOT_PATH/dev, $CHROOT_PATH/sys, $CHROOT_PATH/proc.&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Do {{ic|$ chmod +x gentoo-chroot.sh}} to make it executable.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
&lt;br /&gt;
{{Seealso|Installing ArchLinux inside an Alpine chroot}}&lt;br /&gt;
Either use &#039;&#039;&#039;pacstrap&#039;&#039;&#039; (included with the arch-install-scripts package) or an Arch bootstrap image:&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ doas apk add {{pkg|arch-install-scripts}}&lt;br /&gt;
$ mkdir ~/chroot &amp;amp;&amp;amp; cd ~/chroot&lt;br /&gt;
$ curl -O https://mirrors.edge.kernel.org/archlinux/iso/latest/archlinux-bootstrap-x86_64.tar.zst&lt;br /&gt;
$ doas tar -x --zstd -f archlinux-bootstrap-x86_64.tar.zst &amp;amp;&amp;amp; rm archlinux-bootstrap-x86_64.tar.zst&lt;br /&gt;
$ doas sed -i &#039;/evowise/s/^#//&#039; root.x86_64/etc/pacman.d/mirrorlist&lt;br /&gt;
$ doas sed -i &#039;/CheckSpace/s/^/#/&#039; root.x86_64/etc/pacman.conf&lt;br /&gt;
$ doas arch-chroot root.x86_64&lt;br /&gt;
[chroot]# pacman-key --init&lt;br /&gt;
[chroot]# pacman-key --populate archlinux}}&lt;br /&gt;
&lt;br /&gt;
Once that is done, update the system and install the desired package(s) (denoted by &#039;&#039;&amp;quot;foo&amp;quot;&#039;&#039; in this example):&lt;br /&gt;
  &lt;br /&gt;
{{cmd|[chroot]# pacman -Syu &amp;lt;var&amp;gt;foo&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux provides the {{pkg|debootstrap}} package to create the Debian chroot. Here are the steps: {{cmd|$ doas apk add debootstrap&lt;br /&gt;
$ doas mkdir -p /var/chroots/debian&lt;br /&gt;
$ doas debootstrap --arch amd64 stable /var/chroots/debian/ https://deb.debian.org/debian}}&lt;br /&gt;
&lt;br /&gt;
The {{ic|--arch}} is optional, depending on your needs.&lt;br /&gt;
&lt;br /&gt;
For updating the chroot, or for installing packages and their dependencies using {{ic|apt-get}}, mount it, and then login as root:&lt;br /&gt;
{{cmd|$ doas mount --bind /dev /var/chroots/debian/dev&lt;br /&gt;
$ doas mount --bind /proc /var/chroots/debian/proc&lt;br /&gt;
$ doas mount --bind /dev/pts /var/chroots/debian/dev/pts&lt;br /&gt;
$ doas chroot /var/chroots/debian /bin/bash&lt;br /&gt;
[chroot]# apt update &amp;amp;&amp;amp; apt upgrade}}&lt;br /&gt;
&lt;br /&gt;
After installing the necessary applications and whatever else you might do, exit the chroot:&lt;br /&gt;
{{cmd|[chroot]# exit}}&lt;br /&gt;
&lt;br /&gt;
Then, unmount the binds for /dev/pts, dev and proc to avoid issues:&lt;br /&gt;
{{cmd|$ doas umount /var/chroots/debian/dev/pts&lt;br /&gt;
$ doas umount /var/chroots/debian/dev&lt;br /&gt;
$ doas umount /var/chroots/debian/proc}}&lt;br /&gt;
&lt;br /&gt;
== Containers ==&lt;br /&gt;
&lt;br /&gt;
=== Distrobox + Podman ===&lt;br /&gt;
&lt;br /&gt;
[[Distrobox]], combined with [[Podman|podman]] container running in rootless mode, allows to easily run [[Distrobox#Running_graphical_programs|glibc-compiled graphical programs]]. This will not require root privileges once set up.&lt;br /&gt;
&lt;br /&gt;
=== Bubblewrap + Chroot ===&lt;br /&gt;
&lt;br /&gt;
{{ic|glibc}} and {{ic|glibcX11}} shell aliases are defined interactively using bwrap to create a container with [[Bubblewrap]], using a [[#Debian|Debian chroot]] as its content. It&#039;s not just a chroot anymore:  it&#039;s a bubblewrap-powered isolated environment. This allows for easily running graphical programs and does not require root privileges once installed.&lt;br /&gt;
&lt;br /&gt;
[[Install]] the {{pkg|bubblewrap}} package.&lt;br /&gt;
&lt;br /&gt;
Set up [[#Debian|Debian chroot]] at {{path|/var/chroots/debian}} and install necessary glibc applications using {{ic|apt-get}}.&lt;br /&gt;
&lt;br /&gt;
Create a {{ic|glibc}} alias using bwrap in the Alpine Linux host in order to start applications from the [[#Debian|Debian chroot]]:&lt;br /&gt;
{{cmd|$ alias glibc{{=}}&amp;quot;LANG{{=}}en_US.UTF-8 bwrap --bind /var/chroots/debian / --dev-bind /dev /dev --proc /proc --bind /sys /sys --bind /run /run --bind /home /home --ro-bind /etc/resolv.conf /etc/resolv.conf --ro-bind /etc/passwd /etc/passwd --ro-bind /etc/group /etc/group&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
To run programs that use X11/Xorg, you can use: &lt;br /&gt;
{{cmd|$ alias glibcX11{{=}}&amp;quot;LANG{{=}}en_US.UTF-8 bwrap --bind /var/chroots/debian / --dev-bind /dev /dev --proc /proc --bind /sys /sys --bind /run /run --bind /home /home --ro-bind /etc/resolv.conf /etc/resolv.conf --ro-bind /etc/passwd /etc/passwd --ro-bind /etc/group /etc/group --bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X0 --setenv DISPLAY :0&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
In this case, you might need to use {{ic|xhost}} on the Alpine Linux host in order to allow local connections.  For example:{{cmd|# xhost + local:}}&lt;br /&gt;
&lt;br /&gt;
Now we can invoke glibc-built binaries using the alias from the Alpine Linux host, as follows:&lt;br /&gt;
{{cmd|$ glibc ./binary}} or {{cmd|$ glibcX11 ./binary}} &lt;br /&gt;
&lt;br /&gt;
When a [[Wayland]] desktop such as [[Sway]] runs without XWayland on the Alpine Linux host, Electron apps need to be started with Ozone Wayland support:&lt;br /&gt;
&lt;br /&gt;
* For VS Code (note the use of the {{ic|code}} command):&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;glibc code --enable-features=UseOzonePlatform --ozone-platform=wayland&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* For Google Chrome, etc:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;glibc google-chrome --enable-features=UseOzonePlatform --ozone-platform=wayland&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The flags enforce Wayland rendering, thus avoiding XWayland and improving display, particularly if fractional scaling is also used.&lt;br /&gt;
&lt;br /&gt;
== See also == &lt;br /&gt;
&lt;br /&gt;
* [[Alpine Package Keeper]]&lt;br /&gt;
* [[Installing ArchLinux inside an Alpine chroot]]&lt;br /&gt;
* [[Compile software from source]]&lt;br /&gt;
* [[Kernels]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]] [[Category:Development]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sshguard&amp;diff=31974</id>
		<title>Sshguard</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sshguard&amp;diff=31974"/>
		<updated>2026-01-17T18:20:33Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Removed {{DISPLAYTITLE:SSHGuard}} as DISPLAYTITLE is not currently changing page title from Sshguard to SSHGuard (upstream name) - see discussion at Display title - amend to SSHGuard;  otherwise, page appears under &amp;quot;Categories: Pages with ignored display titles&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[https://www.sshguard.net/ SSHGuard] protects hosts from brute-force attacks against SSH and other services. It aggregates system logs and blocks repeat offenders using one of several firewall backends, including &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;nftables&#039;&#039;&#039;;  SSHGuard also supports firewalls used elsewhere, including ipfw and pf.&lt;br /&gt;
&lt;br /&gt;
SSHGuard can read log messages from standard input (suitable for piping from &#039;&#039;syslog&#039;&#039;) or monitor one or more log files. Log messages are parsed, line-by-line, for recognized patterns. If an attack, such as several login failures within a few seconds, is detected, the offending IP is blocked. Offenders are unblocked after a set interval, but can be semi-permanently banned using the blacklist option.&lt;br /&gt;
&lt;br /&gt;
SSHGuard does not support custom log parsing. Check the website upstream to see which services they support.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
SSHGuard can use several backends;  you can see them listed with {{ic|$ ls /usr/libexec/sshg-fw*}}. The easiest backend on Alpine Linux is [[Nftables|nftables]], but a section is given below for [[Iptables]] also. After either firewall has been installed, install {{Pkg|sshguard}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas apk add sshguard}}&lt;br /&gt;
&lt;br /&gt;
You will need to create the following configuration file or else SSHGuard won&#039;t start.&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/sshguard.conf|#!/bin/sh&lt;br /&gt;
BACKEND{{=}}&#039;/usr/libexec/sshg-fw-nft-sets&#039;&lt;br /&gt;
FILES{{=}}&#039;/var/log/messages&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== nftables backend ==&lt;br /&gt;
&lt;br /&gt;
The nftables ruleset (tables and sets) required by SSHGuard are created dynamically with this SSHGuard daemon. You can view the rules that are active with:&lt;br /&gt;
&lt;br /&gt;
{{ic|$ doas nft list ruleset}}&lt;br /&gt;
&lt;br /&gt;
== iptables backend ==&lt;br /&gt;
&lt;br /&gt;
To use the &#039;&#039;&#039;iptables&#039;&#039;&#039; backend, you must first create a chain called &amp;quot;sshguard&amp;quot;. Enable the iptables-service to save the rules at shutdown and reload them when booting&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas iptables -N sshguard&lt;br /&gt;
$ doas iptables -A INPUT -j sshguard&lt;br /&gt;
$ doas rc-update add iptables boot}}&lt;br /&gt;
&lt;br /&gt;
You can view the rules with {{ic|$ doas iptables -L}}&lt;br /&gt;
&lt;br /&gt;
[[category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bootloaders&amp;diff=31973</id>
		<title>Bootloaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bootloaders&amp;diff=31973"/>
		<updated>2026-01-17T17:37:01Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Added paragraph (following listing of bootloaders): gummiboot is deprecated;  2. /* See also */ Added Silent boot, otherwise an orphaned page;  amended link descriptions; and updated denx.de/wiki/U-Boot/ReleaseCycle to redirect: https://docs.u-boot.org/en/latest/develop/release_cycle.html;  4. Amended styles/grammar.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;bootloader&#039;&#039; is a computer program that is responsible for booting a computer. In the case where it also provides an interactive menu with multiple boot choices, then it&#039;s often called a &#039;&#039;boot manager&#039;&#039;. This page shows the basic steps that you need to perform if, for any reason, you want to switch bootloaders or to apply some manual configuration.&lt;br /&gt;
&lt;br /&gt;
The following bootloaders are available in Alpine Linux:-&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#Syslinux|Syslinux]]&amp;lt;/code&amp;gt; is the default lightweight bootloader used in Alpine Linux.&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#rEFInd|rEFInd]]&amp;lt;/code&amp;gt; is an easy-to-use &#039;&#039;EFI&#039;&#039; boot menu that allows booting different operating systems.&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#GRUB|GRUB]]&amp;lt;/code&amp;gt; is a standard Linux bootloader.&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[#EFI_Boot_Stub|EFI Boot Stub]]&amp;lt;/code&amp;gt; allows for booting Linux directly from a motherboard supporting &#039;&#039;UEFI&#039;&#039; or from another bootloader.&amp;lt;br&amp;gt;&lt;br /&gt;
* [[UEFI Secure Boot]] uses {{pkg|systemd-efistub}} or {{pkg|stubbyboot-efistub}}.&lt;br /&gt;
&lt;br /&gt;
A [[#Using a UKI|Unified Kernel Image (UKI)]] is additionally supported, available  for UEFI only. It is a UEFI executable that can be useful in [https://uapi-group.org/specifications/specs/unified_kernel_image/ certain use cases], including secure boot, clouds and containers.&lt;br /&gt;
&lt;br /&gt;
Note that {{pkg|gummiboot}} is a &#039;&#039;deprecated&#039;&#039; UEFI boot manager that was originally able to leverage UEFI firmware and detect bootable images such as Linux kernels that have an EFI stub on the EFI System Partition (ESP).  The [https://cgit.freedesktop.org/gummiboot/ gummiboot project] was discontinued in 2015 and renamed as {{Pkg|systemd-boot}} for systemd systems and is only available in Alpine Linux in the [[Repositories#Testing|testing repository]].  As it had no runtime dependencies, &#039;&#039;&#039;gummiboot&#039;&#039;&#039; was appreciated for its simplicity as a lightweight, minimal UEFI boot solution.  Its UEFI stub, {{pkg|gummiboot-efistub}}, was used [[UEFI_Secure_Boot#Generating_Unified_Kernel_Image|to generate a Unified Kernel Images (UKIs)]] e.g. for [[DM-verity]] and Secure Boot, but [[Release_Notes_for_Alpine_3.22.0#Secure_Boot_and_Gummiboot|it has been deprecated since Alpine Linux 3.22]] and is no longer maintained;  it has been replaced by &#039;&#039;&#039;systemd-efistub&#039;&#039;&#039; (note that the latter package [[UEFI_Secure_Boot#Generating_Unified_Kernel_Image|only supplies EFI stub binaries]] and doesn’t depend on any systemd components).&lt;br /&gt;
&lt;br /&gt;
== Syslinux ==&lt;br /&gt;
&lt;br /&gt;
If you want to switch from another bootloader back to &#039;&#039;Syslinux&#039;&#039;, or if for some reason you want to install Syslinux manually, then the following steps are required.&lt;br /&gt;
&lt;br /&gt;
Install the {{pkg|syslinux}} package:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add syslinux}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using GPT partitions, then install the &#039;&#039;GPT MBR&#039;&#039; onto the drive that you want to install the bootloader on (in this case, {{path|/dev/sda}}):&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/gptmbr.bin of=/dev/sda&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Or, if you&#039;re using DOS partitions, then install the &#039;&#039;DOS MBR&#039;&#039; instead:&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=/dev/sda&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&amp;lt;!-- See also: http://www.syslinux.org/wiki/index.php?title=Mbr --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, install the required Syslinux binaries. Despite being called &amp;lt;code&amp;gt;extlinux&amp;lt;/code&amp;gt;, Syslinux supports booting from FAT12/16/32, NTFS, ext2/3/4, [[Btrfs|btrfs]], XFS and UFS/FFS filesystems.&lt;br /&gt;
&lt;br /&gt;
{{cmd|# extlinux --install /boot}}&lt;br /&gt;
&lt;br /&gt;
The configuration file is located in {{path|/boot/extlinux.conf}}. &lt;br /&gt;
&lt;br /&gt;
Alpine Linux ships with a script, &amp;lt;code&amp;gt;update-extlinux&amp;lt;/code&amp;gt;, that automatically (re)generates this file, for example, on updates to Syslinux. The settings for this script can be found in {{path|/etc/update-extlinux.conf}}, including the option to disable automatic overwriting of {{path|/boot/extlinux.conf}}. &lt;br /&gt;
&lt;br /&gt;
You can also place additional menu entries in the {{path|/etc/update-extlinux.d/}} directory e.g. for dual booting.&lt;br /&gt;
&lt;br /&gt;
=== Using EFI with syslinux ===&lt;br /&gt;
&lt;br /&gt;
The Alpine Linux installer automatically uses [[#GRUB|GRUB]] if EFI mode is detected. The section below is specifically about using EFI with Syslinux.&lt;br /&gt;
&lt;br /&gt;
Assuming that {{path|/mnt}} is a FAT32 partition of type EF00 and that {{path|/boot}} belongs to the rootfs created after running &amp;lt;code&amp;gt;setup-disk&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# mkdir -p /mnt/EFI/syslinux&lt;br /&gt;
# cp /usr/share/syslinux/efi64/* /mnt/EFI/syslinux/&lt;br /&gt;
# cp /boot/extlinux.conf /mnt/EFI/syslinux/syslinux.cfg&lt;br /&gt;
# cp /boot/vmlinuz* /mnt/EFI/syslinux/&lt;br /&gt;
# cp /boot/initramfs* /mnt/EFI/syslinux/&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
You may need to modify {{path|/mnt/EFI/syslinux/syslinux.cfg}} to change the paths to absolute paths (just add a / in front of the vmlinuz/initramfs entries), or copy the files to {{path|/mnt/EFI/syslinux}} instead (XXX: untested).&lt;br /&gt;
&lt;br /&gt;
In the end, the {{path|/mnt/EFI/syslinux/syslinux.cfg}} file should look like this:&lt;br /&gt;
&lt;br /&gt;
{{cat|/mnt/EFI/syslinux/syslinux.cfg|&amp;lt;nowiki&amp;gt;...&lt;br /&gt;
DEFAULT menu.c32&lt;br /&gt;
PROMPT 0&lt;br /&gt;
MENU TITLE Alpine/Linux Boot Menu&lt;br /&gt;
MENU HIDDEN&lt;br /&gt;
MENU AUTOBOOT Alpine will be booted automatically in # seconds&lt;br /&gt;
TIMEOUT 10&lt;br /&gt;
LABEL lts&lt;br /&gt;
  MENU DEFAULT&lt;br /&gt;
  MENU LABEL Linux lts&lt;br /&gt;
  LINUX /vmlinuz-lts&lt;br /&gt;
  INITRD /initrd-lts&lt;br /&gt;
  APPEND root=/dev/sda3 modules=sd-load,usb-storage,ext4 quiet&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Finally, add &amp;lt;code&amp;gt;syslinux&amp;lt;/code&amp;gt; to the EFI boot menu.  Assuming that {{path|/dev/sda}} is your hard drive —&#039;&#039;&#039;&#039;&#039;be careful to check first what is its path on your device and to adjust accordingly&#039;&#039;&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# apk add efibootmgr&lt;br /&gt;
# efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\syslinux\\syslinux.efi -L &amp;quot;ALPINE-SYSLINUX&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
You can now verify that the boot entry has been added:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;efibootmgr&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BootCurrent: 0001&lt;br /&gt;
Timeout: 0 seconds&lt;br /&gt;
BootOrder: 0001,0000,0002,...&lt;br /&gt;
Boot001* ALPINE-SYSLINUX HD(1,GPT,xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/FILE(\EFI\syslinux\syslinux.efi)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== rEFInd ==&lt;br /&gt;
{{Main|rEFInd}}&lt;br /&gt;
&lt;br /&gt;
[[rEFInd]] provides a graphical boot menu for [[UEFI]] systems.&lt;br /&gt;
&lt;br /&gt;
== GRUB ==&lt;br /&gt;
&lt;br /&gt;
To install GRUB in BIOS mode, (optionally) remove the Syslinux package and install the required GRUB packages:&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# apk del syslinux&lt;br /&gt;
# apk add grub grub-bios&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
For EFI, install GRUB&#039;s EFI package instead. Note that {{path|/boot}} has to be an EFI-compatible filesystem, such as FAT32.&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add grub-efi efibootmgr}}&lt;br /&gt;
&lt;br /&gt;
Next, install the MBR and GRUB binaries to disk for BIOS mode:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# grub-install /dev/vda}}&lt;br /&gt;
&lt;br /&gt;
For EFI mode:&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# grub-install --target=x86_64-efi --efi-directory=/boot&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Then, add this line to {{path|/etc/default/grub}}:&lt;br /&gt;
&lt;br /&gt;
{{cat|/etc/default/grub|&amp;lt;nowiki&amp;gt;# GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;quiet rootfstype=ext4 modules=sd-mod,usb-storage,ext4&amp;quot;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
GRUB ships with an automatic configuration generator, including some automatic detection of other operating systems installed on the device:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
This script can be configured via the {{path|/etc/default/grub}} file. &lt;br /&gt;
&lt;br /&gt;
If the font in the GRUB boot screen appears too small, then [[Fonts#Changing_GRUB_font_and_font_size|change the GRUB font]].&lt;br /&gt;
&lt;br /&gt;
Consult [https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html gnu.org&#039;s online manual] for a list of available &amp;lt;code&amp;gt;grub-mkconfig&amp;lt;/code&amp;gt; configuration options.&lt;br /&gt;
&lt;br /&gt;
== EFI Boot Stub ==&lt;br /&gt;
&lt;br /&gt;
To boot directly from your motherboard&#039;s UEFI boot menu, a boot entry needs to be created either with a UEFI shell or with &#039;&#039;efibootmgr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== efibootmgr ===&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|efibootmgr}}:&lt;br /&gt;
{{cmd|# apk add efibootmgr}}&lt;br /&gt;
&lt;br /&gt;
Create a boot entry. It is recommended to do this in a script, as efibootmgr does not allow for editing entries.&lt;br /&gt;
&lt;br /&gt;
{{cat|add-bootentry|&amp;lt;nowiki&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
params=&amp;quot;root=/dev/sdXZ rootfstype=ext4 rw \&lt;br /&gt;
  initrd=\intel-ucode.img \&lt;br /&gt;
  initrd=\initramfs-lts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
efibootmgr --create --label &amp;quot;Alpine Linux&amp;quot; \&lt;br /&gt;
  --disk /dev/sdX --part Y \&lt;br /&gt;
  --loader /vmlinuz-lts \&lt;br /&gt;
  --unicode &amp;quot;${params}&amp;quot; \&lt;br /&gt;
  --verbose&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Where {{path|/dev/sdXY}} contains the EFI partition and {{path|/dev/sdXZ}} contains the root partition. If you are using {{Pkg|linux-stable}}, then replace &amp;lt;code&amp;gt;lts&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;stable&amp;lt;/code&amp;gt; in the script.&lt;br /&gt;
&lt;br /&gt;
{{Tip|If you&#039;re modifying EFI records from a running system (e. g. migrating from GRUB), you can populate {{ic|$params}} from {{ic|/proc/cmdline}}. Make sure to append {{ic|initrd}} param if it&#039;s missing since GRUB does not add it to the command line.}}&lt;br /&gt;
&lt;br /&gt;
{{Note| The kernel contains the [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/init/do_mounts.c#n254 exhaustive list] of ways to specify the block device. For a more robust boot entry, it is recommended to use a persistent name such as the PARTUUID.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Optionally, set the newly-created entry as the default:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# efibootmgr -n XXXX}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;XXXX&amp;lt;/code&amp;gt; is the boot number of the new entry.&lt;br /&gt;
&lt;br /&gt;
{{Note| The loader and initrd file arguments are relative to the EFI partition. In a default installation, Alpine Linux places these files in {{path|/boot/}}, while EFI is mounted to {{path|/boot/efi/}}. You can either update &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; to mount EFI at {{path|/boot/}}, or manually copy them to {{path|/boot/efi/}}.                                                                                           }}&lt;br /&gt;
&lt;br /&gt;
== Using a UKI  ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[https://github.com/uapi-group/specifications/blob/main/specs/unified_kernel_image.md#unified-kernel-image-uki Unified Kernel Image]&#039;&#039;&#039; (UKI) is supported in UEFI only. It is possible to boot directly into a UKI. A UKI is a single file that contains the initfs, kernel and cmdline. &lt;br /&gt;
&lt;br /&gt;
The [[UEFI Secure Boot]] page contains the instructions for setting up an a UKI.  While this is typically done in order to &#039;&#039;SecureBoot&#039;&#039;, it is perfectly feasible to skip enrolling the custom keys and to leave SecureBoot off. &lt;br /&gt;
&lt;br /&gt;
Additionally, it is possible to install the UKI in the default fallback path used by most UEFI implementations. By installing the UKI into this path, the system will automatically boot into it if no other entries are defined. This can be automated as part of the kernel hook by adding the following to {{path|/etc/kernel-hooks.d/secureboot.conf}} :&lt;br /&gt;
&lt;br /&gt;
{{cat|/etc/kernel-hooks.d/secureboot.conf|&amp;lt;nowiki&amp;gt;# For the stable kernel, install the UKI into the default UEFI path.&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; == &amp;quot;stable&amp;quot; ]; then&lt;br /&gt;
  output_dir=&amp;quot;/efi/EFI/Boot/&amp;quot;&lt;br /&gt;
  output_name=&amp;quot;bootx64.efi&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|  {{path|bootx64.efi}} is only correct for &amp;lt;code&amp;gt;x86_64&amp;lt;/code&amp;gt; systems. For other architectures, the exact name will vary.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Enable Serial Console on Boot]]&lt;br /&gt;
* [[Silent boot]]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Bootloader Gentoo Wiki - Bootloaders]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Arch_boot_process#Boot_loader Archwiki - Boot loader]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Category:Bootloaders PostmarketOS Wiki - Bootloaders]&lt;br /&gt;
* [https://docs.u-boot.org/en/latest/develop/release_cycle.html u-boot.org docs - U-Boot Release Cycle]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Booting]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&amp;diff=31962</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=31962"/>
		<updated>2026-01-14T02:34:08Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Added budgie* to list of desktop environments;  2. Added subsection /* Mobile/tablet UI */;  moved sxmo* there from Desktop Environments listing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&amp;lt;!-- COMMENT FOR EDITORS&lt;br /&gt;
&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;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine Linux&#039;&#039;&#039; has no official desktop although setting up a graphical environment is proposed in the [[Installation#Post-Installation|post-installation]] guide.  Alpine Linux desktops may meet the needs for &#039;&#039;general&#039;&#039; daily desktop use:-&lt;br /&gt;
* Fewer packages still require [https://www.gnu.org/software/libc/ glibc], as numerous popular applications are now available here on [https://musl.libc.org/ musl]:  {{Pkg|libreoffice*}}, {{Pkg|chromium*}}, [[Firefox]], etc&lt;br /&gt;
* Several Alpine Linux desktop environments have been benchmarked to be competitive for both [https://everybytecounts.org/#desktop-environment-comparison speed and memory]&lt;br /&gt;
* Arguably, there is a reduced attack surface through the use of a comparatively lightweight &#039;&#039;&#039;musl&#039;&#039;&#039; and [[BusyBox]] system core&lt;br /&gt;
&lt;br /&gt;
All window managers and desktop environments that are available in Alpine Linux are listed on this page. A quick installation using the [[Alpine_setup_scripts#setup-desktop|setup-desktop]] script is available for several [[Setup-desktop|desktops]]. &lt;br /&gt;
&lt;br /&gt;
{{Tip|For servers, consider using [[Alpine_Configuration_Framework_Design|Alpine Configuration Framework (ACF)]] for security considerations in that use case.}}&lt;br /&gt;
&lt;br /&gt;
== Desktop environments ==&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;desktop environment&#039;&#039; (DE) is made of a bundle of programs that share a common &#039;&#039;graphical user interface&#039;&#039; (GUI), sometimes described as a &#039;&#039;graphical shell&#039;&#039;. A desktop environment typically consists of icons, windows, toolbars, folders, wallpapers and desktop widgets, and might also provide drag-and-drop functionality.&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|budgie*}}&lt;br /&gt;
* [[COSMIC]]&lt;br /&gt;
* [[GNOME]]&lt;br /&gt;
* [[KDE|KDE Plasma]]&lt;br /&gt;
* {{Pkg|lomiri*|arch=}}&lt;br /&gt;
* [[Lumina]]&lt;br /&gt;
* [[LXQt]]&lt;br /&gt;
* [[MATE]]&lt;br /&gt;
* [[Xfce]]&lt;br /&gt;
&lt;br /&gt;
=== Mobile/tablet UI ===&lt;br /&gt;
Certain desktop environments have been ported for use as &#039;&#039;mobile user interfaces&#039;&#039; (UI) while other mobile/tablet UIs may have been developed using other existing unix toolkits.  &#039;&#039;Convergent desktop environments&#039;&#039; are designed with a view to be consistent regardless of the platform used (pc, mobile, tablet, etc) such as the aforementioned &#039;&#039;&#039;lomiri&#039;&#039;&#039; environment.&lt;br /&gt;
* {{Pkg|phosh*}} - Wayland shell for GNOME on [https://phosh.mobi/ mobile devices].&lt;br /&gt;
* {{Pkg|plasma-mobile*}} - [https://plasma-mobile.org/ Mobile UI using a KDE Plasma foundation].&lt;br /&gt;
* {{Pkg|sxmo*}} - [https://sxmo.org/ Minimalist mobile Linux environment.]&lt;br /&gt;
&lt;br /&gt;
== Window managers ==&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;window manager&#039;&#039; is software that controls the placement and appearance of windows within a windowing system in a graphical user interface. In the case of [[Wayland]], these are called &#039;&#039;compositors&#039;&#039; because they additionally perform the task of a &#039;&#039;compositing window manager&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Almost all components of a desktop need to be added manually by the user.  Both [[Alpine_Linux:Glossary#S|stacking]] (a.k.a. &#039;&#039;floating&#039;&#039;) and [[Alpine_Linux:Glossary#T|tiling]]/&#039;&#039;dynamic&#039;&#039; layouts are commonly used for window management.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;&amp;quot;&lt;br /&gt;
! WM Name !! Protocol!! Style !! Toolkit!!class=&amp;quot;unsortable&amp;quot;|Inspiration &lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|2bwm|arch=}} || X11 || Stacking || C/Roff&lt;br /&gt;
 || [https://www.hack.org/~mc/hacks/mcwm mcwm]&lt;br /&gt;
|-&lt;br /&gt;
| [[AwesomeWM|Awesome]] ||X11  || Tiling || Lua ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|berry|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|bspwm|arch=}} || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
|  {{Pkg|cage |arch=}} || Wayland || Kiosk || C/wlroots || {{Pkg|ratpoison|arch=}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|cagebreak|arch=}} || Wayland || Tiling ||C/wlroots || {{Pkg|ratpoison|arch=}}, {{Pkg|cage|arch=}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|compiz|arch=}} || X11 || Compositing || C++/C/Python || &lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|cwm|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|dk|arch=}} || X11 || Tiling || C || {{Pkg|dwm|arch=}}, {{Pkg|bspwm|arch=}}, [https://xmonad.org/ xmonad]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|dwl|arch=}}  || Wayland || Tiling || C/wlroots||[[dwm]]&lt;br /&gt;
|-&lt;br /&gt;
| [[dwm]] || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Fluxbox]] || X11 || Stacking || C++ || [https://sourceforge.net/projects/blackboxwm/ blackbox]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|flwm|arch=}} || X11 || Stacking || C++/FLTK || [https://all-day-breakfast.com/wm2/ wm2]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|gamescope|arch=}} || X11/Wayland || Compositing || C++/C/Lua || &lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|goomwwm||-&lt;br /&gt;
| {{Pkg|icewm|arch=}} || X11 || Stacking || C++/C/M4 ||&lt;br /&gt;
arch=}}  || X11 || Stacking || C/Roff ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|herbstluftwm|arch=}} || X11 || Tiling || C++ ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Hyprland]] || Wayland || Tiling || C++ ||&lt;br /&gt;
|-&lt;br /&gt;
| [[I3wm|i3]] || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|icewm|arch=}} || X11 || Stacking || C++/C/M4 ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|jwm|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|kwin|arch=}} || X11/Wayland || Compositing || C++ ||&lt;br /&gt;
|-&lt;br /&gt;
| [[LabWC]] || Wayland || Stacking || C/wlroots||[[Openbox]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|marco|arch=}} || X11 || Stacking || C || {{Pkg|metacity|arch=}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|metacity|arch=kwin}} || X11 || Compositing || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|mutter|arch=}} || X11/Wayland || Compositing || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|mwm|arch=}} || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|niri|arch=}} || Wayland || Tiling || Rust/GLSL/other || [https://github.com/paperwm/PaperWM PaperWM]&lt;br /&gt;
|-&lt;br /&gt;
| [[Openbox]] || X11 || Stacking || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|pekwm|arch=}} || X11 || Stacking || C++/CMake/Perl/C || [http://sapphire.sourceforge.net/ aewm++]&lt;br /&gt;
|-&lt;br /&gt;
| [[Qtile]] || X11/Wayland || Tiling || Python ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|ratpoison|arch=}}  || X11 || Kiosk || C || &lt;br /&gt;
|-&lt;br /&gt;
| [[River|river-classic/River]] || Wayland || Tiling || Zig || [[dwm]], [https://xmonad.org/ xmonad]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|spectrwm |arch=}}  || X11 || Tiling || C||  [https://xmonad.org/ xmonad], [[dwm]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Sway]] || Wayland || Tiling || C/wlroots || [[I3wm|i3]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|sxmo-dwm|arch=}} || X11 || Tiling || C || {{Pkg|dwm|arch=}} &lt;br /&gt;
|-&lt;br /&gt;
| [[twm]] || X11 || Tiling || C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|wayfire|arch=}} || Wayland || Stacking || C++/wlroots || {{Pkg|compiz|arch=}} &lt;br /&gt;
|-&lt;br /&gt;
| [[Weston]] || Wayland || Stacking ||  C ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|windowmaker|arch=}} || X11 || Stacking || C/Shell/M4/Perl/Makefile/Emacs Lisp/other || NeXTSTEP&lt;br /&gt;
|-&lt;br /&gt;
| {{Pkg|xfwm4|arch=}} || X11 || Compositing || C/Makefile/Meson/other || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Installation#Post-Installation|Post Installation]]&lt;br /&gt;
* [[Wayland]]&lt;br /&gt;
* [[Xorg]]&lt;br /&gt;
* [[Display manager]]&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:Desktop Environments]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Compositor]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setting_up_a_SSH_server&amp;diff=31942</id>
		<title>Setting up a SSH server</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setting_up_a_SSH_server&amp;diff=31942"/>
		<updated>2026-01-10T20:39:25Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. /* Further Reading*/ Added: Remote Desktop Server;  2. Style/grammar amendments, including correcting header level styling.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
This article provides a short overview of SSH on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
Also see [https://en.wikipedia.org/wiki/Secure_Shell Secure Shell (Wikipedia)].&lt;br /&gt;
&lt;br /&gt;
{{Note|This article describes two popular SSH implementations: OpenSSH and Dropbear. Either can be installed using the [[Alpine setup scripts#setup-sshd|setup-sshd]] script, or by following the instructions below.}}&lt;br /&gt;
&lt;br /&gt;
== OpenSSH ==&lt;br /&gt;
&lt;br /&gt;
[https://www.openssh.com/ OpenSSH] is a popular SSH implementation for remote encrypted login to a machine. OpenSSH defines &#039;&#039;sshd&#039;&#039; as the daemon, and &#039;&#039;ssh&#039;&#039; as the client program.&lt;br /&gt;
&lt;br /&gt;
The {{Pkg|openssh}} package provides OpenSSH on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Install the {{Pkg|openssh}} package:&lt;br /&gt;
{{Cmd|apk add openssh}}&lt;br /&gt;
&lt;br /&gt;
{{Note|To use the ACF-frontend for openssh, install {{Pkg|acf-openssh}} instead (assuming that you have the setup-acf script).}}&lt;br /&gt;
&lt;br /&gt;
Also see [[Alpine_Package_Keeper|Alpine Linux package management]].&lt;br /&gt;
&lt;br /&gt;
=== Service commands ===&lt;br /&gt;
Enable the sshd service so that it starts at boot:&lt;br /&gt;
{{Cmd|rc-update add sshd}}&lt;br /&gt;
&lt;br /&gt;
List services to verify sshd is enabled:&lt;br /&gt;
{{Cmd|rc-status}}&lt;br /&gt;
&lt;br /&gt;
Start the sshd service immediately and create configuration files:&lt;br /&gt;
{{Cmd|rc-service sshd start}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are running from RAM, ensure you save your settings using the &#039;lbu ci&#039; command as necessary. See [https://wiki.alpinelinux.org/wiki/Alpine_local_backup Alpine local backup].}}&lt;br /&gt;
&lt;br /&gt;
Also see [[OpenRC|Alpine Linux Init System]].&lt;br /&gt;
&lt;br /&gt;
=== Fine tuning ===&lt;br /&gt;
&lt;br /&gt;
You may wish to change the default configuration. This section describes some of the configuration options as examples.  However, this is by no means an exhaustive list. See [https://www.openssh.com/manual.html the manual] for full details.&lt;br /&gt;
&lt;br /&gt;
The fine tuning is done by editing {{Path|/etc/ssh/sshd_config}}. Any line starting with &amp;quot;#&amp;quot; is ignored by &#039;&#039;sshd&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 UseDNS no   # By setting this to no, connection speed can increase.&lt;br /&gt;
 PasswordAuthentication no  # Do not allow password authentication.&lt;br /&gt;
&lt;br /&gt;
Other configuration options are shown in {{Path|etc/ssh/sshd_config}}. The file includes comments that explain many of the options.&lt;br /&gt;
&lt;br /&gt;
=== Firewalling and Port Changes ===&lt;br /&gt;
By default, sshd will communicate on TCP port &#039;&#039;&#039;22&#039;&#039;&#039;.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes &#039;&#039;&#039;22/tcp&#039;&#039;&#039; is blocked by a firewall over which you have no control. Changing the &#039;&#039;&#039;Port&#039;&#039;&#039; option to an unused port number in {{Path|/etc/ssh/sshd_config}} may be useful in this situation.&amp;lt;BR&amp;gt;&lt;br /&gt;
 Port 443   # Use whichever port number fits your needs&lt;br /&gt;
&lt;br /&gt;
{{Note|Ensure the port you wish to use is not already in use by running &#039;&#039;&#039;netstat -lnp&#039;&#039;&#039; on the machine running &#039;&#039;sshd&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
Restart &#039;&#039;sshd&#039;&#039; after making modifications to the configuration file:&lt;br /&gt;
{{Cmd|rc-service sshd restart}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are running from RAM, ensure you save your settings using the &#039;lbu ci&#039; command as necessary. See [https://wiki.alpinelinux.org/wiki/Alpine_local_backup Alpine local backup].}}&lt;br /&gt;
&lt;br /&gt;
== Dropbear ==&lt;br /&gt;
&lt;br /&gt;
[https://matt.ucc.asn.au/dropbear/dropbear.html Dropbear] is a lightweight SSH client/server alternative to OpenSSH.&lt;br /&gt;
&lt;br /&gt;
=== Server ===&lt;br /&gt;
{{Tip|You can use {{Path|~/.ssh/authorized_keys}} in the same way as with OpenSSH.}}&lt;br /&gt;
&lt;br /&gt;
{{Pkg|dropbear}} can be install through the [[Alpine setup scripts]], or manually with:&lt;br /&gt;
{{Cmd|apk add dropbear}}&lt;br /&gt;
&lt;br /&gt;
Start it:&lt;br /&gt;
{{Cmd|rc-service dropbear start}}&lt;br /&gt;
Add it to the default runlevel:&lt;br /&gt;
{{Cmd|rc-update add dropbear}}&lt;br /&gt;
&lt;br /&gt;
Use the following command to check all available server options:&lt;br /&gt;
{{Cmd|dropbear -h}}&lt;br /&gt;
&lt;br /&gt;
The config file is located at {{Path|/etc/conf.d/dropbear}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|&amp;lt;code&amp;gt;DROPBEAR_OPTS{{=}}&amp;quot;-w -s&amp;quot;&amp;lt;/code&amp;gt; will forbid root login and password login}}&lt;br /&gt;
&lt;br /&gt;
=== Client ===&lt;br /&gt;
{{Pkg|dropbear-dbclient}} contains the SSH client and can be installed manually with:&lt;br /&gt;
{{Cmd|apk add dropbear-dbclient}}&lt;br /&gt;
&lt;br /&gt;
In its simplest form, it can be used like this:&lt;br /&gt;
{{Cmd|dbclient &amp;lt;user&amp;gt;@host.example.com}}&lt;br /&gt;
{{Cmd|dbclient host.example.com}}&lt;br /&gt;
{{Cmd|dbclient x.x.x.x}} (where x.x.x.x is the IP address of the remote machine).&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;dbclient -h&amp;lt;/code&amp;gt; to see all available options.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[HOWTO OpenSSH 2FA with password and Google Authenticator|Two Factor Authentication With OpenSSH]]&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.openssh.com/portable.html OpenSSH (openssh.com)]&amp;lt;BR&amp;gt;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/OpenSSH OpenSSH (wikipedia.org)]&lt;br /&gt;
* [[Remote Desktop Server]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Remote_Desktop_Server&amp;diff=31941</id>
		<title>Remote Desktop Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Remote_Desktop_Server&amp;diff=31941"/>
		<updated>2026-01-10T20:00:01Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Consolidated note and instructions re xrdp and KDE under new subheading;  2. /* Remote Desktop Server based on Vino and xrdp */ Added: &amp;quot;Consider securing &amp;#039;&amp;#039;&amp;#039;vino&amp;#039;&amp;#039;&amp;#039; over SSH tunnels.&amp;quot; 3. /* See also */ Added Setting up a SSH server, xrdp.org;  4. Style/grammar amendments, including standardizing xrdp to lower case, as per upstream.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These guides assume that the community repo [[Enable_Community_Repository|has been enabled]].&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Server Based on xrdp and xorgxrdp ==&lt;br /&gt;
&lt;br /&gt;
This was tested and works for v 3.17.2 with [[Xfce]] as the desktop.&lt;br /&gt;
&lt;br /&gt;
First ensure that the desktop is working without remote access (if feasible).&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|xrdp}} and {{Pkg|xorgxrdp}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; apk add xrdp xorgxrdp}}&lt;br /&gt;
&lt;br /&gt;
Start the necessary services:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; rc-service xrdp start&lt;br /&gt;
&amp;amp;#35; rc-service xrdp-sesman start}}&lt;br /&gt;
&lt;br /&gt;
After testing that this works, you may set the services to start automatically:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; rc-update add xrdp&lt;br /&gt;
&amp;amp;#35; rc-update add xrdp-sesman}}&lt;br /&gt;
&lt;br /&gt;
That should be all that is needed to connect from a Windows client with its default &amp;quot;Remote Desktop&amp;quot; client.  The xrdp configuration file though will contain several services that will not work, so to remove them, edit {{Pkg|/etc/xrdp/xrdp.ini}} and remove all lines from, and including, {{ic|[Xvnc]}} to the end. &lt;br /&gt;
&lt;br /&gt;
=== xrdp and KDE ===&lt;br /&gt;
&lt;br /&gt;
On Alpine Linux Edge and from v3.22 onwards, xrdp is broken in combination with KDE because the latter only supports Wayland on versions released [[Release_Notes_for_Alpine_3.22.0| since then]].&lt;br /&gt;
&lt;br /&gt;
On an earlier Alpine Linux release, if you are using KDE, please create a link as follows so that there is no screen after logging in:&lt;br /&gt;
{{Cmd|$ ln -s /usr/bin/startplasma-x11 ~/.xinitrc}}&lt;br /&gt;
&lt;br /&gt;
{{ic|doas}} should only be used for that command if {{Path|~/.xinitrc}} is owned by root or by another user, but that would be atypical for a user-specific configuration.&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Server based on Vino and xrdp ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THIS DOES NOT WORK on 3.17.2 with Xfce - Not Yet Deleted in Case it helps others&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First of all, make sure that you have a desktop environment properly installed (See: [[Desktop environments and Window managers]]).&lt;br /&gt;
&lt;br /&gt;
Next, install {{Pkg|vino}} and {{Pkg|xrdp}} with the following command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; apk add vino xrdp}}&lt;br /&gt;
&lt;br /&gt;
Replace the {{Path|/etc/xrdp/xrdp.ini}} file&#039;s content with:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/xrdp/xrdp.ini|&amp;lt;nowiki&amp;gt;[globals]&lt;br /&gt;
bitmap_cache=yes&lt;br /&gt;
bitmap_compression=yes&lt;br /&gt;
port=3389&lt;br /&gt;
crypt_level=low&lt;br /&gt;
channel_code=1&lt;br /&gt;
max_bpp=24&lt;br /&gt;
&lt;br /&gt;
[xrdp1]&lt;br /&gt;
name=Vino&lt;br /&gt;
lib=libvnc.so&lt;br /&gt;
ip=127.0.0.1&lt;br /&gt;
port=5900&lt;br /&gt;
username=ask&lt;br /&gt;
password=ask&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Consider securing &#039;&#039;&#039;vino&#039;&#039;&#039; over [[Setting_up_a_SSH_server|SSH tunnels]].&lt;br /&gt;
&lt;br /&gt;
If you want the xrdp service to start automatically, add the services to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rc-update add xrdp&lt;br /&gt;
&amp;amp;#35; rc-update add xrdp-sesman&lt;br /&gt;
&amp;amp;#35; rc-update add vino}}&lt;br /&gt;
&lt;br /&gt;
To start:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rc-service xrdp start&lt;br /&gt;
&amp;amp;#35; rc-service xrdp-sesman start&lt;br /&gt;
&amp;amp;#35; rc-service vino start}}&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
&lt;br /&gt;
==== Disabling xrdp Notification and Confirmation ====&lt;br /&gt;
&lt;br /&gt;
If you do not want the client confirmation before the session being accepted:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;export DISPLAY=:0.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Cmd|gsettings set org.gnome.Vino notify-on-connect false&lt;br /&gt;
gsettings set org.gnome.Vino prompt-enabled false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== X11vnc ==&lt;br /&gt;
&lt;br /&gt;
{{Main|X11vnc}}&lt;br /&gt;
[[X11vnc]] enables connection to the active X11 session, so one sees what is on the physical display, to include login screens and onscreen applications.  Unlike certain VNC servers that launch a virtual desktop, it does not create an additional X session and is therefore leaner.&lt;br /&gt;
&lt;br /&gt;
== Remmina as client ==&lt;br /&gt;
&lt;br /&gt;
{{Draft}}&lt;br /&gt;
Remmina is a remote desktop client that can connect to servers such as x11vnc, xrdp, and Windows RDP.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Setting_up_a_SSH_server|Setting up a SSH server]]&lt;br /&gt;
* [https://www.xrdp.org xrdp]&lt;br /&gt;
&lt;br /&gt;
[[Category:System Administration]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=31938</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=31938"/>
		<updated>2026-01-09T20:07:05Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Coldbrew */  Amended &amp;quot;$ coldbrew list&amp;quot; as &amp;quot;$ coldbrew ls&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents various ways to [[#Running glibc programs|run software compiled with glibc]] and to manage software using [[#Graphical software manager|graphical software managers]] in Alpine Linux. There are pages elsewhere regarding compiling [[Compile software from source|software from source]] and for creating a [[Custom Kernel|custom kernel]].&lt;br /&gt;
&lt;br /&gt;
== Alpine package keeper ==&lt;br /&gt;
{{Main|Alpine Package Keeper}}&lt;br /&gt;
The official package manager in Alpine Linux, [[Alpine Package Keeper|Alpine Package Keeper(apk)]], is a &#039;&#039;cli&#039;&#039; tool. [[Comparison_with_other_distros#Comparison_chart/Rosetta_Stone|Rosetta stone]] shows how standard package management tasks are done in Alpine Linux compared to other popular distributions. &lt;br /&gt;
&lt;br /&gt;
== Graphical software manager ==&lt;br /&gt;
&lt;br /&gt;
The following graphical tools are available to manage official software packages from Alpine Linux [[Repositories|repositories]] and [[#Flatpak|flatpaks]] instead of using the [[#Alpine Package Keeper|cli-based apk tool]].&lt;br /&gt;
&lt;br /&gt;
=== GNOME software ===&lt;br /&gt;
&lt;br /&gt;
[[GNOME#Configuration|GNOME software]] can be used as a GUI front end for apk to manage official software packages and flatpaks.&lt;br /&gt;
&lt;br /&gt;
=== KDE Discover ===&lt;br /&gt;
&lt;br /&gt;
[[KDE#Discover|KDE Discover]] can be used as a GUI front end for apk to manage official software packages and flatpaks.&lt;br /&gt;
&lt;br /&gt;
== AppImage ==&lt;br /&gt;
{{Main|AppImage}}&lt;br /&gt;
&lt;br /&gt;
AppImages are by far the easiest method for running programs that are not available in the official Alpine Linux [[Repositories|repositories]]. Refer to the [[AppImage]] page for prerequisites and for detailed instructions to run them in Alpine Linux. &lt;br /&gt;
&lt;br /&gt;
== Flatpak ==&lt;br /&gt;
{{Main|Flatpak}}&lt;br /&gt;
&lt;br /&gt;
[[Flatpak#Installing_Flatpak|Flatpak]] is an alternative to [[AppImage|AppImages]] for running programs that are not available in the official Alpine Linux [[Repositories|repositories]]. To use flatpaks, ensure that the [[Flatpak#Installing_Flatpak|Flathub repository]] is enabled.&lt;br /&gt;
&lt;br /&gt;
== Coldbrew ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coldbrew&#039;&#039;&#039; is a package manager that can install Alpine Linux aports Edge packages without needing root access, somewhat similar to &#039;&#039;&#039;brew&#039;&#039;&#039;.  This is particularly useful on immutable operating systems such as with [https://postmarketos.org/blog/2025/10/12/pmOS-update-2025-09/#immutable-postmarketos PostmarketOS&#039;s duranium image].  &#039;&#039;&#039;Coldbrew&#039;&#039;&#039; is available in Alpine Linux Edge testing repository as of January 2026;  the testing repository is [[Repositories#Using_testing_repository|recommended to be tagged]] if installing &#039;&#039;&#039;coldbrew&#039;&#039;&#039; on any supported Alpine Linux release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coldbrew&#039;&#039;&#039; replaces the [https://github.com/kcxt/iced &#039;&#039;&#039;iced&#039;&#039;&#039;] package on Alpine Linux, which used the {{Pkg|mkosi-sandbox}};   packages run inside a chroot using &#039;&#039;&#039;bubblewrap&#039;&#039;&#039; instead.  They have access to the home directory, but have only controlled access to all other files through explicit bind mounts.  Packages installed using &#039;&#039;&#039;coldbrew&#039;&#039;&#039; are referred to as tools.  See [https://gitlab.postmarketos.org/postmarketOS/coldbrew further details upstream].&lt;br /&gt;
&lt;br /&gt;
To install &#039;&#039;&#039;coldbrew&#039;&#039;&#039;:&lt;br /&gt;
{{Cmd|$ doas apk add coldbrew@testing}}&lt;br /&gt;
&lt;br /&gt;
To install a tool to be run by &#039;&#039;&#039;coldbrew&#039;&#039;&#039;, say, {{Pkg|corepad}}:&lt;br /&gt;
{{Cmd|$ coldbrew install corepad}}&lt;br /&gt;
&lt;br /&gt;
Note that even though the output ends...&lt;br /&gt;
&lt;br /&gt;
 Installed binary /usr/bin/corepad&lt;br /&gt;
&lt;br /&gt;
...the path being referred to exists within a new mount namespace using bind mounts in the &#039;&#039;&#039;bubblewrap&#039;&#039;&#039; sandbox.&lt;br /&gt;
&lt;br /&gt;
A wrapper program is installed to {{Path|~/.local/bin}} on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
To run the tool under &#039;&#039;&#039;coldbrew&#039;&#039;&#039;:&lt;br /&gt;
{{Cmd|$ coldbrew run corepad}}&lt;br /&gt;
&lt;br /&gt;
To remove the tool:&lt;br /&gt;
{{Cmd|$ coldbrew remove corepad}}&lt;br /&gt;
&lt;br /&gt;
All installed tools can be listed through the {{ic|$ coldbrew ls}} command.&lt;br /&gt;
&lt;br /&gt;
== Running glibc programs ==&lt;br /&gt;
&lt;br /&gt;
If you want to run [https://www.gnu.org/software/libc/ glibc] programs in Alpine Linux, there are a few ways of doing so. &lt;br /&gt;
&lt;br /&gt;
For simpler binaries, you can install [[#gcompat|gcompat]], which is a compatibility layer;  or you could do it the easy way and use [[#Flatpak|Flatpaks]] or [[#AppImage|AppImages]]. See [[#Containers|containers]] or the [[#Chroot|chroot]] section for ways to run glibc programs, including graphical ones such as {{ic|VSCode}}, {{ic|google-chrome}}, {{ic|obsidian}}, etc.&lt;br /&gt;
&lt;br /&gt;
=== gcompat ===&lt;br /&gt;
&lt;br /&gt;
[https://git.adelielinux.org/adelie/gcompat gcompat] is a library that provides glibc-compatible APIs for use on musl libc systems such as Alpine Linux. To install, issue the command: {{cmd|$ doas apk add {{pkg|gcompat}}}}&lt;br /&gt;
After that, you run your binaries as normally.&lt;br /&gt;
&lt;br /&gt;
For an usage example, refer to the [[Firefox#DRM_content_using_Widevine_workaround|Firefox]] page where gcompat is used to run the glibc-compiled Widevine binary.&lt;br /&gt;
&lt;br /&gt;
== Chroot ==&lt;br /&gt;
{{Main|Chroot}}&lt;br /&gt;
&lt;br /&gt;
An option that is easier to generalize to other glibc applications is to install a glibc-based distribution into a chroot. You can then either chroot into it, or use a symlink and some configuration to make its glibc (and associated libraries) usable from Alpine.&lt;br /&gt;
&lt;br /&gt;
{{Tip|The most reliable way to enter a chroot is to use the [[Chroot#Enter_chroot|start-chroot]] script.}}&lt;br /&gt;
&lt;br /&gt;
After setting up a chroot using any of the methods described below, the loader can be set up in Alpine as follows (these instructions are for a Debian chroot in {{Path|/var/chroots/debian}}, on x86_64, but can be adapted to other systems by using the appropriate paths):&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ doas mkdir -p /lib64&lt;br /&gt;
$ doas ln -s /var/chroots/debian/lib/x86_64-linux-gnu/ld-2.33.so /lib64&lt;br /&gt;
$ doas printf &#039;/var/chroots/debian/lib/x86_64-linux-gnu\n/var/chroots/debian/usr/lib/x86_64-linux-gnu\n&#039; &amp;gt; /etc/ld.so.conf&lt;br /&gt;
$ doas /var/chroots/debian/sbin/ldconfig}}&lt;br /&gt;
&lt;br /&gt;
=== Gentoo Linux ===&lt;br /&gt;
&lt;br /&gt;
Select a &#039;&#039;stage3&#039;&#039; from [https://www.gentoo.org/downloads/ here] and the &#039;&#039;portage&#039;&#039; latest from [https://www.gentoo.org/downloads/mirrors/ here] at gentoo/snapshots/portage-latest.tar.xz.&lt;br /&gt;
&lt;br /&gt;
First,{{cmd|$ doas apk add {{pkg|xz}}}}&lt;br /&gt;
&lt;br /&gt;
Enter the chroot:&lt;br /&gt;
{{cmd|$ doas mkdir ~/chroot&lt;br /&gt;
$ doas cd ~/chroot&lt;br /&gt;
$ doas tar -xvf stage3-*.tar.xz&lt;br /&gt;
$ doas tar -xvf portage-latest.tar.xz&lt;br /&gt;
$ doas mv portage usr&lt;br /&gt;
$ doas mount --bind /dev dev&lt;br /&gt;
$ doas mount --bind /sys sys&lt;br /&gt;
$ doas mount -t proc proc proc&lt;br /&gt;
$ doas cp /etc/resolv.conf etc&lt;br /&gt;
$ doas chroot . /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
And voilà, you have your working Gentoo chroot!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now take a look at [https://wiki.gentoo.org/wiki/Handbook:Main_Page Gentoo&#039;s Handbook] to find out how you can configure and install your system, or simply extract/copy the program that you need to run in your chroot enviroment, and then execute it.&lt;br /&gt;
&lt;br /&gt;
Here is a wrapper script that is similar to {{ic|arch-chroot}} when you frequently reuse this chroot.  Also, create an account with the same username as host current user to the chroot, or make changes to the {{ic|userspec}} option to chroot line:&lt;br /&gt;
&lt;br /&gt;
{{Cat|gentoo-chroot.sh|&amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
CHROOT_PATH=&amp;quot;/home/$USER/chroot&amp;quot;&lt;br /&gt;
cd $CHROOT_PATH&lt;br /&gt;
mount | grep $CHROOT_PATH/dev || doas mount --bind /dev dev&lt;br /&gt;
mount | grep $CHROOT_PATH/sys || doas mount --bind /sys sys&lt;br /&gt;
mount | grep $CHROOT_PATH/proc || doas mount -t proc proc proc&lt;br /&gt;
cp /etc/resolv.conf etc&lt;br /&gt;
doas chroot --userspec=$USER:users . /bin/bash&lt;br /&gt;
echo &amp;quot;You must manually unmount $CHROOT_PATH/dev, $CHROOT_PATH/sys, $CHROOT_PATH/proc.&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Do {{ic|$ chmod +x gentoo-chroot.sh}} to make it executable.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
&lt;br /&gt;
{{Seealso|Installing ArchLinux inside an Alpine chroot}}&lt;br /&gt;
Either use &#039;&#039;&#039;pacstrap&#039;&#039;&#039; (included with the arch-install-scripts package) or an Arch bootstrap image:&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ doas apk add {{pkg|arch-install-scripts}}&lt;br /&gt;
$ mkdir ~/chroot &amp;amp;&amp;amp; cd ~/chroot&lt;br /&gt;
$ curl -O https://mirrors.edge.kernel.org/archlinux/iso/latest/archlinux-bootstrap-x86_64.tar.zst&lt;br /&gt;
$ doas tar -x --zstd -f archlinux-bootstrap-x86_64.tar.zst &amp;amp;&amp;amp; rm archlinux-bootstrap-x86_64.tar.zst&lt;br /&gt;
$ doas sed -i &#039;/evowise/s/^#//&#039; root.x86_64/etc/pacman.d/mirrorlist&lt;br /&gt;
$ doas sed -i &#039;/CheckSpace/s/^/#/&#039; root.x86_64/etc/pacman.conf&lt;br /&gt;
$ doas arch-chroot root.x86_64&lt;br /&gt;
[chroot]# pacman-key --init&lt;br /&gt;
[chroot]# pacman-key --populate archlinux}}&lt;br /&gt;
&lt;br /&gt;
Once that is done, update the system and install the desired package(s) (denoted by &#039;&#039;&amp;quot;foo&amp;quot;&#039;&#039; in this example):&lt;br /&gt;
  &lt;br /&gt;
{{cmd|[chroot]# pacman -Syu &amp;lt;var&amp;gt;foo&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux provides the {{pkg|debootstrap}} package to create the Debian chroot. Here are the steps: {{cmd|$ doas apk add debootstrap&lt;br /&gt;
$ doas mkdir -p /var/chroots/debian&lt;br /&gt;
$ doas debootstrap --arch amd64 stable /var/chroots/debian/ https://deb.debian.org/debian}}&lt;br /&gt;
&lt;br /&gt;
The {{ic|--arch}} is optional, depending on your needs.&lt;br /&gt;
&lt;br /&gt;
For updating the chroot, or for installing packages and their dependencies using {{ic|apt-get}}, mount it, and then login as root:&lt;br /&gt;
{{cmd|$ doas mount --bind /dev /var/chroots/debian/dev&lt;br /&gt;
$ doas mount --bind /proc /var/chroots/debian/proc&lt;br /&gt;
$ doas mount --bind /dev/pts /var/chroots/debian/dev/pts&lt;br /&gt;
$ doas chroot /var/chroots/debian /bin/bash&lt;br /&gt;
[chroot]# apt update &amp;amp;&amp;amp; apt upgrade}}&lt;br /&gt;
&lt;br /&gt;
After installing the necessary applications and whatever else you might do, exit the chroot:&lt;br /&gt;
{{cmd|[chroot]# exit}}&lt;br /&gt;
&lt;br /&gt;
Then, unmount the binds for /dev/pts, dev and proc to avoid issues:&lt;br /&gt;
{{cmd|$ doas umount /var/chroots/debian/dev/pts&lt;br /&gt;
$ doas umount /var/chroots/debian/dev&lt;br /&gt;
$ doas umount /var/chroots/debian/proc}}&lt;br /&gt;
&lt;br /&gt;
== Containers ==&lt;br /&gt;
&lt;br /&gt;
=== Distrobox + Podman ===&lt;br /&gt;
&lt;br /&gt;
[[Distrobox]], combined with [[Podman|podman]] container running in rootless mode, allows to easily run [[Distrobox#Running_graphical_programs|glibc-compiled graphical programs]]. This will not require root privileges once set up.&lt;br /&gt;
&lt;br /&gt;
=== Bubblewrap + Chroot ===&lt;br /&gt;
&lt;br /&gt;
{{ic|glibc}} and {{ic|glibcX11}} shell aliases are defined interactively using bwrap to create a container with [[Bubblewrap]], using a [[#Debian|Debian chroot]] as its content. It&#039;s not just a chroot anymore:  it&#039;s a bubblewrap-powered isolated environment. This allows for easily running graphical programs and does not require root privileges once installed.&lt;br /&gt;
&lt;br /&gt;
[[Install]] the {{pkg|bubblewrap}} package.&lt;br /&gt;
&lt;br /&gt;
Set up [[#Debian|Debian chroot]] at {{path|/var/chroots/debian}} and install necessary glibc applications using {{ic|apt-get}}.&lt;br /&gt;
&lt;br /&gt;
Create a {{ic|glibc}} alias using bwrap in the Alpine Linux host in order to start applications from the [[#Debian|Debian chroot]]:&lt;br /&gt;
{{cmd|$ alias glibc{{=}}&amp;quot;LANG{{=}}en_US.UTF-8 bwrap --bind /var/chroots/debian / --dev-bind /dev /dev --proc /proc --bind /sys /sys --bind /run /run --bind /home /home --ro-bind /etc/resolv.conf /etc/resolv.conf --ro-bind /etc/passwd /etc/passwd --ro-bind /etc/group /etc/group&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
To run programs that use X11/Xorg, you can use: &lt;br /&gt;
{{cmd|$ alias glibcX11{{=}}&amp;quot;LANG{{=}}en_US.UTF-8 bwrap --bind /var/chroots/debian / --dev-bind /dev /dev --proc /proc --bind /sys /sys --bind /run /run --bind /home /home --ro-bind /etc/resolv.conf /etc/resolv.conf --ro-bind /etc/passwd /etc/passwd --ro-bind /etc/group /etc/group --bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X0 --setenv DISPLAY :0&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
In this case, you might need to use {{ic|xhost}} on the Alpine Linux host in order to allow local connections.  For example:{{cmd|# xhost + local:}}&lt;br /&gt;
&lt;br /&gt;
Now we can invoke glibc-built binaries using the alias from the Alpine Linux host, as follows:&lt;br /&gt;
{{cmd|$ glibc ./binary}} or {{cmd|$ glibcX11 ./binary}} &lt;br /&gt;
&lt;br /&gt;
When a [[Wayland]] desktop such as [[Sway]] runs without XWayland on the Alpine Linux host, Electron apps need to be started with Ozone Wayland support:&lt;br /&gt;
&lt;br /&gt;
* For VS Code (note the use of the {{ic|code}} command):&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;glibc code --enable-features=UseOzonePlatform --ozone-platform=wayland&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* For Google Chrome, etc:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;glibc google-chrome --enable-features=UseOzonePlatform --ozone-platform=wayland&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The flags enforce Wayland rendering, thus avoiding XWayland and improving display, particularly if fractional scaling is also used.&lt;br /&gt;
&lt;br /&gt;
== See also == &lt;br /&gt;
&lt;br /&gt;
* [[Alpine Package Keeper]]&lt;br /&gt;
* [[Installing ArchLinux inside an Alpine chroot]]&lt;br /&gt;
* [[Compile software from source]]&lt;br /&gt;
* [[Kernels]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]] [[Category:Development]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=31937</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=31937"/>
		<updated>2026-01-09T20:04:02Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Added Coldbrew section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents various ways to [[#Running glibc programs|run software compiled with glibc]] and to manage software using [[#Graphical software manager|graphical software managers]] in Alpine Linux. There are pages elsewhere regarding compiling [[Compile software from source|software from source]] and for creating a [[Custom Kernel|custom kernel]].&lt;br /&gt;
&lt;br /&gt;
== Alpine package keeper ==&lt;br /&gt;
{{Main|Alpine Package Keeper}}&lt;br /&gt;
The official package manager in Alpine Linux, [[Alpine Package Keeper|Alpine Package Keeper(apk)]], is a &#039;&#039;cli&#039;&#039; tool. [[Comparison_with_other_distros#Comparison_chart/Rosetta_Stone|Rosetta stone]] shows how standard package management tasks are done in Alpine Linux compared to other popular distributions. &lt;br /&gt;
&lt;br /&gt;
== Graphical software manager ==&lt;br /&gt;
&lt;br /&gt;
The following graphical tools are available to manage official software packages from Alpine Linux [[Repositories|repositories]] and [[#Flatpak|flatpaks]] instead of using the [[#Alpine Package Keeper|cli-based apk tool]].&lt;br /&gt;
&lt;br /&gt;
=== GNOME software ===&lt;br /&gt;
&lt;br /&gt;
[[GNOME#Configuration|GNOME software]] can be used as a GUI front end for apk to manage official software packages and flatpaks.&lt;br /&gt;
&lt;br /&gt;
=== KDE Discover ===&lt;br /&gt;
&lt;br /&gt;
[[KDE#Discover|KDE Discover]] can be used as a GUI front end for apk to manage official software packages and flatpaks.&lt;br /&gt;
&lt;br /&gt;
== AppImage ==&lt;br /&gt;
{{Main|AppImage}}&lt;br /&gt;
&lt;br /&gt;
AppImages are by far the easiest method for running programs that are not available in the official Alpine Linux [[Repositories|repositories]]. Refer to the [[AppImage]] page for prerequisites and for detailed instructions to run them in Alpine Linux. &lt;br /&gt;
&lt;br /&gt;
== Flatpak ==&lt;br /&gt;
{{Main|Flatpak}}&lt;br /&gt;
&lt;br /&gt;
[[Flatpak#Installing_Flatpak|Flatpak]] is an alternative to [[AppImage|AppImages]] for running programs that are not available in the official Alpine Linux [[Repositories|repositories]]. To use flatpaks, ensure that the [[Flatpak#Installing_Flatpak|Flathub repository]] is enabled.&lt;br /&gt;
&lt;br /&gt;
== Coldbrew ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coldbrew&#039;&#039;&#039; is a package manager that can install Alpine Linux aports Edge packages without needing root access, somewhat similar to &#039;&#039;&#039;brew&#039;&#039;&#039;.  This is particularly useful on immutable operating systems such as with [https://postmarketos.org/blog/2025/10/12/pmOS-update-2025-09/#immutable-postmarketos PostmarketOS&#039;s duranium image].  &#039;&#039;&#039;Coldbrew&#039;&#039;&#039; is available in Alpine Linux Edge testing repository as of January 2026;  the testing repository is [[Repositories#Using_testing_repository|recommended to be tagged]] if installing &#039;&#039;&#039;coldbrew&#039;&#039;&#039; on any supported Alpine Linux release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coldbrew&#039;&#039;&#039; replaces the [https://github.com/kcxt/iced &#039;&#039;&#039;iced&#039;&#039;&#039;] package on Alpine Linux, which used the {{Pkg|mkosi-sandbox}};   packages run inside a chroot using &#039;&#039;&#039;bubblewrap&#039;&#039;&#039; instead.  They have access to the home directory, but have only controlled access to all other files through explicit bind mounts.  Packages installed using &#039;&#039;&#039;coldbrew&#039;&#039;&#039; are referred to as tools.  See [https://gitlab.postmarketos.org/postmarketOS/coldbrew further details upstream].&lt;br /&gt;
&lt;br /&gt;
To install &#039;&#039;&#039;coldbrew&#039;&#039;&#039;:&lt;br /&gt;
{{Cmd|$ doas apk add coldbrew@testing}}&lt;br /&gt;
&lt;br /&gt;
To install a tool to be run by &#039;&#039;&#039;coldbrew&#039;&#039;&#039;, say, {{Pkg|corepad}}:&lt;br /&gt;
{{Cmd|$ coldbrew install corepad}}&lt;br /&gt;
&lt;br /&gt;
Note that even though the output ends...&lt;br /&gt;
&lt;br /&gt;
 Installed binary /usr/bin/corepad&lt;br /&gt;
&lt;br /&gt;
...the path being referred to exists within a new mount namespace using bind mounts in the &#039;&#039;&#039;bubblewrap&#039;&#039;&#039; sandbox.&lt;br /&gt;
&lt;br /&gt;
A wrapper program is installed to {{Path|~/.local/bin}} on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
To run the tool under &#039;&#039;&#039;coldbrew&#039;&#039;&#039;:&lt;br /&gt;
{{Cmd|$ coldbrew run corepad}}&lt;br /&gt;
&lt;br /&gt;
To remove the tool:&lt;br /&gt;
{{Cmd|$ coldbrew remove corepad}}&lt;br /&gt;
&lt;br /&gt;
All installed tools can be listed through the {{ic|$ coldbrew list}} command.&lt;br /&gt;
&lt;br /&gt;
== Running glibc programs ==&lt;br /&gt;
&lt;br /&gt;
If you want to run [https://www.gnu.org/software/libc/ glibc] programs in Alpine Linux, there are a few ways of doing so. &lt;br /&gt;
&lt;br /&gt;
For simpler binaries, you can install [[#gcompat|gcompat]], which is a compatibility layer;  or you could do it the easy way and use [[#Flatpak|Flatpaks]] or [[#AppImage|AppImages]]. See [[#Containers|containers]] or the [[#Chroot|chroot]] section for ways to run glibc programs, including graphical ones such as {{ic|VSCode}}, {{ic|google-chrome}}, {{ic|obsidian}}, etc.&lt;br /&gt;
&lt;br /&gt;
=== gcompat ===&lt;br /&gt;
&lt;br /&gt;
[https://git.adelielinux.org/adelie/gcompat gcompat] is a library that provides glibc-compatible APIs for use on musl libc systems such as Alpine Linux. To install, issue the command: {{cmd|$ doas apk add {{pkg|gcompat}}}}&lt;br /&gt;
After that, you run your binaries as normally.&lt;br /&gt;
&lt;br /&gt;
For an usage example, refer to the [[Firefox#DRM_content_using_Widevine_workaround|Firefox]] page where gcompat is used to run the glibc-compiled Widevine binary.&lt;br /&gt;
&lt;br /&gt;
== Chroot ==&lt;br /&gt;
{{Main|Chroot}}&lt;br /&gt;
&lt;br /&gt;
An option that is easier to generalize to other glibc applications is to install a glibc-based distribution into a chroot. You can then either chroot into it, or use a symlink and some configuration to make its glibc (and associated libraries) usable from Alpine.&lt;br /&gt;
&lt;br /&gt;
{{Tip|The most reliable way to enter a chroot is to use the [[Chroot#Enter_chroot|start-chroot]] script.}}&lt;br /&gt;
&lt;br /&gt;
After setting up a chroot using any of the methods described below, the loader can be set up in Alpine as follows (these instructions are for a Debian chroot in {{Path|/var/chroots/debian}}, on x86_64, but can be adapted to other systems by using the appropriate paths):&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ doas mkdir -p /lib64&lt;br /&gt;
$ doas ln -s /var/chroots/debian/lib/x86_64-linux-gnu/ld-2.33.so /lib64&lt;br /&gt;
$ doas printf &#039;/var/chroots/debian/lib/x86_64-linux-gnu\n/var/chroots/debian/usr/lib/x86_64-linux-gnu\n&#039; &amp;gt; /etc/ld.so.conf&lt;br /&gt;
$ doas /var/chroots/debian/sbin/ldconfig}}&lt;br /&gt;
&lt;br /&gt;
=== Gentoo Linux ===&lt;br /&gt;
&lt;br /&gt;
Select a &#039;&#039;stage3&#039;&#039; from [https://www.gentoo.org/downloads/ here] and the &#039;&#039;portage&#039;&#039; latest from [https://www.gentoo.org/downloads/mirrors/ here] at gentoo/snapshots/portage-latest.tar.xz.&lt;br /&gt;
&lt;br /&gt;
First,{{cmd|$ doas apk add {{pkg|xz}}}}&lt;br /&gt;
&lt;br /&gt;
Enter the chroot:&lt;br /&gt;
{{cmd|$ doas mkdir ~/chroot&lt;br /&gt;
$ doas cd ~/chroot&lt;br /&gt;
$ doas tar -xvf stage3-*.tar.xz&lt;br /&gt;
$ doas tar -xvf portage-latest.tar.xz&lt;br /&gt;
$ doas mv portage usr&lt;br /&gt;
$ doas mount --bind /dev dev&lt;br /&gt;
$ doas mount --bind /sys sys&lt;br /&gt;
$ doas mount -t proc proc proc&lt;br /&gt;
$ doas cp /etc/resolv.conf etc&lt;br /&gt;
$ doas chroot . /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
And voilà, you have your working Gentoo chroot!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now take a look at [https://wiki.gentoo.org/wiki/Handbook:Main_Page Gentoo&#039;s Handbook] to find out how you can configure and install your system, or simply extract/copy the program that you need to run in your chroot enviroment, and then execute it.&lt;br /&gt;
&lt;br /&gt;
Here is a wrapper script that is similar to {{ic|arch-chroot}} when you frequently reuse this chroot.  Also, create an account with the same username as host current user to the chroot, or make changes to the {{ic|userspec}} option to chroot line:&lt;br /&gt;
&lt;br /&gt;
{{Cat|gentoo-chroot.sh|&amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
CHROOT_PATH=&amp;quot;/home/$USER/chroot&amp;quot;&lt;br /&gt;
cd $CHROOT_PATH&lt;br /&gt;
mount | grep $CHROOT_PATH/dev || doas mount --bind /dev dev&lt;br /&gt;
mount | grep $CHROOT_PATH/sys || doas mount --bind /sys sys&lt;br /&gt;
mount | grep $CHROOT_PATH/proc || doas mount -t proc proc proc&lt;br /&gt;
cp /etc/resolv.conf etc&lt;br /&gt;
doas chroot --userspec=$USER:users . /bin/bash&lt;br /&gt;
echo &amp;quot;You must manually unmount $CHROOT_PATH/dev, $CHROOT_PATH/sys, $CHROOT_PATH/proc.&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Do {{ic|$ chmod +x gentoo-chroot.sh}} to make it executable.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
&lt;br /&gt;
{{Seealso|Installing ArchLinux inside an Alpine chroot}}&lt;br /&gt;
Either use &#039;&#039;&#039;pacstrap&#039;&#039;&#039; (included with the arch-install-scripts package) or an Arch bootstrap image:&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ doas apk add {{pkg|arch-install-scripts}}&lt;br /&gt;
$ mkdir ~/chroot &amp;amp;&amp;amp; cd ~/chroot&lt;br /&gt;
$ curl -O https://mirrors.edge.kernel.org/archlinux/iso/latest/archlinux-bootstrap-x86_64.tar.zst&lt;br /&gt;
$ doas tar -x --zstd -f archlinux-bootstrap-x86_64.tar.zst &amp;amp;&amp;amp; rm archlinux-bootstrap-x86_64.tar.zst&lt;br /&gt;
$ doas sed -i &#039;/evowise/s/^#//&#039; root.x86_64/etc/pacman.d/mirrorlist&lt;br /&gt;
$ doas sed -i &#039;/CheckSpace/s/^/#/&#039; root.x86_64/etc/pacman.conf&lt;br /&gt;
$ doas arch-chroot root.x86_64&lt;br /&gt;
[chroot]# pacman-key --init&lt;br /&gt;
[chroot]# pacman-key --populate archlinux}}&lt;br /&gt;
&lt;br /&gt;
Once that is done, update the system and install the desired package(s) (denoted by &#039;&#039;&amp;quot;foo&amp;quot;&#039;&#039; in this example):&lt;br /&gt;
  &lt;br /&gt;
{{cmd|[chroot]# pacman -Syu &amp;lt;var&amp;gt;foo&amp;lt;/var&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux provides the {{pkg|debootstrap}} package to create the Debian chroot. Here are the steps: {{cmd|$ doas apk add debootstrap&lt;br /&gt;
$ doas mkdir -p /var/chroots/debian&lt;br /&gt;
$ doas debootstrap --arch amd64 stable /var/chroots/debian/ https://deb.debian.org/debian}}&lt;br /&gt;
&lt;br /&gt;
The {{ic|--arch}} is optional, depending on your needs.&lt;br /&gt;
&lt;br /&gt;
For updating the chroot, or for installing packages and their dependencies using {{ic|apt-get}}, mount it, and then login as root:&lt;br /&gt;
{{cmd|$ doas mount --bind /dev /var/chroots/debian/dev&lt;br /&gt;
$ doas mount --bind /proc /var/chroots/debian/proc&lt;br /&gt;
$ doas mount --bind /dev/pts /var/chroots/debian/dev/pts&lt;br /&gt;
$ doas chroot /var/chroots/debian /bin/bash&lt;br /&gt;
[chroot]# apt update &amp;amp;&amp;amp; apt upgrade}}&lt;br /&gt;
&lt;br /&gt;
After installing the necessary applications and whatever else you might do, exit the chroot:&lt;br /&gt;
{{cmd|[chroot]# exit}}&lt;br /&gt;
&lt;br /&gt;
Then, unmount the binds for /dev/pts, dev and proc to avoid issues:&lt;br /&gt;
{{cmd|$ doas umount /var/chroots/debian/dev/pts&lt;br /&gt;
$ doas umount /var/chroots/debian/dev&lt;br /&gt;
$ doas umount /var/chroots/debian/proc}}&lt;br /&gt;
&lt;br /&gt;
== Containers ==&lt;br /&gt;
&lt;br /&gt;
=== Distrobox + Podman ===&lt;br /&gt;
&lt;br /&gt;
[[Distrobox]], combined with [[Podman|podman]] container running in rootless mode, allows to easily run [[Distrobox#Running_graphical_programs|glibc-compiled graphical programs]]. This will not require root privileges once set up.&lt;br /&gt;
&lt;br /&gt;
=== Bubblewrap + Chroot ===&lt;br /&gt;
&lt;br /&gt;
{{ic|glibc}} and {{ic|glibcX11}} shell aliases are defined interactively using bwrap to create a container with [[Bubblewrap]], using a [[#Debian|Debian chroot]] as its content. It&#039;s not just a chroot anymore:  it&#039;s a bubblewrap-powered isolated environment. This allows for easily running graphical programs and does not require root privileges once installed.&lt;br /&gt;
&lt;br /&gt;
[[Install]] the {{pkg|bubblewrap}} package.&lt;br /&gt;
&lt;br /&gt;
Set up [[#Debian|Debian chroot]] at {{path|/var/chroots/debian}} and install necessary glibc applications using {{ic|apt-get}}.&lt;br /&gt;
&lt;br /&gt;
Create a {{ic|glibc}} alias using bwrap in the Alpine Linux host in order to start applications from the [[#Debian|Debian chroot]]:&lt;br /&gt;
{{cmd|$ alias glibc{{=}}&amp;quot;LANG{{=}}en_US.UTF-8 bwrap --bind /var/chroots/debian / --dev-bind /dev /dev --proc /proc --bind /sys /sys --bind /run /run --bind /home /home --ro-bind /etc/resolv.conf /etc/resolv.conf --ro-bind /etc/passwd /etc/passwd --ro-bind /etc/group /etc/group&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
To run programs that use X11/Xorg, you can use: &lt;br /&gt;
{{cmd|$ alias glibcX11{{=}}&amp;quot;LANG{{=}}en_US.UTF-8 bwrap --bind /var/chroots/debian / --dev-bind /dev /dev --proc /proc --bind /sys /sys --bind /run /run --bind /home /home --ro-bind /etc/resolv.conf /etc/resolv.conf --ro-bind /etc/passwd /etc/passwd --ro-bind /etc/group /etc/group --bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X0 --setenv DISPLAY :0&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
In this case, you might need to use {{ic|xhost}} on the Alpine Linux host in order to allow local connections.  For example:{{cmd|# xhost + local:}}&lt;br /&gt;
&lt;br /&gt;
Now we can invoke glibc-built binaries using the alias from the Alpine Linux host, as follows:&lt;br /&gt;
{{cmd|$ glibc ./binary}} or {{cmd|$ glibcX11 ./binary}} &lt;br /&gt;
&lt;br /&gt;
When a [[Wayland]] desktop such as [[Sway]] runs without XWayland on the Alpine Linux host, Electron apps need to be started with Ozone Wayland support:&lt;br /&gt;
&lt;br /&gt;
* For VS Code (note the use of the {{ic|code}} command):&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;glibc code --enable-features=UseOzonePlatform --ozone-platform=wayland&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* For Google Chrome, etc:&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;glibc google-chrome --enable-features=UseOzonePlatform --ozone-platform=wayland&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The flags enforce Wayland rendering, thus avoiding XWayland and improving display, particularly if fractional scaling is also used.&lt;br /&gt;
&lt;br /&gt;
== See also == &lt;br /&gt;
&lt;br /&gt;
* [[Alpine Package Keeper]]&lt;br /&gt;
* [[Installing ArchLinux inside an Alpine chroot]]&lt;br /&gt;
* [[Compile software from source]]&lt;br /&gt;
* [[Kernels]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]] [[Category:Development]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=31936</id>
		<title>Tutorials and Howtos</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=31936"/>
		<updated>2026-01-07T21:39:49Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Raspberry Pi */ Added Raspberry Pi Zero W - Installation (previously orphaned page).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:package_edutainment.svg|right|link=]]&lt;br /&gt;
{{TOC left}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to Tutorials and Howtos, a place of basic and advanced configuration tasks for your Alpine Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Howtos are smaller articles&#039;&#039;&#039; explaining how to perform a particular task with Alpine Linux, that expects a minimal knowledge from reader to perform actions. Howto&#039;s have been organized in the below page based on the topics.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The [[#Tutorials|tutorials]] are hands-on&#039;&#039;&#039; and the reader is expected to try and achieve the goals described in each step, possibly with the help of a good example. The output in one step is the starting point for the following step.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
* Contributors are requested to refer to [[Help:Editing]] first and make use of resources like [[How to write a HOWTO]].&lt;br /&gt;
* Contributions must be complete articles. &lt;br /&gt;
* Don&#039;t override already made contributions, unless there is a mistake. &lt;br /&gt;
* If you want to request a topic, please add your request in this page&#039;s [[Talk:Tutorials_and_Howtos|Discussion]].}}&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
* {{:Daily driver guide}}&lt;br /&gt;
&lt;br /&gt;
=== Networking ===&lt;br /&gt;
&lt;br /&gt;
* [[Bluetooth]] - Instructions for installing and configuring Bluetooth&lt;br /&gt;
* [[Bonding]] - Bond (or aggregate) multiple ethernet interfaces&lt;br /&gt;
* [[Bridge]] - Configuring a network bridge&lt;br /&gt;
** [[Bridge wlan0 to eth0]]&lt;br /&gt;
* [[Configure Networking]]&lt;br /&gt;
* [[How to configure static routes]]&lt;br /&gt;
* Modem&lt;br /&gt;
** [[Using HSDPA modem]]&lt;br /&gt;
** [[Using serial modem]]&lt;br /&gt;
* [[mDNS]] - Howto implement multicast DNS resolution in Alpine. &lt;br /&gt;
* [[Multi ISP]] &#039;&#039;(Dual-ISP setup with load-balancing and automatic failover)&#039;&#039;&lt;br /&gt;
* [[PXE boot]]&lt;br /&gt;
* Wi-Fi&lt;br /&gt;
** [[Wi-Fi|Connecting to a wireless access point]]&lt;br /&gt;
** [[How to setup a wireless access point]] &#039;&#039;(Setting up Secure Wireless AP w/ WPA encryption with bridge to wired network)&#039;&#039;&lt;br /&gt;
* Use [https://github.com/ifupdown-ng/ifupdown-ng/blob/main/doc/interfaces-vxlan.scd vxlan], if using  [[Ifupdown-ng]] instead of [[VLAN]]&lt;br /&gt;
* [[Setting up a Home Router]]&lt;br /&gt;
&lt;br /&gt;
=== Backup and data migration ===&lt;br /&gt;
&lt;br /&gt;
* [[Migrating data]]&lt;br /&gt;
* [[Rsnapshot]] - setting up periodic backups&lt;br /&gt;
&lt;br /&gt;
=== Other topics ===&lt;br /&gt;
&lt;br /&gt;
* [[Gaming on Alpine]]&lt;br /&gt;
* [[Remote Desktop Server]]&lt;br /&gt;
* [[Default applications|How to change default application]]&lt;br /&gt;
* [[CPU frequency scaling]]&lt;br /&gt;
* [[Mimalloc]]&lt;br /&gt;
* [[Enable Serial Console on Boot]]&lt;br /&gt;
* [[How to build the Alpine Linux kernel]]&lt;br /&gt;
* [[Nextcloud]] &#039;&#039;(Self hostable cloud suite - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Setting up lm_sensors]]&lt;br /&gt;
* [[Fingerprint Authentication with swaylock]]&lt;br /&gt;
* [[Desktop environments and Window managers|List of supported Desktop environments and Window managers]]&lt;br /&gt;
&lt;br /&gt;
== Diskless ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]]&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
&lt;br /&gt;
== Other Architectures ==&lt;br /&gt;
&lt;br /&gt;
=== ARM ===&lt;br /&gt;
&lt;br /&gt;
* [[Alpine on ARM]]&lt;br /&gt;
&lt;br /&gt;
==== Raspberry Pi ====&lt;br /&gt;
&lt;br /&gt;
* [[Raspberry Pi|Raspberry Pi main page]]&lt;br /&gt;
* [[Raspberry Pi Bluetooth Speaker|Raspberry Pi - Bluetooth Speaker]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi|Raspberry Pi - Router with VPN]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi (IPv6)|Raspberry Pi - Router with VPN (IPv6)]]&lt;br /&gt;
* [[Classic install or sys mode on Raspberry Pi|Raspberry Pi - Sys mode install]]&lt;br /&gt;
* [[Raspberry Pi LVM on LUKS|Raspberry Pi - Sys mode install - LVM on LUKS]]&lt;br /&gt;
* [[RPI Video Receiver|Raspberry Pi - Video Receiver]] &#039;&#039;(network video decoder using Rasperry Pi and omxplayer)&#039;&#039;&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]] - kiosk or digital sign&lt;br /&gt;
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]&lt;br /&gt;
* [[Raspberry Pi 3 - Setting Up Bluetooth]]&lt;br /&gt;
* [[Raspberry Pi 4 - Persistent system acting as a NAS and Time Machine]]&lt;br /&gt;
* [[Raspberry_Pi_Zero_W_-_Installation|Raspberry Pi Zero W - Installation]]&lt;br /&gt;
* [[How to set up Alpine as a wireless router|Raspberry Pi Zero W - Wireless router]] &#039;&#039;(Setting up a firewalled, Wireless AP with wired network on a Pi Zero W)&#039;&#039;&lt;br /&gt;
* [[RPI Video Receiver]]&lt;br /&gt;
&lt;br /&gt;
=== IBM Z (IBM z Systems) ===&lt;br /&gt;
&lt;br /&gt;
* [[s390x|s390x - Installation]]&lt;br /&gt;
&lt;br /&gt;
=== PowerPC ===&lt;br /&gt;
&lt;br /&gt;
* [[Ppc64le|Powerpc64le - Installation]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[#Desktop security|Desktop security]] lists steps for securing Alpine Linux desktops&lt;br /&gt;
* [[Setting up a laptop]] page has detailed guidelines to configure a secured laptop&lt;br /&gt;
* [[Securing Alpine Linux|Secure Alpine Linux]] using Security Technical Implementation Guides (STIGs)&lt;br /&gt;
* [[Sshguard|SSHGuard]] - Protects hosts against brute-force attacks:  monitoring logs, attack detection, blocking using firewall.&lt;br /&gt;
&lt;br /&gt;
== Services == &lt;br /&gt;
&lt;br /&gt;
{{Note| Services are arranged in alphabetical order.}}&lt;br /&gt;
&lt;br /&gt;
=== Content management systems ===&lt;br /&gt;
&lt;br /&gt;
* [[DokuWiki]] &#039;&#039;(Simple and easy to use wiki, no database required)&#039;&#039;&lt;br /&gt;
* [[Drupal]] &#039;&#039;(Content Management System (CMS) written in PHP)&#039;&#039;&lt;br /&gt;
* [[Kopano]] &#039;&#039;(Microsoft Outlook compatible Groupware)&#039;&#039;&lt;br /&gt;
* [[Mahara]] &#039;&#039;(E-portfolio and social networking system)&#039;&#039;&lt;br /&gt;
* [[MediaWiki]] &#039;&#039;(Free web-based wiki software application)&#039;&#039;&lt;br /&gt;
* [[Pastebin]] &#039;&#039;(Pastebin software application)&#039;&#039;&lt;br /&gt;
* [[WordPress]] &#039;&#039;(Web software to create website or blog)&#039;&#039;&lt;br /&gt;
* [[Moodle]] &#039;&#039;(Online Learning Management system)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Database === &lt;br /&gt;
&lt;br /&gt;
* [[MariaDB]] or [[MySQL|MySQL]]&lt;br /&gt;
&lt;br /&gt;
=== DNS ===&lt;br /&gt;
&lt;br /&gt;
* [[DNSCrypt-Proxy]] &#039;&#039;Encrypt and authenticate DNS calls from your system&#039;&#039;&lt;br /&gt;
* [[Setting up nsd DNS server]]&lt;br /&gt;
* [[Small-Time DNS with BIND9]] &#039;&#039;(A simple configuration with ad blocking for your home network)&#039;&#039;&lt;br /&gt;
* Unbound&lt;br /&gt;
** [[Setting up unbound DNS server]]&lt;br /&gt;
** [[Using Unbound as an Ad-blocker]] &#039;&#039;(Setup ad blocking for your network)&#039;&#039;&lt;br /&gt;
* [[TinyDNS Format]]&lt;br /&gt;
&lt;br /&gt;
=== File server ===&lt;br /&gt;
&lt;br /&gt;
* [[Setting up an NFS server|nfs-server]]&lt;br /&gt;
* [[Setting up a Samba server|samba-server]] &#039;&#039;(standard file sharing)&#039;&#039;&lt;br /&gt;
* [[Setting up a samba-ad-dc|samba-ad-dc]] &#039;&#039;(Active Directory compatible domain controller)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
&lt;br /&gt;
* [https://git.alpinelinux.org/awall/about/ Alpine Wall User&#039;s Guide]&lt;br /&gt;
** [[Zero-To-Awall]] -&#039;&#039;AWall for dummies&#039;&#039;&lt;br /&gt;
** [[How-To Alpine Wall]] - &#039;&#039;AWall for Shorewall users&#039;&#039;&lt;br /&gt;
** [[Alpine Wall]] - &#039;&#039;AWall - Firewall management framework - Design Document&#039;&#039;&lt;br /&gt;
* [[Iptables]]&lt;br /&gt;
* [[nftables]]&lt;br /&gt;
* [[Uncomplicated Firewall|Uncomplicated Firewall or UFW]]&lt;br /&gt;
&lt;br /&gt;
=== HTTP and web services ===&lt;br /&gt;
&lt;br /&gt;
* [[Althttpd]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
** [[Apache with php-fpm]]&lt;br /&gt;
** [[Setting Up Apache with PHP]]&lt;br /&gt;
** [[Apache authentication: NTLM Single Signon]]&lt;br /&gt;
* [[Darkhttpd]]&lt;br /&gt;
* [[Lighttpd]]&lt;br /&gt;
** [[Lighttpd Advanced security]]&lt;br /&gt;
** [[Setting Up Lighttpd With FastCGI]]&lt;br /&gt;
** [[Production Web server: Lighttpd|Production web server: Lighttpd‎‎]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
** [[Nginx as reverse proxy with acme (letsencrypt)]]&lt;br /&gt;
** [[Nginx with PHP]]&lt;br /&gt;
* Squid Proxy&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
** [[Setting up Explicit Squid Proxy]]&lt;br /&gt;
** [[Setting up Transparent Squid Proxy]] &#039;&#039;(Covers Squid proxy and URL Filtering system)&#039;&#039;&lt;br /&gt;
** [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
* [[Tomcat]]&lt;br /&gt;
** [[Production LAMP system: Lighttpd + PHP + MySQL‎‎|Production LAMP system: Lighttpd + PHP + MariaDB/MySQL‎‎]]&lt;br /&gt;
&lt;br /&gt;
=== IRC ===&lt;br /&gt;
&lt;br /&gt;
* [[NgIRCd]] &#039;&#039;(Server for Internet Relay Chat/IRC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Mail ===&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(Hosting mail, webservices and other services)&#039;&#039;&lt;br /&gt;
* [[Hosting Web/Email services on Alpine]]&lt;br /&gt;
* Exim/Dovecot&lt;br /&gt;
** [[Small-Time Email with Exim and Dovecot]] &#039;&#039;(A simple configuration for your home network.)&lt;br /&gt;
** [[Setting up dovecot with imap and tls]]&lt;br /&gt;
* [[relay email to gmail (msmtp, mailx, sendmail]]&lt;br /&gt;
* [[relay email (nullmailer)]]&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Setting up postfix with virtual domains]]&lt;br /&gt;
* Server protection&lt;br /&gt;
** [[Setting up clamsmtp]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring ===&lt;br /&gt;
&lt;br /&gt;
* [[Awstats]] &#039;&#039;(Free log file analyzer)&#039;&#039;&lt;br /&gt;
* [[Cacti: traffic analysis and monitoring network]] &#039;&#039;(Front-end for rrdtool networking monitor)&#039;&#039;&lt;br /&gt;
* [[Cvechecker]] &#039;&#039;(Compare installed packages for Common Vulnerabilities Exposure)&#039;&#039; &amp;lt;!-- Monitoring and Security --&amp;gt;&lt;br /&gt;
* [[Linfo]]&lt;br /&gt;
* [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[PhpSysInfo]] &#039;&#039;(A simple application that displays information about the host it&#039;s running on)&#039;&#039;&lt;br /&gt;
* [[Logcheck]] &#039;&#039;(log file monitoring tool)&#039;&#039;&lt;br /&gt;
* [[Matomo]] &#039;&#039;(A real time web analytics software program)&#039;&#039;&lt;br /&gt;
* [[Rasdaemon]] &#039;&#039;(Platform Reliability, Availability and Serviceability monitoring tool)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft, solution, Networking and Monitoring and Server --&amp;gt;&lt;br /&gt;
** [[Setting up NRPE daemon]] &#039;&#039;(Performs remote Nagios checks)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting Up Fprobe And Ntop|Ntop]] &#039;&#039;(NetFlow collection and analysis using a remote fprobe instance; for alpine 3.10-3.12 only)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
* [[Traffic monitoring]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
** [[Setting up monitoring using rrdtool (and rrdcollect)]]&lt;br /&gt;
** [[Setting up traffic monitoring using rrdtool (and snmp)]] &amp;lt;!-- Monitoring --&amp;gt;&lt;br /&gt;
* [[Zabbix|Zabbix - the professional complete manager]] &#039;&#039;(Monitor and track the status of network services and hardware)&#039;&#039;&lt;br /&gt;
* [[ZoneMinder video camera security and surveillance]]&lt;br /&gt;
&lt;br /&gt;
=== Remote Administration ===&lt;br /&gt;
&lt;br /&gt;
* ACF&lt;br /&gt;
** [[Changing passwords for ACF|ACF - changing passwords]]&lt;br /&gt;
** [[Generating SSL certs with ACF]] &amp;lt;!-- Generating SSL certs with ACF 1.9 --&amp;gt;&lt;br /&gt;
** [[setup-acf| ACF - setup]] &#039;&#039;(Configures ACF (webconfiguration/webmin) so you can manage your box through https)&#039;&#039;&lt;br /&gt;
* [[Setting up a SSH server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator |OpenSSH 2FA]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
* [[OpenVCP]] &#039;&#039;(VServer Control Panel)&#039;&#039;&lt;br /&gt;
* [[PhpMyAdmin]] &#039;&#039;(Web-based administration tool for MYSQL)&#039;&#039;&lt;br /&gt;
* [[PhpPgAdmin]] &#039;&#039;(Web-based administration tool for PostgreSQL)&#039;&#039;&lt;br /&gt;
* [[Webmin]] &#039;&#039;(A web-based interface for Linux system)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Telephony ===&lt;br /&gt;
&lt;br /&gt;
* [[FreePBX|FreePBX on Alpine Linux]]&lt;br /&gt;
* [[Setting up Zaptel/Asterisk on Alpine]]&lt;br /&gt;
* [[Kamailio]] &#039;&#039;(SIP Server, formerly OpenSER)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== VPN ===&lt;br /&gt;
* [[Freeradius Active Directory Integration]]&lt;br /&gt;
* [[GNUnet]]&lt;br /&gt;
* [[IGMPproxy]]&lt;br /&gt;
* [[Setting up a OpenVPN server|OpenVPN server]] &#039;&#039;(Allowing single users or devices to remotely connect to your network)&#039;&#039;&lt;br /&gt;
* [[OpenVSwitch]]&lt;br /&gt;
* [[Tor]]&lt;br /&gt;
* [[Using Alpine on Windows domain with IPSEC isolation]]&lt;br /&gt;
* [[Configure a Wireguard interface (wg)|Wireguard]]&lt;br /&gt;
* [[Vpnc]]&lt;br /&gt;
&lt;br /&gt;
=== Other Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[apcupsd]] &#039;&#039;(UPS Monitoring with apcupsd)&#039;&#039;&lt;br /&gt;
* [[Chrony and GPSD | Chrony, gpsd, and a garmin LVC 18 as a Stratum 1 NTP source ]]&lt;br /&gt;
* [[Glpi]] &#039;&#039;(Manage inventory of technical resources)&#039;&#039;&lt;br /&gt;
* [[How to setup a Alpine Linux mirror]]&lt;br /&gt;
* [[nut-ups|NUT UPS]] &#039;&#039;(UPS Monitoring with Network UPS Tools)&#039;&#039;&lt;br /&gt;
* [[Odoo]]&lt;br /&gt;
* [[Configure OpenLDAP | OpenLDAP]] &#039;&#039;(Installing and configuring the Alpine package for OpenLDAP)&#039;&#039;&lt;br /&gt;
* [[Setting up a LLDAP server|lldap-server]] &#039;&#039;(Directory Server)&#039;&#039;&lt;br /&gt;
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Software development ==&lt;br /&gt;
&lt;br /&gt;
* [[Cgit]]&lt;br /&gt;
* [[OsTicket]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Patchwork]] &#039;&#039;(Patch review management system)&#039;&#039;&lt;br /&gt;
* [[Redmine]] &#039;&#039;(Project management system) [Deprecated]&#039;&#039;&lt;br /&gt;
* [[Request Tracker]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Setting up trac wiki|Trac]] &#039;&#039;(Enhanced wiki and issue tracking system for software development projects)&#039;&#039;&lt;br /&gt;
* [[Ansible]] &#039;&#039;(Configuration management)&#039;&#039;&lt;br /&gt;
* [[Installing Oracle Java|Oracle Java (installation)]]&lt;br /&gt;
&lt;br /&gt;
== Storage ==&lt;br /&gt;
&lt;br /&gt;
* [[Setting up disks manually|Manual partitioning]]&lt;br /&gt;
* [[Disk Replication with DRBD|DRBD: Disk Replication]]&lt;br /&gt;
* [[Filesystems]]&lt;br /&gt;
** [[Burning ISOs]]&lt;br /&gt;
* [[Setting up iSCSI|iSCSI Setup]]&lt;br /&gt;
** [[iSCSI Raid and Clustered File Systems]]&lt;br /&gt;
** [[Linux iSCSI Target (TCM)|iSCSI Target (TCM)/LinuxIO (LIO)]]&lt;br /&gt;
** [[Linux iSCSI Target (tgt)|User space iSCSI Target (tgt)]]&lt;br /&gt;
* [[Setting up Logical Volumes with LVM|LVM Setup]]&lt;br /&gt;
** [[Setting up LVM on GPT-labeled disks|LVM on GPT-labeled disks]]&lt;br /&gt;
** [[Installing on GPT LVM|LVM on GPT-labeled disks (updated)]]&lt;br /&gt;
** [[LVM on LUKS]]&lt;br /&gt;
* RAID&lt;br /&gt;
** [[Raid Administration]]&lt;br /&gt;
** [[Setting up a software RAID array]]&lt;br /&gt;
* [[ZFS]]&lt;br /&gt;
** [[Root on ZFS with native encryption]]&lt;br /&gt;
** [[Setting up ZFS on LUKS]]&lt;br /&gt;
* [[CEPH|CEPH]]&lt;br /&gt;
&lt;br /&gt;
== Virtualization ==&lt;br /&gt;
&lt;br /&gt;
* [[Docker]]&lt;br /&gt;
* [[Installing Alpine in a virtual machine]]&lt;br /&gt;
** [[Install Alpine on VMware ESXi]]&lt;br /&gt;
* [[KVM]] &#039;&#039;(Setting up Alpine as a KVM hypervisor)&#039;&#039;&lt;br /&gt;
* [[LXC]] &#039;&#039;(Setting up a Linux container in Alpine Linux)&#039;&#039;&lt;br /&gt;
* [[QEMU]]&lt;br /&gt;
* Xen&lt;br /&gt;
** [[Xen Dom0]] &#039;&#039;(Setting up Alpine as a dom0 for Xen hypervisor)&#039;&#039;&lt;br /&gt;
** [[Xen Dom0 on USB or SD]]&lt;br /&gt;
** [[Create Alpine Linux PV DomU|Xen DomU (paravirtualized)]]&lt;br /&gt;
** [[Xen LiveCD]]&lt;br /&gt;
** [[Xen PCI Passthrough]]&lt;br /&gt;
** [[K8s]] Building a K8s Kubernetes Cluster on Alpine Linux&lt;br /&gt;
* [[Runc]]&lt;br /&gt;
&lt;br /&gt;
== [[Simple_Walkthrough]] ==&lt;br /&gt;
* [[About-virtualization-simple]]&lt;br /&gt;
* [[LXC_Alpinelinux_Simple]]&lt;br /&gt;
* [[Qemu-simple]]&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
* [[TTY_Autologin|TTY Autologin]]&lt;br /&gt;
* [[Kexec|Faster rebooting with kexec]]&lt;br /&gt;
* [[Dynamic Multipoint VPN (DMVPN)]] combined with [[Small Office Services]]&lt;br /&gt;
* [[DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]]&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039;&lt;br /&gt;
* [[Linux iSCSI Target (TCM)]]&lt;br /&gt;
* [[ISP Mail Server 3.x HowTo]] &#039;&#039;(Postfix+PostfixAdmin+DoveCot+Roundcube+ClamAV+Spamd - A full-service ISP mail server)&#039;&#039;&lt;br /&gt;
* [[Grommunio Mail Server]] &#039;&#039;(Mariadb+Postfix+Rspamd+Grommunio - Full-service mail server as MS exchange replacement)&#039;&#039;&lt;br /&gt;
* [[Replacing non-Alpine Linux with Alpine remotely]]&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
* [[Streaming Security Camera Video with VLC]]&lt;br /&gt;
* [[Install Alpine on a btrfs filesystem with refind as boot manager]]&lt;br /&gt;
* [[Compile software from source|How to Compile a software from source in Alpine Linux]]&lt;br /&gt;
* [https://ww2.coastal.edu/mmurphy2/oer/alpine/ Alpine Linux tutorials - Dr Murphy, Computing Science Associate Professor]&lt;br /&gt;
* [[Michael&#039;s base installation procedure|Michael&#039;s base installation procedure]]&lt;br /&gt;
* [[Michael&#039;s cwm  desktop (minimal)|Michael&#039;s cwm desktop (minimal)]]&lt;br /&gt;
* [[Michael&#039;s sway desktop (minimal)|Michael&#039;s Sway desktop (minimal)]]&lt;br /&gt;
* [[Sway_customization_guide|Sway customization guide]] &#039;&#039;(Tutorial re Sway config file basics)&#039;&#039;&lt;br /&gt;
* [[Using Distrobox For VR Gaming|Using Distrobox For VR Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Sshguard&amp;diff=31935</id>
		<title>Talk:Sshguard</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Sshguard&amp;diff=31935"/>
		<updated>2026-01-07T21:25:46Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Added /*  Display title - amend to SSHGuard */ section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Display title - amend to SSHGuard ==&lt;br /&gt;
The display title was attempted to be amended from &#039;&#039;&#039;Sshguard&#039;&#039;&#039; to the  &#039;&#039;&#039;SSHGuard&#039;&#039;&#039; upstream style, using the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{DISPLAYTITLE:SSHGuard}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it does not work.  Further to summary research, the wiki media would require that {{ic|&amp;lt;nowiki&amp;gt;$wgAllowDisplayTitle = true;&amp;lt;/nowiki&amp;gt;}} be set, as is reportedly the usual default, in {{ic|LocalSettings.php}} .  This is beyond the scope of a wiki contributor.&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sshguard&amp;diff=31934</id>
		<title>Sshguard</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sshguard&amp;diff=31934"/>
		<updated>2026-01-07T21:13:50Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1.  /* nftables backend */ Added subheading and amended context accordingly;  2.  Amended page title from Sshguard to SSHGuard; 3. Style/grammar amendments, including clarification that ipfw and pf are not available on Alpine Linux.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:SSHGuard}}&lt;br /&gt;
&lt;br /&gt;
[https://www.sshguard.net/ SSHGuard] protects hosts from brute-force attacks against SSH and other services. It aggregates system logs and blocks repeat offenders using one of several firewall backends, including &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;nftables&#039;&#039;&#039;;  SSHGuard also supports firewalls used elsewhere, including ipfw and pf.&lt;br /&gt;
&lt;br /&gt;
SSHGuard can read log messages from standard input (suitable for piping from &#039;&#039;syslog&#039;&#039;) or monitor one or more log files. Log messages are parsed, line-by-line, for recognized patterns. If an attack, such as several login failures within a few seconds, is detected, the offending IP is blocked. Offenders are unblocked after a set interval, but can be semi-permanently banned using the blacklist option.&lt;br /&gt;
&lt;br /&gt;
SSHGuard does not support custom log parsing. Check the website upstream to see which services they support.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
SSHGuard can use several backends;  you can see them listed with {{ic|$ ls /usr/libexec/sshg-fw*}}. The easiest backend on Alpine Linux is [[Nftables|nftables]], but a section is given below for [[Iptables]] also. After either firewall has been installed, install {{Pkg|sshguard}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas apk add sshguard}}&lt;br /&gt;
&lt;br /&gt;
You will need to create the following configuration file or else SSHGuard won&#039;t start.&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/sshguard.conf|#!/bin/sh&lt;br /&gt;
BACKEND{{=}}&#039;/usr/libexec/sshg-fw-nft-sets&#039;&lt;br /&gt;
FILES{{=}}&#039;/var/log/messages&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== nftables backend ==&lt;br /&gt;
&lt;br /&gt;
The nftables ruleset (tables and sets) required by SSHGuard are created dynamically with this SSHGuard daemon. You can view the rules that are active with:&lt;br /&gt;
&lt;br /&gt;
{{ic|$ doas nft list ruleset}}&lt;br /&gt;
&lt;br /&gt;
== iptables backend ==&lt;br /&gt;
&lt;br /&gt;
To use the &#039;&#039;&#039;iptables&#039;&#039;&#039; backend, you must first create a chain called &amp;quot;sshguard&amp;quot;. Enable the iptables-service to save the rules at shutdown and reload them when booting&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ doas iptables -N sshguard&lt;br /&gt;
$ doas iptables -A INPUT -j sshguard&lt;br /&gt;
$ doas rc-update add iptables boot}}&lt;br /&gt;
&lt;br /&gt;
You can view the rules with {{ic|$ doas iptables -L}}&lt;br /&gt;
&lt;br /&gt;
[[category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Hosting_Web/Email_services_on_Alpine&amp;diff=31933</id>
		<title>Hosting Web/Email services on Alpine</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Hosting_Web/Email_services_on_Alpine&amp;diff=31933"/>
		<updated>2026-01-07T20:26:30Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* See also */ Added SSHGuard (previously orphaned page).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Accuracy|Various passages are based on the obsolete [[Protecting your email server with Alpine]] page}}&lt;br /&gt;
{{Merge|Hosting services on Alpine}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This information was pulled from a few other pages on this Alpine Wiki website: see links, along with the websites for the particular packages. It is a suggestion list and step-by-step instruction guide.&lt;br /&gt;
&lt;br /&gt;
You might be wondering, why would anyone want to run Web and Email services off a Linux install that runs in ram? Good question. With &#039;&#039;&#039;Vservers&#039;&#039;&#039;, we can run the host in memory and do all sorts of things with the guests. Put the guests on DAS in the host machine or do raided iSCSI for the guest. This way, if your disks start going bad or drop off entirely, you most likely will be able to get at the data from a running system. &lt;br /&gt;
   &lt;br /&gt;
                     Guest OS here or&lt;br /&gt;
 [Host Alpine Box] --------------------- [DAS]&lt;br /&gt;
     |    |&lt;br /&gt;
     |    |Guest OS here&lt;br /&gt;
     |    |&lt;br /&gt;
   iSCSI  iSCSI &lt;br /&gt;
&lt;br /&gt;
== Web Services ==&lt;br /&gt;
There are many http servers out there. Alpine comes with a few different ones. For this guide, we installed [[Lighttpd|lighttpd]]. &lt;br /&gt;
&lt;br /&gt;
 apk update&lt;br /&gt;
 apk add lighttpd openssl php&lt;br /&gt;
&lt;br /&gt;
Most everything is already taken care of with lighttpd. Make sure to uncomment the SSL (Secure Sockets Layer) options:-&lt;br /&gt;
 ssl.engine = &amp;quot;enable&amp;quot;&lt;br /&gt;
 ssl.pemfile = &amp;quot;/etc/lighttpd/server.pem&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 rc-service lighttpd start&lt;br /&gt;
See below for generating the {{ic|server.pem}}.&lt;br /&gt;
&lt;br /&gt;
Now, you can start using &#039;&#039;&#039;lighttpd&#039;&#039;&#039; and start making your own website. Alpine Linux comes with &#039;&#039;&#039;phpBB&#039;&#039;&#039; and [[MediaWiki]], if you want to use those. You may have to use an SQL database. The place to put your pages is: &lt;br /&gt;
 /var/www/localhost/htdocs/&lt;br /&gt;
By default, &#039;&#039;&#039;lighttpd&#039;&#039;&#039; uses symlinks and does so correctly. So, you can just symlink to directories when your pages may be also:&lt;br /&gt;
 ln -s /home/user/htdocs /var/www/localhost/htdocs/user&lt;br /&gt;
&lt;br /&gt;
===Generating the Server.pem===&lt;br /&gt;
For other services, we are also going to be using SSL. An easy way to just start using it is by generating your own self-sign cert. Script and configuration files are taken from the {{ic|setup-webconf}} script (now-deprecated).&lt;br /&gt;
&lt;br /&gt;
ssl.cnf&lt;br /&gt;
 [ req ]&lt;br /&gt;
 default_bits = 1024&lt;br /&gt;
 encrypt_key = yes&lt;br /&gt;
 distinguished_name = req_dn&lt;br /&gt;
 x509_extensions = cert_type&lt;br /&gt;
 prompt = no&lt;br /&gt;
 [ req_dn ]&lt;br /&gt;
 OU=HTTPS server&lt;br /&gt;
 CN=example.net&lt;br /&gt;
 emailAddress=postmaster@example.net&lt;br /&gt;
 [ cert_type ]&lt;br /&gt;
 nsCertType = server&lt;br /&gt;
&lt;br /&gt;
ssl.sh&lt;br /&gt;
 #/bin/sh&lt;br /&gt;
 openssl genrsa 512/1024 &amp;gt;server.pem&lt;br /&gt;
 openssl req -new -key server.pem -days 365 -out request.pem&lt;br /&gt;
 openssl genrsa 2048 &amp;gt; keyfile.pem&lt;br /&gt;
 openssl req -new -x509 -nodes -sha1 -days 3650 -key keyfile.pem \&lt;br /&gt;
 -config ssl.cnf &amp;gt; server.pem&lt;br /&gt;
 cat keyfile.pem &amp;gt;&amp;gt; server.pem&lt;br /&gt;
&lt;br /&gt;
If you use this to generate the SSL certs for other services, then you may just change the {{ic|req_dn}} information.&lt;br /&gt;
&lt;br /&gt;
==Mail Services==&lt;br /&gt;
&lt;br /&gt;
Some of the information presented here can be found in the [[Protecting your email server with Alpine]] page, now obsolete. This, however, is for an email gateway.&lt;br /&gt;
 apk add postfix dovecot clamav clamsmtp gross&lt;br /&gt;
&lt;br /&gt;
===Postfix===&lt;br /&gt;
Postfix has a few things that need to be added to its configuration so that it can send email through {{Pkg|clamav}}, and also so that it will accept mail for domains and users.&lt;br /&gt;
&lt;br /&gt;
====Main.cf====&lt;br /&gt;
vi /etc/postfix/main.cf&lt;br /&gt;
 #/etc/postfix/main.cf&lt;br /&gt;
 myhostname = mx.example.net&lt;br /&gt;
 mydomain = example.net&lt;br /&gt;
 relayhost = #blank will do dns lookups for destinations&lt;br /&gt;
 home_maildir = Maildir/&lt;br /&gt;
 smtpd_banner = $myhostname ESMTP #The way postfix answers. &lt;br /&gt;
 transport_maps = hash:/etc/postfix/transport #Place to add how you want to route domains. See example below. Show how to host more than one domain.&lt;br /&gt;
 local_transport = virtual&lt;br /&gt;
 virtual_mailbox_domains = example.net, bobo.net #list of hosted domains&lt;br /&gt;
 virtual_mailbox_base = /var/spool/vhosts&lt;br /&gt;
 virtual_uid_maps = static:1004 # uid of user to be used to read/write mail  &lt;br /&gt;
 virtual_gid_maps = static:1004 # gid of user to be used to read/write mail &lt;br /&gt;
 virtual_alias_maps = hash:/etc/postfix/valias #alias for each different hosted domain. See below.&lt;br /&gt;
 virtual_mailbox_maps = hash:/etc/postfix/vmap #where and what mailbox to drop the mail to. See below.&lt;br /&gt;
 smtpd_helo_required = yes&lt;br /&gt;
 disable_vrfy_command = yes&lt;br /&gt;
 content_filter = scan:[127.0.0.1]:10025 # clamscan to be configured later&lt;br /&gt;
 smtpd_recipient_restrictions = reject_unauth_pipelining, permit_sasl_authenticated,permit_mynetworks,reject_invalid_hostname, reject_non_fqdn_hostname,reject_non_fqdn_sender, reject_non_fqdn_recipient,reject_unknown_sender_domain, reject_unknown_recipient_domain,reject_unauth_destination, check_policy_service inet:127.0.0.1:5525,permit&lt;br /&gt;
 smtpd_data_restrictions = reject_unauth_pipelining, permit&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_tls_cert_file = /etc/ssl/postfix/server.pem&lt;br /&gt;
 smtpd_tls_key_file = $smtpd_tls_cert_file&lt;br /&gt;
&lt;br /&gt;
====Master.cf====&lt;br /&gt;
Settings in the {{Path|master.cf}} file for virus/spam scanning. Add these to the end of the file, similar to those found in [[Protecting your email server with Alpine]].&lt;br /&gt;
&lt;br /&gt;
 scan    unix    -       -       n       -       16      smtp&lt;br /&gt;
        -o smtp_send_xforward_command=yes&lt;br /&gt;
        -o smtp_enforce_tsl=no&lt;br /&gt;
 127.0.0.1:10026 inet    n       -       n       -       16      smtpd&lt;br /&gt;
        -o content_filter=&lt;br /&gt;
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks&lt;br /&gt;
        -o smtpd_helo_restrictions=&lt;br /&gt;
        -o smtpd_client_restrictions=&lt;br /&gt;
        -o smtpd_sender_restrictions=&lt;br /&gt;
        -o smtpd_recipient_restrictions=permit_mynetworks,reject&lt;br /&gt;
        -o mynetworks_style=host&lt;br /&gt;
        -o smtpd_authorized_xforward_host=127.0.0.1/8&lt;br /&gt;
&lt;br /&gt;
====Valias==== &lt;br /&gt;
 #etc/postfix/valias&lt;br /&gt;
 postmaster@example.net user1@example.net&lt;br /&gt;
 hostmaster@example.net user2@example.net&lt;br /&gt;
 hostmaster@bobo.net    user1@example.net&lt;br /&gt;
 postmaster@bobo.net    user2@bobo.net&lt;br /&gt;
&lt;br /&gt;
====Vmap====&lt;br /&gt;
 #/etc/postfix/vmap&lt;br /&gt;
 user1@example.net      example.net/user1&lt;br /&gt;
 user2@example.net      example.net/user2&lt;br /&gt;
 @example.net           example.net/catchall #everyone else doesn&#039;t match rule above&lt;br /&gt;
&lt;br /&gt;
====Transport====&lt;br /&gt;
 #/etc/postfix/transport&lt;br /&gt;
 example.net      virtual:&lt;br /&gt;
 bobo.net         virtual:&lt;br /&gt;
 foo.net          smtp:1.2.3.4 #send foo.net through this smtp server&lt;br /&gt;
 *                :   #everything else go through relayhost rule&lt;br /&gt;
&lt;br /&gt;
Once these files are created, you will need to make them into {{Path|.db}} files:&lt;br /&gt;
 postmap valias&lt;br /&gt;
 postmap transport&lt;br /&gt;
 postmap vmap&lt;br /&gt;
&lt;br /&gt;
===Dovecot===&lt;br /&gt;
&#039;&#039;&#039;Dovecot&#039;&#039;&#039; on Alpine Linux will only do &#039;&#039;&#039;imap&#039;&#039;&#039; and &#039;&#039;&#039;imaps&#039;&#039;&#039; services for now. &lt;br /&gt;
&lt;br /&gt;
Most of &#039;&#039;&#039;dovecot&#039;&#039;&#039; is configured already for &#039;&#039;&#039;imap&#039;&#039;&#039;. You may have to gen the key, as shown above. Just change the {{Path|cnf}} file a little to say something about {{ic|mail.domainname}}: &lt;br /&gt;
 &lt;br /&gt;
 ssl_cert_file = /etc/ssl/dovecot/server.pem&lt;br /&gt;
 ssl_key_file = /etc/ssl/dovecot/keyfile.pem&lt;br /&gt;
 mail_location = maildir:/var/spool/vhosts/&amp;amp;d/%n&lt;br /&gt;
 valid_chroot_dirs = /var/spool/vhosts&lt;br /&gt;
 passdb passwd-file {&lt;br /&gt;
 args = /etc/dovecot/passwd&lt;br /&gt;
 }&lt;br /&gt;
 userdb passwd-file {&lt;br /&gt;
 args = /etc/dovecot/users&lt;br /&gt;
 }&lt;br /&gt;
 #section for postfix sasl auth&lt;br /&gt;
 socket listen {&lt;br /&gt;
 client {&lt;br /&gt;
 path = /var/spool/postfix/private/auth&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix &lt;br /&gt;
 mode = 0660&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
To generate the passwords, you can use the {{ic|dovecotpw}} command:&lt;br /&gt;
 dovecotpw -s MD5-CRYPT &lt;br /&gt;
&lt;br /&gt;
The hash below can be used for the password &amp;lt;var&amp;gt;test123&amp;lt;/var&amp;gt;.  The {{Path|/etc/dovecot/passwd}} file should look like this:&lt;br /&gt;
 user1@example.net:$1$tz5sbjAD$Wq9.NkSyNo/oElzFgI68.0&lt;br /&gt;
 user2@example.net:$1$tz5sbjAD$Wq9.NkSyNo/oElzFgI68.0&lt;br /&gt;
&lt;br /&gt;
The {{Path|/etc/dovecot/userdb}} file should look like this:&lt;br /&gt;
 user1@example.net::1004:1004::/var/spool/vhosts/example.net/:/bin/false::&lt;br /&gt;
 user2@example.net::1004:1004::/var/spool/vhosts/example.net/:/bin/false::&lt;br /&gt;
 user@domain::uid : gid of found in virtual_uid_maps::location of maildir:shell::&lt;br /&gt;
&lt;br /&gt;
===Clamsmtpd===&lt;br /&gt;
Configure according to instructions [[Protecting your email server with Alpine]]&lt;br /&gt;
&lt;br /&gt;
===Gross===&lt;br /&gt;
Configure according to instructions [[Protecting your email server with Alpine]]&lt;br /&gt;
&lt;br /&gt;
===Final Steps ===&lt;br /&gt;
Start the services and make sure to rc-update them&lt;br /&gt;
 rc-service postfix start&lt;br /&gt;
 rc-update add postfix default&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Grommunio_Mail_Server|Grommunio Mail Server]] - Open-source groupware solution&lt;br /&gt;
* [[Aerc]] - Terminal email client (MUA)&lt;br /&gt;
* [[Sshguard|SSHGuard]] - Protects hosts against brute-force attacks:  monitoring logs, attack detection, blocking using firewall.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:Mail]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=31932</id>
		<title>Tutorials and Howtos</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=31932"/>
		<updated>2026-01-07T20:16:53Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* Security */ Added SSHGuard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:package_edutainment.svg|right|link=]]&lt;br /&gt;
{{TOC left}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to Tutorials and Howtos, a place of basic and advanced configuration tasks for your Alpine Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Howtos are smaller articles&#039;&#039;&#039; explaining how to perform a particular task with Alpine Linux, that expects a minimal knowledge from reader to perform actions. Howto&#039;s have been organized in the below page based on the topics.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The [[#Tutorials|tutorials]] are hands-on&#039;&#039;&#039; and the reader is expected to try and achieve the goals described in each step, possibly with the help of a good example. The output in one step is the starting point for the following step.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
* Contributors are requested to refer to [[Help:Editing]] first and make use of resources like [[How to write a HOWTO]].&lt;br /&gt;
* Contributions must be complete articles. &lt;br /&gt;
* Don&#039;t override already made contributions, unless there is a mistake. &lt;br /&gt;
* If you want to request a topic, please add your request in this page&#039;s [[Talk:Tutorials_and_Howtos|Discussion]].}}&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
* {{:Daily driver guide}}&lt;br /&gt;
&lt;br /&gt;
=== Networking ===&lt;br /&gt;
&lt;br /&gt;
* [[Bluetooth]] - Instructions for installing and configuring Bluetooth&lt;br /&gt;
* [[Bonding]] - Bond (or aggregate) multiple ethernet interfaces&lt;br /&gt;
* [[Bridge]] - Configuring a network bridge&lt;br /&gt;
** [[Bridge wlan0 to eth0]]&lt;br /&gt;
* [[Configure Networking]]&lt;br /&gt;
* [[How to configure static routes]]&lt;br /&gt;
* Modem&lt;br /&gt;
** [[Using HSDPA modem]]&lt;br /&gt;
** [[Using serial modem]]&lt;br /&gt;
* [[mDNS]] - Howto implement multicast DNS resolution in Alpine. &lt;br /&gt;
* [[Multi ISP]] &#039;&#039;(Dual-ISP setup with load-balancing and automatic failover)&#039;&#039;&lt;br /&gt;
* [[PXE boot]]&lt;br /&gt;
* Wi-Fi&lt;br /&gt;
** [[Wi-Fi|Connecting to a wireless access point]]&lt;br /&gt;
** [[How to setup a wireless access point]] &#039;&#039;(Setting up Secure Wireless AP w/ WPA encryption with bridge to wired network)&#039;&#039;&lt;br /&gt;
* Use [https://github.com/ifupdown-ng/ifupdown-ng/blob/main/doc/interfaces-vxlan.scd vxlan], if using  [[Ifupdown-ng]] instead of [[VLAN]]&lt;br /&gt;
* [[Setting up a Home Router]]&lt;br /&gt;
&lt;br /&gt;
=== Backup and data migration ===&lt;br /&gt;
&lt;br /&gt;
* [[Migrating data]]&lt;br /&gt;
* [[Rsnapshot]] - setting up periodic backups&lt;br /&gt;
&lt;br /&gt;
=== Other topics ===&lt;br /&gt;
&lt;br /&gt;
* [[Gaming on Alpine]]&lt;br /&gt;
* [[Remote Desktop Server]]&lt;br /&gt;
* [[Default applications|How to change default application]]&lt;br /&gt;
* [[CPU frequency scaling]]&lt;br /&gt;
* [[Mimalloc]]&lt;br /&gt;
* [[Enable Serial Console on Boot]]&lt;br /&gt;
* [[How to build the Alpine Linux kernel]]&lt;br /&gt;
* [[Nextcloud]] &#039;&#039;(Self hostable cloud suite - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Setting up lm_sensors]]&lt;br /&gt;
* [[Fingerprint Authentication with swaylock]]&lt;br /&gt;
* [[Desktop environments and Window managers|List of supported Desktop environments and Window managers]]&lt;br /&gt;
&lt;br /&gt;
== Diskless ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]]&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
&lt;br /&gt;
== Other Architectures ==&lt;br /&gt;
&lt;br /&gt;
=== ARM ===&lt;br /&gt;
&lt;br /&gt;
* [[Alpine on ARM]]&lt;br /&gt;
&lt;br /&gt;
==== Raspberry Pi ====&lt;br /&gt;
&lt;br /&gt;
* [[Raspberry Pi|Raspberry Pi main page]]&lt;br /&gt;
* [[Raspberry Pi Bluetooth Speaker|Raspberry Pi - Bluetooth Speaker]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi|Raspberry Pi - Router with VPN]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi (IPv6)|Raspberry Pi - Router with VPN (IPv6)]]&lt;br /&gt;
* [[Classic install or sys mode on Raspberry Pi|Raspberry Pi - Sys mode install]]&lt;br /&gt;
* [[Raspberry Pi LVM on LUKS|Raspberry Pi - Sys mode install - LVM on LUKS]]&lt;br /&gt;
* [[RPI Video Receiver|Raspberry Pi - Video Receiver]] &#039;&#039;(network video decoder using Rasperry Pi and omxplayer)&#039;&#039;&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]] - kiosk or digital sign&lt;br /&gt;
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]&lt;br /&gt;
* [[Raspberry Pi 3 - Setting Up Bluetooth]]&lt;br /&gt;
* [[Raspberry Pi 4 - Persistent system acting as a NAS and Time Machine]]&lt;br /&gt;
* [[How to set up Alpine as a wireless router|Raspberry Pi Zero W - Wireless router]] &#039;&#039;(Setting up a firewalled, Wireless AP with wired network on a Pi Zero W)&#039;&#039;&lt;br /&gt;
* [[RPI Video Receiver]]&lt;br /&gt;
&lt;br /&gt;
=== IBM Z (IBM z Systems) ===&lt;br /&gt;
&lt;br /&gt;
* [[s390x|s390x - Installation]]&lt;br /&gt;
&lt;br /&gt;
=== PowerPC ===&lt;br /&gt;
&lt;br /&gt;
* [[Ppc64le|Powerpc64le - Installation]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[#Desktop security|Desktop security]] lists steps for securing Alpine Linux desktops&lt;br /&gt;
* [[Setting up a laptop]] page has detailed guidelines to configure a secured laptop&lt;br /&gt;
* [[Securing Alpine Linux|Secure Alpine Linux]] using Security Technical Implementation Guides (STIGs)&lt;br /&gt;
* [[Sshguard|SSHGuard]] - Protects hosts against brute-force attacks:  monitoring logs, attack detection, blocking using firewall.&lt;br /&gt;
&lt;br /&gt;
== Services == &lt;br /&gt;
&lt;br /&gt;
{{Note| Services are arranged in alphabetical order.}}&lt;br /&gt;
&lt;br /&gt;
=== Content management systems ===&lt;br /&gt;
&lt;br /&gt;
* [[DokuWiki]] &#039;&#039;(Simple and easy to use wiki, no database required)&#039;&#039;&lt;br /&gt;
* [[Drupal]] &#039;&#039;(Content Management System (CMS) written in PHP)&#039;&#039;&lt;br /&gt;
* [[Kopano]] &#039;&#039;(Microsoft Outlook compatible Groupware)&#039;&#039;&lt;br /&gt;
* [[Mahara]] &#039;&#039;(E-portfolio and social networking system)&#039;&#039;&lt;br /&gt;
* [[MediaWiki]] &#039;&#039;(Free web-based wiki software application)&#039;&#039;&lt;br /&gt;
* [[Pastebin]] &#039;&#039;(Pastebin software application)&#039;&#039;&lt;br /&gt;
* [[WordPress]] &#039;&#039;(Web software to create website or blog)&#039;&#039;&lt;br /&gt;
* [[Moodle]] &#039;&#039;(Online Learning Management system)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Database === &lt;br /&gt;
&lt;br /&gt;
* [[MariaDB]] or [[MySQL|MySQL]]&lt;br /&gt;
&lt;br /&gt;
=== DNS ===&lt;br /&gt;
&lt;br /&gt;
* [[DNSCrypt-Proxy]] &#039;&#039;Encrypt and authenticate DNS calls from your system&#039;&#039;&lt;br /&gt;
* [[Setting up nsd DNS server]]&lt;br /&gt;
* [[Small-Time DNS with BIND9]] &#039;&#039;(A simple configuration with ad blocking for your home network)&#039;&#039;&lt;br /&gt;
* Unbound&lt;br /&gt;
** [[Setting up unbound DNS server]]&lt;br /&gt;
** [[Using Unbound as an Ad-blocker]] &#039;&#039;(Setup ad blocking for your network)&#039;&#039;&lt;br /&gt;
* [[TinyDNS Format]]&lt;br /&gt;
&lt;br /&gt;
=== File server ===&lt;br /&gt;
&lt;br /&gt;
* [[Setting up an NFS server|nfs-server]]&lt;br /&gt;
* [[Setting up a Samba server|samba-server]] &#039;&#039;(standard file sharing)&#039;&#039;&lt;br /&gt;
* [[Setting up a samba-ad-dc|samba-ad-dc]] &#039;&#039;(Active Directory compatible domain controller)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
&lt;br /&gt;
* [https://git.alpinelinux.org/awall/about/ Alpine Wall User&#039;s Guide]&lt;br /&gt;
** [[Zero-To-Awall]] -&#039;&#039;AWall for dummies&#039;&#039;&lt;br /&gt;
** [[How-To Alpine Wall]] - &#039;&#039;AWall for Shorewall users&#039;&#039;&lt;br /&gt;
** [[Alpine Wall]] - &#039;&#039;AWall - Firewall management framework - Design Document&#039;&#039;&lt;br /&gt;
* [[Iptables]]&lt;br /&gt;
* [[nftables]]&lt;br /&gt;
* [[Uncomplicated Firewall|Uncomplicated Firewall or UFW]]&lt;br /&gt;
&lt;br /&gt;
=== HTTP and web services ===&lt;br /&gt;
&lt;br /&gt;
* [[Althttpd]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
** [[Apache with php-fpm]]&lt;br /&gt;
** [[Setting Up Apache with PHP]]&lt;br /&gt;
** [[Apache authentication: NTLM Single Signon]]&lt;br /&gt;
* [[Darkhttpd]]&lt;br /&gt;
* [[Lighttpd]]&lt;br /&gt;
** [[Lighttpd Advanced security]]&lt;br /&gt;
** [[Setting Up Lighttpd With FastCGI]]&lt;br /&gt;
** [[Production Web server: Lighttpd|Production web server: Lighttpd‎‎]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
** [[Nginx as reverse proxy with acme (letsencrypt)]]&lt;br /&gt;
** [[Nginx with PHP]]&lt;br /&gt;
* Squid Proxy&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
** [[Setting up Explicit Squid Proxy]]&lt;br /&gt;
** [[Setting up Transparent Squid Proxy]] &#039;&#039;(Covers Squid proxy and URL Filtering system)&#039;&#039;&lt;br /&gt;
** [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
* [[Tomcat]]&lt;br /&gt;
** [[Production LAMP system: Lighttpd + PHP + MySQL‎‎|Production LAMP system: Lighttpd + PHP + MariaDB/MySQL‎‎]]&lt;br /&gt;
&lt;br /&gt;
=== IRC ===&lt;br /&gt;
&lt;br /&gt;
* [[NgIRCd]] &#039;&#039;(Server for Internet Relay Chat/IRC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Mail ===&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(Hosting mail, webservices and other services)&#039;&#039;&lt;br /&gt;
* [[Hosting Web/Email services on Alpine]]&lt;br /&gt;
* Exim/Dovecot&lt;br /&gt;
** [[Small-Time Email with Exim and Dovecot]] &#039;&#039;(A simple configuration for your home network.)&lt;br /&gt;
** [[Setting up dovecot with imap and tls]]&lt;br /&gt;
* [[relay email to gmail (msmtp, mailx, sendmail]]&lt;br /&gt;
* [[relay email (nullmailer)]]&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Setting up postfix with virtual domains]]&lt;br /&gt;
* Server protection&lt;br /&gt;
** [[Setting up clamsmtp]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring ===&lt;br /&gt;
&lt;br /&gt;
* [[Awstats]] &#039;&#039;(Free log file analyzer)&#039;&#039;&lt;br /&gt;
* [[Cacti: traffic analysis and monitoring network]] &#039;&#039;(Front-end for rrdtool networking monitor)&#039;&#039;&lt;br /&gt;
* [[Cvechecker]] &#039;&#039;(Compare installed packages for Common Vulnerabilities Exposure)&#039;&#039; &amp;lt;!-- Monitoring and Security --&amp;gt;&lt;br /&gt;
* [[Linfo]]&lt;br /&gt;
* [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[PhpSysInfo]] &#039;&#039;(A simple application that displays information about the host it&#039;s running on)&#039;&#039;&lt;br /&gt;
* [[Logcheck]] &#039;&#039;(log file monitoring tool)&#039;&#039;&lt;br /&gt;
* [[Matomo]] &#039;&#039;(A real time web analytics software program)&#039;&#039;&lt;br /&gt;
* [[Rasdaemon]] &#039;&#039;(Platform Reliability, Availability and Serviceability monitoring tool)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft, solution, Networking and Monitoring and Server --&amp;gt;&lt;br /&gt;
** [[Setting up NRPE daemon]] &#039;&#039;(Performs remote Nagios checks)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting Up Fprobe And Ntop|Ntop]] &#039;&#039;(NetFlow collection and analysis using a remote fprobe instance; for alpine 3.10-3.12 only)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
* [[Traffic monitoring]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
** [[Setting up monitoring using rrdtool (and rrdcollect)]]&lt;br /&gt;
** [[Setting up traffic monitoring using rrdtool (and snmp)]] &amp;lt;!-- Monitoring --&amp;gt;&lt;br /&gt;
* [[Zabbix|Zabbix - the professional complete manager]] &#039;&#039;(Monitor and track the status of network services and hardware)&#039;&#039;&lt;br /&gt;
* [[ZoneMinder video camera security and surveillance]]&lt;br /&gt;
&lt;br /&gt;
=== Remote Administration ===&lt;br /&gt;
&lt;br /&gt;
* ACF&lt;br /&gt;
** [[Changing passwords for ACF|ACF - changing passwords]]&lt;br /&gt;
** [[Generating SSL certs with ACF]] &amp;lt;!-- Generating SSL certs with ACF 1.9 --&amp;gt;&lt;br /&gt;
** [[setup-acf| ACF - setup]] &#039;&#039;(Configures ACF (webconfiguration/webmin) so you can manage your box through https)&#039;&#039;&lt;br /&gt;
* [[Setting up a SSH server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator |OpenSSH 2FA]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
* [[OpenVCP]] &#039;&#039;(VServer Control Panel)&#039;&#039;&lt;br /&gt;
* [[PhpMyAdmin]] &#039;&#039;(Web-based administration tool for MYSQL)&#039;&#039;&lt;br /&gt;
* [[PhpPgAdmin]] &#039;&#039;(Web-based administration tool for PostgreSQL)&#039;&#039;&lt;br /&gt;
* [[Webmin]] &#039;&#039;(A web-based interface for Linux system)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Telephony ===&lt;br /&gt;
&lt;br /&gt;
* [[FreePBX|FreePBX on Alpine Linux]]&lt;br /&gt;
* [[Setting up Zaptel/Asterisk on Alpine]]&lt;br /&gt;
* [[Kamailio]] &#039;&#039;(SIP Server, formerly OpenSER)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== VPN ===&lt;br /&gt;
* [[Freeradius Active Directory Integration]]&lt;br /&gt;
* [[GNUnet]]&lt;br /&gt;
* [[IGMPproxy]]&lt;br /&gt;
* [[Setting up a OpenVPN server|OpenVPN server]] &#039;&#039;(Allowing single users or devices to remotely connect to your network)&#039;&#039;&lt;br /&gt;
* [[OpenVSwitch]]&lt;br /&gt;
* [[Tor]]&lt;br /&gt;
* [[Using Alpine on Windows domain with IPSEC isolation]]&lt;br /&gt;
* [[Configure a Wireguard interface (wg)|Wireguard]]&lt;br /&gt;
* [[Vpnc]]&lt;br /&gt;
&lt;br /&gt;
=== Other Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[apcupsd]] &#039;&#039;(UPS Monitoring with apcupsd)&#039;&#039;&lt;br /&gt;
* [[Chrony and GPSD | Chrony, gpsd, and a garmin LVC 18 as a Stratum 1 NTP source ]]&lt;br /&gt;
* [[Glpi]] &#039;&#039;(Manage inventory of technical resources)&#039;&#039;&lt;br /&gt;
* [[How to setup a Alpine Linux mirror]]&lt;br /&gt;
* [[nut-ups|NUT UPS]] &#039;&#039;(UPS Monitoring with Network UPS Tools)&#039;&#039;&lt;br /&gt;
* [[Odoo]]&lt;br /&gt;
* [[Configure OpenLDAP | OpenLDAP]] &#039;&#039;(Installing and configuring the Alpine package for OpenLDAP)&#039;&#039;&lt;br /&gt;
* [[Setting up a LLDAP server|lldap-server]] &#039;&#039;(Directory Server)&#039;&#039;&lt;br /&gt;
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Software development ==&lt;br /&gt;
&lt;br /&gt;
* [[Cgit]]&lt;br /&gt;
* [[OsTicket]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Patchwork]] &#039;&#039;(Patch review management system)&#039;&#039;&lt;br /&gt;
* [[Redmine]] &#039;&#039;(Project management system) [Deprecated]&#039;&#039;&lt;br /&gt;
* [[Request Tracker]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Setting up trac wiki|Trac]] &#039;&#039;(Enhanced wiki and issue tracking system for software development projects)&#039;&#039;&lt;br /&gt;
* [[Ansible]] &#039;&#039;(Configuration management)&#039;&#039;&lt;br /&gt;
* [[Installing Oracle Java|Oracle Java (installation)]]&lt;br /&gt;
&lt;br /&gt;
== Storage ==&lt;br /&gt;
&lt;br /&gt;
* [[Setting up disks manually|Manual partitioning]]&lt;br /&gt;
* [[Disk Replication with DRBD|DRBD: Disk Replication]]&lt;br /&gt;
* [[Filesystems]]&lt;br /&gt;
** [[Burning ISOs]]&lt;br /&gt;
* [[Setting up iSCSI|iSCSI Setup]]&lt;br /&gt;
** [[iSCSI Raid and Clustered File Systems]]&lt;br /&gt;
** [[Linux iSCSI Target (TCM)|iSCSI Target (TCM)/LinuxIO (LIO)]]&lt;br /&gt;
** [[Linux iSCSI Target (tgt)|User space iSCSI Target (tgt)]]&lt;br /&gt;
* [[Setting up Logical Volumes with LVM|LVM Setup]]&lt;br /&gt;
** [[Setting up LVM on GPT-labeled disks|LVM on GPT-labeled disks]]&lt;br /&gt;
** [[Installing on GPT LVM|LVM on GPT-labeled disks (updated)]]&lt;br /&gt;
** [[LVM on LUKS]]&lt;br /&gt;
* RAID&lt;br /&gt;
** [[Raid Administration]]&lt;br /&gt;
** [[Setting up a software RAID array]]&lt;br /&gt;
* [[ZFS]]&lt;br /&gt;
** [[Root on ZFS with native encryption]]&lt;br /&gt;
** [[Setting up ZFS on LUKS]]&lt;br /&gt;
* [[CEPH|CEPH]]&lt;br /&gt;
&lt;br /&gt;
== Virtualization ==&lt;br /&gt;
&lt;br /&gt;
* [[Docker]]&lt;br /&gt;
* [[Installing Alpine in a virtual machine]]&lt;br /&gt;
** [[Install Alpine on VMware ESXi]]&lt;br /&gt;
* [[KVM]] &#039;&#039;(Setting up Alpine as a KVM hypervisor)&#039;&#039;&lt;br /&gt;
* [[LXC]] &#039;&#039;(Setting up a Linux container in Alpine Linux)&#039;&#039;&lt;br /&gt;
* [[QEMU]]&lt;br /&gt;
* Xen&lt;br /&gt;
** [[Xen Dom0]] &#039;&#039;(Setting up Alpine as a dom0 for Xen hypervisor)&#039;&#039;&lt;br /&gt;
** [[Xen Dom0 on USB or SD]]&lt;br /&gt;
** [[Create Alpine Linux PV DomU|Xen DomU (paravirtualized)]]&lt;br /&gt;
** [[Xen LiveCD]]&lt;br /&gt;
** [[Xen PCI Passthrough]]&lt;br /&gt;
** [[K8s]] Building a K8s Kubernetes Cluster on Alpine Linux&lt;br /&gt;
* [[Runc]]&lt;br /&gt;
&lt;br /&gt;
== [[Simple_Walkthrough]] ==&lt;br /&gt;
* [[About-virtualization-simple]]&lt;br /&gt;
* [[LXC_Alpinelinux_Simple]]&lt;br /&gt;
* [[Qemu-simple]]&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
* [[TTY_Autologin|TTY Autologin]]&lt;br /&gt;
* [[Kexec|Faster rebooting with kexec]]&lt;br /&gt;
* [[Dynamic Multipoint VPN (DMVPN)]] combined with [[Small Office Services]]&lt;br /&gt;
* [[DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]]&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039;&lt;br /&gt;
* [[Linux iSCSI Target (TCM)]]&lt;br /&gt;
* [[ISP Mail Server 3.x HowTo]] &#039;&#039;(Postfix+PostfixAdmin+DoveCot+Roundcube+ClamAV+Spamd - A full-service ISP mail server)&#039;&#039;&lt;br /&gt;
* [[Grommunio Mail Server]] &#039;&#039;(Mariadb+Postfix+Rspamd+Grommunio - Full-service mail server as MS exchange replacement)&#039;&#039;&lt;br /&gt;
* [[Replacing non-Alpine Linux with Alpine remotely]]&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
* [[Streaming Security Camera Video with VLC]]&lt;br /&gt;
* [[Install Alpine on a btrfs filesystem with refind as boot manager]]&lt;br /&gt;
* [[Compile software from source|How to Compile a software from source in Alpine Linux]]&lt;br /&gt;
* [https://ww2.coastal.edu/mmurphy2/oer/alpine/ Alpine Linux tutorials - Dr Murphy, Computing Science Associate Professor]&lt;br /&gt;
* [[Michael&#039;s base installation procedure|Michael&#039;s base installation procedure]]&lt;br /&gt;
* [[Michael&#039;s cwm  desktop (minimal)|Michael&#039;s cwm desktop (minimal)]]&lt;br /&gt;
* [[Michael&#039;s sway desktop (minimal)|Michael&#039;s Sway desktop (minimal)]]&lt;br /&gt;
* [[Sway_customization_guide|Sway customization guide]] &#039;&#039;(Tutorial re Sway config file basics)&#039;&#039;&lt;br /&gt;
* [[Using Distrobox For VR Gaming|Using Distrobox For VR Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Stream_a_DV-camera_using_vlc&amp;diff=31931</id>
		<title>Stream a DV-camera using vlc</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Stream_a_DV-camera_using_vlc&amp;diff=31931"/>
		<updated>2026-01-07T20:01:07Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Added /*See also */ Streaming Security Camera Video with VLC (previously orphaned page);  2. Style amendments:  header use&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
In this howto we are going to stream the video coming from a DV-camera connected through ie1394 (firewire).&amp;lt;BR&amp;gt;&lt;br /&gt;
vlc is used to stream the content.&amp;lt;BR&amp;gt;&lt;br /&gt;
We will be using h264 and AAC to transcode the stream &#039;&#039;(should be fairly easy to change to whatever suits your needs)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Setup Alpine ==&lt;br /&gt;
=== Initial Setup ===&lt;br /&gt;
Follow [[Installing_Alpine]] to setup Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
=== Install programs ===&lt;br /&gt;
{{Cmd| apk add vlc-daemon vlc-dev }}&lt;br /&gt;
{{note|If you intend to use a desktop environment with vlc you will need to install {{pkg|vlc-qt}} in order to get that working.&amp;lt;BR&amp;gt;{{pkg|vlc-dev}} or {{pkg|vlc}} package does not contain the graphical part of vlc &#039;&#039;(menus etc.)&#039;&#039;.}}&lt;br /&gt;
{{todo| I haven&#039;t figured out why vlc-dev is needed. Manually adding all vlc-dev dependencies does not work.&amp;lt;BR&amp;gt;&lt;br /&gt;
The &#039;require vlc-dev&#039; thing is reported at {{Issue|1051}} and might be solved soon &#039;&#039;(or &#039;vlc-dev&#039; really is needed as a dependency)&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
=== Using ACF to control vlc ===&lt;br /&gt;
{{tip|A easy way to control vlc-daemon would be through [[Alpine Configuration Framework Design|ACF]]. Consider following these simple steps.&amp;lt;BR&amp;gt;&lt;br /&gt;
But as it is &#039;&#039;optional&#039;&#039; you could just skip this [[Alpine Configuration Framework Design|ACF]] section.}}&lt;br /&gt;
Setup/install acf &#039;&#039;(unless it&#039;s not already done)&#039;&#039;.&lt;br /&gt;
{{cmd| setup-acf}}&lt;br /&gt;
Install acf-package for vlc&lt;br /&gt;
{{cmd| apk add acf-vlc-daemon}}&lt;br /&gt;
We won&#039;t describe in this tutorial how you would use [[Alpine Configuration Framework Design|ACF]] to control vlc-daemon &#039;&#039;(basically because it&#039;s so simple it does not need any describing)&#039;&#039;.&amp;lt;BR&amp;gt;&lt;br /&gt;
If you installed [[Alpine Configuration Framework Design|ACF]], just browse &amp;lt;nowiki&amp;gt;https://ip.of.your.box&amp;lt;/nowiki&amp;gt; and you would from this tutorial understand what to do.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure vlc ==&lt;br /&gt;
Configuration is done by modifying &#039;/etc/conf.d/vlc&#039;.&amp;lt;BR&amp;gt;&lt;br /&gt;
Here comes the actual configuration that makes vlc stream the DV-camera.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
###############&lt;br /&gt;
BITRATE=500&lt;br /&gt;
XRES=720&lt;br /&gt;
YRES=576&lt;br /&gt;
&lt;br /&gt;
###############&lt;br /&gt;
# Chose one of the following &#039;preset&#039; values depending on how fast your CPU is:&lt;br /&gt;
#   ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow,placebo&lt;br /&gt;
TVIDEO=&amp;quot;venc=x264{preset=ultrafast,vbv-maxrate=${BITRATE},vbv-bufsize=256,keyint=250,min-keyint=25},vcodec=h264,vb=${BITRATE},scale=1,width=${XRES},height=${YRES}&amp;quot;&lt;br /&gt;
TAUDIO=&amp;quot;acodec=mp4a,ab=96,channels=2,samplerate=44100&amp;quot;&lt;br /&gt;
TMISC=&amp;quot;deinterlace,audio-sync&amp;quot;&lt;br /&gt;
&lt;br /&gt;
###############&lt;br /&gt;
TRANSPORT=&amp;quot;std{access=http,mux=ts,dst=:8080}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
VLC_OPTS=&amp;quot;--daemon -I dummy dv:///dev/fw0 --rawdv-hurry-up --sout-keep --sout-transcode-audio-sync \&lt;br /&gt;
--file-logging --logfile /var/log/vlc/vlc.log \&lt;br /&gt;
--sout #transcode{$TVIDEO,$TAUDIO,$TMISC}:$TRANSPORT&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Start it up ==&lt;br /&gt;
== Prepare the hardware ==&lt;br /&gt;
Here comes the hardest part in this tutorial... Attach the DV-camera to your ie1394/firewire port.&amp;lt;BR&amp;gt;&lt;br /&gt;
Well... that wasn&#039;t too hard! :-)&lt;br /&gt;
&lt;br /&gt;
=== Manual start ===&lt;br /&gt;
Start vlc-daemon either from terminal:&lt;br /&gt;
{{cmd|rc-service vlc start}}&lt;br /&gt;
or using ACF and just klick [Start].&lt;br /&gt;
&lt;br /&gt;
=== Make it start at next reboot ===&lt;br /&gt;
You might want to make it automatically start at next reboot&lt;br /&gt;
{{cmd|rc-update add vlc-daemon default}}&lt;br /&gt;
&lt;br /&gt;
== Debug ==&lt;br /&gt;
In case something goes wrong, consider looking at the logfiles.&lt;br /&gt;
{{cmd|less -I /var/log/vlc/vlc.log}}&lt;br /&gt;
If you don&#039;t find any useful information you could add verbosity by adding &#039;-v&#039; or &#039;-vv&#039; to /etc/conf.d/vlc and restart vlc &#039;&#039;(you would need to restart vlc-daemon to see more information in the logs)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Streaming_Security_Camera_Video_with_VLC|Streaming Security Camera Video with VLC]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Streaming_Security_Camera_Video_with_VLC&amp;diff=31930</id>
		<title>Streaming Security Camera Video with VLC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Streaming_Security_Camera_Video_with_VLC&amp;diff=31930"/>
		<updated>2026-01-07T19:51:05Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Added See also;  2. Style amendments:  header use&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Goal ==&lt;br /&gt;
&lt;br /&gt;
Setup a streaming video solution that small locations can use easily for broadcasting small events, security video or other uses.  Because those locations may not have a static IP, route video traffic from your main static IP (on your openvpn server) over a tunnel to the remote location.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The remote location will require internet access.  They will be provided with the following equipment:&lt;br /&gt;
* Minibox style x86 computer&lt;br /&gt;
* Monitor/Keyboard/Mouse&lt;br /&gt;
* Axis P1344 camera w/ POE injector OR Axis Q-7401 capture box&lt;br /&gt;
* network (2 blue cables are straight through, red is crossover) + power cables&lt;br /&gt;
&lt;br /&gt;
== Setup instructions ==&lt;br /&gt;
&lt;br /&gt;
=== Axis camera ===&lt;br /&gt;
&lt;br /&gt;
* Power up camera.&lt;br /&gt;
* Connect to web interface of the camera.&lt;br /&gt;
* Set admin password (example root:test123).&lt;br /&gt;
* Setup -&amp;gt; Video Stream -&amp;gt; Audio -&amp;gt; Check Enable Audio checkbox.&lt;br /&gt;
* Setup -&amp;gt; Video Stream -&amp;gt; Image -&amp;gt; Resolution = 640x480.&lt;br /&gt;
&lt;br /&gt;
=== Axis capture box ===&lt;br /&gt;
&lt;br /&gt;
* Power up box.&lt;br /&gt;
* Connect to web interface of the camera.&lt;br /&gt;
* Set admin password (example root:test123).&lt;br /&gt;
* Setup -&amp;gt; Video Stream -&amp;gt; Audio -&amp;gt; Check Enable Audio checkbox.&lt;br /&gt;
* Setup -&amp;gt; Video Stream -&amp;gt; Image -&amp;gt; Resolution = 720x480.&lt;br /&gt;
* Enable anonymous video viewer.&lt;br /&gt;
&lt;br /&gt;
=== Minibox ===&lt;br /&gt;
&lt;br /&gt;
* Setup USB key w/ Alpine Linux 2.4.5.&lt;br /&gt;
* Enable apk cache.&lt;br /&gt;
* Install the following packages:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alpine-base xscreensaver xf86-input-evdev openssh vlc rsync vim openvpn gawk bash vlc-xorg alsa-utils alsaconf alsa-lib vlc-daemon gstreamer gstreamer-tools gst-plugins-ugly gst-plugins-good gst-plugins-base chrony xf86-video-vesa linux-firmware pciutils usbutils iptables dnsmasq beep shorewall dnscache slim udev nmap tcpdump xf86-video-openchrome abiword busybox evince firefox gnumeric lxdm ristretto sudo xf86-input-keyboard xf86-input-mouse xfce4 xorg-server iftop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/network/interfaces&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
	address 10.14.197.1&lt;br /&gt;
	netmask 255.255.255.224&lt;br /&gt;
&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/ssh/sshd_config - disable password auth&lt;br /&gt;
* /root/.ssh/authorized_keys - install all needed keys&lt;br /&gt;
* adduser jbilyk&lt;br /&gt;
* /etc/chrony/chrony.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chrony/chrony.conf &lt;br /&gt;
# default config&lt;br /&gt;
&lt;br /&gt;
server time.nrc.ca &lt;br /&gt;
initstepslew 10 time.nrc.ca&lt;br /&gt;
commandkey 10&lt;br /&gt;
keyfile /etc/chrony/chrony.keys&lt;br /&gt;
driftfile /etc/chrony/chrony.drift&lt;br /&gt;
&lt;br /&gt;
cmdallow 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
allow all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* rc-update add chronyd&lt;br /&gt;
* /etc/conf.d/dnscache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# DNSCACHE configuration variables:&lt;br /&gt;
&lt;br /&gt;
# IPSEND - ip address to use for requests use 0.0.0.0 for default route&lt;br /&gt;
IPSEND=0.0.0.0&lt;br /&gt;
&lt;br /&gt;
# CACHESIZE - Num bytes to use for the cache&lt;br /&gt;
CACHESIZE=1000000&lt;br /&gt;
&lt;br /&gt;
# IP - IP addr to listen on&lt;br /&gt;
IP=127.0.0.1&lt;br /&gt;
&lt;br /&gt;
#------------------------------------------------------------------------&lt;br /&gt;
# The following are flags.  Setting them to ANY value&lt;br /&gt;
# (even &amp;quot;false&amp;quot; or &amp;quot;off&amp;quot;) will turn the feature on.&lt;br /&gt;
#------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# HIDETTL - always return TTL as 0&lt;br /&gt;
#HIDETTL=&lt;br /&gt;
&lt;br /&gt;
# FORWARDONLY - servers/@ are parent caches, not root servers&lt;br /&gt;
#FORWARDONLY=&lt;br /&gt;
&lt;br /&gt;
# UPDATEHINTS - refresh zone hints&lt;br /&gt;
UPDATEHINTS=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* rc-update add dnscache&lt;br /&gt;
* /etc/dnsmasq.conf (replacing MAC and IP on dhcp-host line as required)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
domain-needed&lt;br /&gt;
bogus-priv&lt;br /&gt;
no-resolv&lt;br /&gt;
no-poll&lt;br /&gt;
server=10.14.197.1&lt;br /&gt;
interface=eth1&lt;br /&gt;
except-interface=lo&lt;br /&gt;
bind-interfaces&lt;br /&gt;
expand-hosts&lt;br /&gt;
domain=example.com&lt;br /&gt;
dhcp-authoritative&lt;br /&gt;
cache-size=0 # dnscache does caching&lt;br /&gt;
no-negcache&lt;br /&gt;
log-dhcp&lt;br /&gt;
dhcp-range=10.14.197.10,10.14.197.20,255.255.255.224,12h&lt;br /&gt;
dhcp-option=option:ntp-server,10.14.197.1&lt;br /&gt;
dhcp-option=6,10.14.197.1,10.14.0.1&lt;br /&gt;
dhcp-option=option:domain-search,example.com&lt;br /&gt;
dhcp-host=00:40:8c:c4:7e:99,10.14.197.5,24h # Axis Camera&lt;br /&gt;
dhcp-option=option:ntp-server,10.14.197.1&lt;br /&gt;
dhcp-option=2,-18000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* rc-update add dnsmasq&lt;br /&gt;
* /etc/openvpn/openvpn.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client&lt;br /&gt;
dev tun&lt;br /&gt;
proto udp&lt;br /&gt;
remote public.ip.addr.ess 1194&lt;br /&gt;
resolv-retry infinite&lt;br /&gt;
nobind&lt;br /&gt;
&lt;br /&gt;
persist-key&lt;br /&gt;
persist-tun&lt;br /&gt;
&lt;br /&gt;
ca ca.pem&lt;br /&gt;
cert cert.pem&lt;br /&gt;
key key.pem&lt;br /&gt;
&lt;br /&gt;
comp-lzo&lt;br /&gt;
verb 3&lt;br /&gt;
&lt;br /&gt;
script-security 2&lt;br /&gt;
up /etc/openvpn/up.sh&lt;br /&gt;
down /etc/openvpn/down.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Extract your openvpn cert parts into /etc/openvpn/&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl pkcs12 -in %CERTPFX% -cacerts -nokeys -out ca.pem&lt;br /&gt;
openssl pkcs12 -in %CERTPFX% -nocerts -nodes -out key.pem&lt;br /&gt;
openssl pkcs12 -in %CERTPFX% -nokeys -clcerts -out cert.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* rc-update add openvpn&lt;br /&gt;
* /etc/resolv.conf.tail&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/conf.d/vlc &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Sample vlc params suitable for running as a daemon&lt;br /&gt;
&lt;br /&gt;
## --daemon			detach from prompt&lt;br /&gt;
## --file-logging		enable file logging&lt;br /&gt;
## --logfile			logfile name/path&lt;br /&gt;
## -vvv				verbose logging&lt;br /&gt;
## -I dummy			disable X11 interface&lt;br /&gt;
## --sout PARAMS		encoding parameters&lt;br /&gt;
##				Do NOT quote &#039;PARAMS&#039; otherwise shell expansions will broke vlc&lt;br /&gt;
&lt;br /&gt;
VLC_OPTS=&amp;quot;-I dummy --daemon --file-logging --logfile /var/log/vlc/vlc.log --loop --rtsp-caching=200 rtsp://10.14.197.5:554/axis-media/media.amp?videocodec=h264 --sout #standard{access=http,mux=ts,dst=0.0.0.0:8080}&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* rc-update add vlc&lt;br /&gt;
* /etc/shorewall/params&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A_IF=tun0&lt;br /&gt;
B_IF=eth1&lt;br /&gt;
E_IF=eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/shorewall/interfaces&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A	$A_IF		detect		dhcp&lt;br /&gt;
B	$B_IF		detect		dhcp&lt;br /&gt;
E	$E_IF		detect		dhcp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/shorewall/policy&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A	all	REJECT		info&lt;br /&gt;
B	A	ACCEPT&lt;br /&gt;
B	E	ACCEPT&lt;br /&gt;
all	all	REJECT		info&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/shorewall/rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# FW management&lt;br /&gt;
ACCEPT		A		fw		tcp	22,80,443&lt;br /&gt;
&lt;br /&gt;
# Manage the camera from the HQ if need be&lt;br /&gt;
ACCEPT		A		B		tcp	80&lt;br /&gt;
&lt;br /&gt;
ACCEPT		fw		all		icmp	8&lt;br /&gt;
ACCEPT		fw		E		tcp	53,80&lt;br /&gt;
ACCEPT		fw		E		udp	53,1194&lt;br /&gt;
ACCEPT		fw		B&lt;br /&gt;
ACCEPT		B		fw		udp	53&lt;br /&gt;
ACCEPT		B		fw		tcp	53&lt;br /&gt;
ACCEPT		A		fw		tcp	8080&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/shorewall/zones&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fw	firewall&lt;br /&gt;
A	ipv4&lt;br /&gt;
B	ipv4&lt;br /&gt;
E	ipv4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/shorewall/shorewall.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
STARTUP_ENABLED=Yes&lt;br /&gt;
...&lt;br /&gt;
IP_FORWARDING=On&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* rc-update add shorewall&lt;br /&gt;
* rc-update add lxdm&lt;br /&gt;
* home/jbilyk/.config/autostart/firefox.desktop&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Encoding=UTF-8&lt;br /&gt;
Version=0.9.4&lt;br /&gt;
Type=Application&lt;br /&gt;
Name=firefox&lt;br /&gt;
Comment=&lt;br /&gt;
Exec=nice -n 5 firefox&lt;br /&gt;
OnlyShowIn=XFCE;&lt;br /&gt;
StartupNotify=false&lt;br /&gt;
Terminal=false&lt;br /&gt;
Hidden=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Set FF homepage to 10.14.197.5 (replacing with ip address of Axis)&lt;br /&gt;
* lbu commit&lt;br /&gt;
* Plug in internet connection to eth0.&lt;br /&gt;
* Plug in crossover cable to axis PoE injector and straight through to Axis.&lt;br /&gt;
* Plug in line-out from mixer to axis.&lt;br /&gt;
* Power up blackbox with monitor, keyboard, mouse connected.&lt;br /&gt;
* Once desktop appears, power on axis.&lt;br /&gt;
&lt;br /&gt;
== OpenVPN router ==&lt;br /&gt;
&lt;br /&gt;
* /etc/shorewall/rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DNAT		E		G_196:10.14.196.10	tcp	8080	-	public.ip.addr.ess&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* /etc/shorewall/masq&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tun0			0.0.0.0/0	10.14.196.1	tcp	8080&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== End User Instructions == &lt;br /&gt;
&lt;br /&gt;
Please verify that all of the following components shipped properly:&lt;br /&gt;
&lt;br /&gt;
* Router&lt;br /&gt;
* Monitor&lt;br /&gt;
* Camera&lt;br /&gt;
* Camera power injector&lt;br /&gt;
* 2 x 50&#039; blue network cables&lt;br /&gt;
* 1 x 14&#039; red network cable&lt;br /&gt;
* 2 x 6&#039; black power cables&lt;br /&gt;
* 1 x AC power brick&lt;br /&gt;
* 1 x monitor video cable&lt;br /&gt;
* 1 x keyboard&lt;br /&gt;
* 1 x mouse&lt;br /&gt;
&lt;br /&gt;
* Place router in desired location.  It should be placed on a flat, stable surface.&lt;br /&gt;
* Place monitor nearby to the router.&lt;br /&gt;
* Use one 6&#039; power cord, connect to the monitor and power the monitor on.&lt;br /&gt;
* Connect the monitor video cable from the monitor &amp;quot;RGB&amp;quot; port to the corresponding port on the router.&lt;br /&gt;
* Place camera power injector in desired location.&lt;br /&gt;
* Connect red network cable from the &amp;quot;Data In&amp;quot; jack on the power injector to the router port labelled &amp;quot;Camera&amp;quot;.&lt;br /&gt;
* Connect Internet connection to the router port labelled &amp;quot;Internet&amp;quot; using a blue network cable.&lt;br /&gt;
* Connect keyboard and mouse to USB ports on the rear of the router.&lt;br /&gt;
* Plug the AC power brick into the router and then an available power outlet.  The router will turn itself on automatically.&lt;br /&gt;
* Wait for a 3 toned beep from the router and the desktop environment to appear.  (Note: Mozilla Firefox will open with the error message &amp;quot;Well, this is embarassing&amp;quot;. This is normal.).&lt;br /&gt;
* Connect blue network cable from the camera to the &amp;quot;Data &amp;amp; Power Out&amp;quot; jack on the power injector.&lt;br /&gt;
* Once the light on the top of the camera turns green, click &amp;quot;Start New Session&amp;quot; in Firefox.  A video window should appear after a brief delay.&lt;br /&gt;
* Adjust the focus and zoom of the camera manually using the dials on the front of the camera.&lt;br /&gt;
* To test the stream on the remote location end, open VLC on a computer with Internet connectivity, then run File -&amp;gt; Open Network Stream and connect to &amp;lt;nowiki&amp;gt;http://public.ip.addr.ess:8080&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Stream_a_DV-camera_using_vlc|Stream a DV-camera using vlc]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_on_ARM&amp;diff=31929</id>
		<title>Alpine on ARM</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_on_ARM&amp;diff=31929"/>
		<updated>2026-01-07T18:49:40Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* See also */ Added DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
Alpine Linux supports [https://en.wikipedia.org/wiki/ARM_architecture_family ARM architecture], a family of reduced instruction set computing (RISC) architectures for computer processors. ARM is the most widely used processor architecture in the world, powering most smartphones and millions of the simplest IoT devices to sophisticated machine learning applications.&lt;br /&gt;
&lt;br /&gt;
== Supported SoCs ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux is compiled with support files for so many formidable SoCs — besides the [[Raspberry Pi]] — that to find out about a particular chipset&#039;s support it can be useful to refine the search for all &amp;lt;code&amp;gt;*.dtb&amp;lt;/code&amp;gt; files in the package database (i.e. filter for &amp;quot;&amp;lt;code&amp;gt;*&amp;lt;some-board-or-SoC-identifying-string&amp;gt;*.dtb&amp;lt;/code&amp;gt;&amp;quot; file).&lt;br /&gt;
&lt;br /&gt;
For example, by refining the following search in the current &amp;quot;edge&amp;quot; release:&lt;br /&gt;
&lt;br /&gt;
DTB-files in the current edge branch:&lt;br /&gt;
https://pkgs.alpinelinux.org/contents?repo=main&amp;amp;file=*.dtb&amp;amp;branch=edge&lt;br /&gt;
&lt;br /&gt;
Fully supported boards are those for which there is a working bootloader shipped in the download.&lt;br /&gt;
&lt;br /&gt;
== Preparing installation media ==&lt;br /&gt;
&lt;br /&gt;
There are no  ISO installation images for ARM, since different boards require slightly different builds of u-boot. Hence, preparation steps are a bit more involved than x86_64.&lt;br /&gt;
&lt;br /&gt;
The latest images are available [https://alpinelinux.org/downloads/ on the Alpine Linux downloads page].&lt;br /&gt;
&lt;br /&gt;
For [[Raspberry Pi]] boards, use images specific for your board. In case the download page provides no specific image for your particular board, download the &amp;quot;Generic ARM&amp;quot; image. armv7 is the most compatible and aarch64 is the best choice for modern ARM SoCs.&lt;br /&gt;
&lt;br /&gt;
=== Formating the sd card ===&lt;br /&gt;
&lt;br /&gt;
To install Alpine, an SD card is required, and it will be completely wiped while preparing it for use as installation media.&lt;br /&gt;
&lt;br /&gt;
Insert the SD card onto the host where you&#039;ve downloaded the Alpine tarball and find out its devices name with &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;fdisk -l&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Create a partition in the SD card. The usual choice is to use &amp;lt;code&amp;gt;doas fdisk /dev/sdX&amp;lt;/code&amp;gt;. Care must be taken when creating the partition; it should never overlap with the u-boot (which will be set up in the following step). It is recommended to use &amp;lt;code&amp;gt;start: 32768&amp;lt;/code&amp;gt; as a safe choice when creating the partition. Make sure that the partition is also marked as bootable.&lt;br /&gt;
&lt;br /&gt;
It is also recommended to use FAT32, since ext4 is sometimes problematic with GRUB2, so set the partition type to &amp;lt;code&amp;gt;W95 FAT32 (LBA)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once the partition has been created, it needs to be formatted. Use, for example: &amp;lt;code&amp;gt;mkfs.vfat /dev/sdX1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Copying installation files onto the sd card ===&lt;br /&gt;
&lt;br /&gt;
Now extract the downloaded tarball into the SD card:&lt;br /&gt;
&lt;br /&gt;
 doas mount /dev/sdX1 /mnt&lt;br /&gt;
 cd /mnt&lt;br /&gt;
 doas tar -xf $HOME/downloads/alpine-uboot-3.18.2-aarch64.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Installing u-boot onto the SD card ===&lt;br /&gt;
&lt;br /&gt;
Finally, u-boot needs to be installed into the SD card. The exact steps vary per board. The following example installs u-boot for a pinebook-pro:&lt;br /&gt;
&lt;br /&gt;
 # Copy the U-Boot TPL/SPL&lt;br /&gt;
 doas dd if=u-boot/pinebook-pro-rk3399/idbloader.img of=/dev/sdb bs=512 seek=64 conv=notrunc&lt;br /&gt;
 # Copy u-boot.itb itself&lt;br /&gt;
 doas dd if=u-boot/pinebook-pro-rk3399/u-boot.itb of=/dev/sdb bs=512 seek=16384 conv=notrunc&lt;br /&gt;
&lt;br /&gt;
For rk3399-based boards, these steps should be quite similar. Other boards are an exercise left to the reader.&lt;br /&gt;
&lt;br /&gt;
=== Installing Alpine ===&lt;br /&gt;
&lt;br /&gt;
Insert the SD card into the ARM board, and turn it on. At this point, you should continue the general installation process as described in the [[Installation#Installation Step Details]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Installing packages with `apk` fails with a certificate warning if the system time is too far off, i.e. by default on boards without an internal real time clock (RTC). So make sure to first adjust the clock properly.}}&lt;br /&gt;
&lt;br /&gt;
== Board-specific notes for supported boards==&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi ===&lt;br /&gt;
{{Main|Raspberry Pi}}&lt;br /&gt;
&lt;br /&gt;
List of all Raspberry related [[:Category:Raspberry|Articles]].&lt;br /&gt;
&lt;br /&gt;
=== Wandboard ===&lt;br /&gt;
&lt;br /&gt;
Follow the steps above on [[Alpine_on_ARM#Preparing installation media|Preparing installation media]].  To install u-boot into the SD card, use:&lt;br /&gt;
&lt;br /&gt;
 dd if=u-boot/wandboard/SPL of=/dev/sdX seek=1 bs=1k&lt;br /&gt;
 dd if=u-boot/wandboard/u-boot.img of=/dev/sdX seek=69 bs=1k&lt;br /&gt;
&lt;br /&gt;
Finally, put the SD card in the Wandboard and boot it with a serial console connected. The board should now boot from the SD card.&lt;br /&gt;
&lt;br /&gt;
=== Pine64 A64 LTS ===&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Generic ARM aarch64&amp;quot; image. Install u-boot using:&lt;br /&gt;
&lt;br /&gt;
 dd if=u-boot-sunxi-with-spl.bin of=/dev/SDX bs=1024 seek=8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decompress (&amp;lt;code&amp;gt;gunzip&amp;lt;/code&amp;gt;) the kernel image (&amp;lt;code&amp;gt;boot/vmlinuz-lts&amp;lt;/code&amp;gt;) as the device&#039;s u-boot can&#039;t boot from a compressed kernel&lt;br /&gt;
&lt;br /&gt;
=== Libre Computer &amp;quot;Le Potato&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
For this system to boot at all, it must have an SD card with the bootloader in sector 1.  This can&#039;t coexist with a GPT partition table.  You will have to prepare the SD card manually from another machine:&lt;br /&gt;
&lt;br /&gt;
* Use e.g. &amp;lt;code&amp;gt;fdisk&amp;lt;/code&amp;gt; to create an MBR (DOS) disklabel.  Leave at least 1 MB before the start of the first partition.  Create one partition of type EFI and at least one of type Linux.  For example:&lt;br /&gt;
&lt;br /&gt;
 Device     Boot   Start       End   Sectors  Size Id Type&lt;br /&gt;
 /dev/sdc1  *       2048   1050623   1048576  512M ef EFI (FAT-12/16/32)&lt;br /&gt;
 /dev/sdc2       1050624   9005055   7954432  3.8G 82 Linux swap / Solaris&lt;br /&gt;
 /dev/sdc3       9005056 122136575 113131520 53.9G 83 Linux&lt;br /&gt;
&lt;br /&gt;
* Find bootloader binaries here: [https://boot.libre.computer/ci/ Libre Computer]&lt;br /&gt;
* Copy to SD card: &amp;lt;code&amp;gt;sudo dd if=aml-s905x-cc of=/dev/sdTARGET bs=512 seek=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* With this SD card in the Potato, it should now be possible to boot a (separate) USB stick containing any of the aarch64 ISO images.  The rest of the steps should be done from the Potato:&lt;br /&gt;
* Format the partitions (device names will have changed):&lt;br /&gt;
&lt;br /&gt;
 mkfs.ext4 /dev/mmcblk1p3&lt;br /&gt;
 mkfs.vfat /dev/mmcblk1p1&lt;br /&gt;
&lt;br /&gt;
* Mount the partitions:&lt;br /&gt;
&lt;br /&gt;
 mount /dev/mmcblk1p3 /mnt&lt;br /&gt;
 mount /dev/mmcblk1p1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
* Use &amp;lt;code&amp;gt;setup-disk /mnt&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;, to avoid rewriting the disklabel and damaging the bootloader.&lt;br /&gt;
&lt;br /&gt;
=== More specific guides ===&lt;br /&gt;
&lt;br /&gt;
* [[DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [[Odroid-C2]]&lt;br /&gt;
* [https://github.com/rickyrockrat/nanopi-alpine NanoPi Neo build script]&lt;br /&gt;
* [[A20 OLinuXino Lime2]]&lt;br /&gt;
&lt;br /&gt;
== Installing Alpine on boards without full support ==&lt;br /&gt;
&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
If you have, for example, an armv6/armv7 board that is not fully supported, but whose SoC is already supported by the mainline kernel and uboot, then it&#039;s still possible to install Alpine. It may involve a couple more manual steps.&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
&lt;br /&gt;
* Alpine&#039;s forked uboot to support tarballs (fabled?)&lt;br /&gt;
* serial console&lt;br /&gt;
* crosscompiler/toolchain if you can not compile natively&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The embedded world===&lt;br /&gt;
&lt;br /&gt;
A lot of the SoCs have their own way of doing things, although they use uboot and Linux kernel but often they are heavily modified to suit easy flashing of &amp;quot;ROMs&amp;quot; or other unknown reasons, e.g. Rockchip&#039;s notion &amp;quot;partition&amp;quot; are neither DOS nor GPT partitions.&lt;br /&gt;
Here, we will try to install Alpine in a more standard way, like on the x86 platform, with either DOS or GPT partitions. To boot this, you will most likely have to install/flash the mainline uboot, which can be non-destructive if you can load it from external storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Storage===&lt;br /&gt;
&lt;br /&gt;
One can load uboot from the following block devices if it&#039;s supported.&lt;br /&gt;
&lt;br /&gt;
* NAND&lt;br /&gt;
* eMMC&lt;br /&gt;
* SD card&lt;br /&gt;
* USB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Power on===&lt;br /&gt;
&lt;br /&gt;
Some SoCs need both SPL and uboot, you need to check uboot for your board. Most (if not all) boards boots from the internal storage first (either NAND or eMMC) you will have to check documentation of your board if you wish to boot the SPL/uboot from SD/USB.&lt;br /&gt;
&lt;br /&gt;
One can view SPL+uboot as BIOS and boot-loader on PC. Think that you could put the BIOS on an external storage :D&lt;br /&gt;
&lt;br /&gt;
Once you have loaded the &amp;quot;standard&amp;quot; uboot, things are more or less like on x86.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Booting Linux kernel===&lt;br /&gt;
&lt;br /&gt;
* uboot uses extlinux.conf file to locate the kernel/initramfs/... just like syslinx, you need to put that file on the partitions which is marked bootable in the /boot directory&lt;br /&gt;
* there should be an extra line &amp;quot;FDTDIR&amp;quot; which points to the DTBs&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
label Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl) 22 (Rawhide)&lt;br /&gt;
	kernel /boot/vmlinuz-3.17.0-0.rc4.git2.1.fc22.armv7hl&lt;br /&gt;
	append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8 LANG=en_US.UTF-8 drm.debug=0xf&lt;br /&gt;
	fdtdir /boot/dtb-3.17.0-0.rc4.git2.1.fc22.armv7hl&lt;br /&gt;
	initrd /boot/initramfs-3.17.0-0.rc4.git2.1.fc22.armv7hl.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using QEMU ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-arm -M vexpress-a9 -kernel zImage -initrd initramfs-grsec -dtb vexpress-v2p-ca9.dtb -hda hda.img -serial stdio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[DIY_Fully_working_Alpine_Linux_for_Allwinner_and_Other_ARM_SOCs|DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [http://www.armadeus.org/wiki/index.php?title=Kernel-with-device-tree dtb (Device Tree Binary)]&lt;br /&gt;
* [https://forum.odroid.com/viewtopic.php?t=30459 Odroid-C2] 2018 &#039;&#039;([https://archlinuxarm.org/platforms/armv8/amlogic/odroid-c2 ARMv8, AArch64];  [https://forum.odroid.com/viewtopic.php?f=138&amp;amp;t=32608 Alpine Linux custom build])&#039;&#039;&lt;br /&gt;
* [https://github.com/tolstoyevsky/pieman Pieman]&lt;br /&gt;
* [https://kernelci.org/soc/ &amp;lt;s&amp;gt;Available&amp;lt;/s&amp;gt; SoCs]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/About_postmarketOS About postmarketOS]&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[category:ARM]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=DIY_Fully_working_Alpine_Linux_for_Allwinner_and_Other_ARM_SOCs&amp;diff=31928</id>
		<title>DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=DIY_Fully_working_Alpine_Linux_for_Allwinner_and_Other_ARM_SOCs&amp;diff=31928"/>
		<updated>2026-01-07T18:44:43Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Reordered &amp;#039;Style&amp;#039;, &amp;#039;Move&amp;#039; and &amp;#039;Obsolete&amp;#039; boxes in order of priority;  2. Added comment to &amp;#039;Move&amp;#039; box that recommends renaming page:  &amp;#039;Edit: Another contributor proposes merging page with Alpine on ARM instead.&amp;#039;;  3. /* See also */ Added heading to this preexisting section;  4.  Added two /*See also */ entries;  5. Style amendment.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Obsolete|The article needs to be updated to cover supported versions of Alpine. Looks like it was written for something older than 3.10.9}}&lt;br /&gt;
{{Move|ARM SoCs|Edit: Another contributor proposes merging page with [[Alpine_on_ARM|Alpine on ARM]] instead.}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
THIS WORKS - TESTED&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please dont hesitate to contact me at atlury@gmail.com or on oneinsect@gmail.com.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;MAINLINE KERNEL with MAINLINE U-Boot&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Prologue ==&lt;br /&gt;
&lt;br /&gt;
* Please note that most of the below is specific to NanoPi M1 but can be extended to any ARM Soc with understanding&lt;br /&gt;
* NanoPi M1 and Orange Pi PC are very similar except the Orqange Pi PC has 512MB more RAM. They have similar specifications (USB, Ethernet, I/O etc.)&lt;br /&gt;
&lt;br /&gt;
Sometimes these SOCs are always being fed with a constant 1.3V, e.g. the NanoPi M1 or an Orange PI One. However, an Orange Pi PC has a programable voltage generator than can reduce the voltage.&lt;br /&gt;
&lt;br /&gt;
A primitive voltage regulator feeds the H3 all the time with 1.3V on some boards. In this mode, throttling is rather inefficient since temperatures does not decrease much when only the clock speed is reduced. Therefore, expect severe performance problems unless you use a large heatsink and fan.&lt;br /&gt;
&lt;br /&gt;
Sometimes you have to modify your dts file if your board has a fixed voltage regulator to limit the temperature and prevent the board from completly burning out when you are not using a heat-sink. However, I would suggest you use some kind of passive/active cooling for H3 boards.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the NanoPi M1 still doesnt have its own .dtb file, hence we use a similar board&#039;s .dtb file (Orange Pi PC).&lt;br /&gt;
&lt;br /&gt;
You are free to try legacy kernels. The process may vary a bit, please see linux-sunxi.org for more information and links. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Your SOC may not be supported by a mainline kernel. However, you can still use alpine linux.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lots of people are writing .dtb files. For example, below is a mainline kernel dts configuration for passive cooling of H3 based boards with a fixed voltage regulator&lt;br /&gt;
&lt;br /&gt;
https://github.com/megous/linux/wiki/Fixed-voltage-regulator-test&lt;br /&gt;
&lt;br /&gt;
Written for the Orange Pi One. Treats it as if it had a fixed voltage regulator and limits the temperature to ~75°C during stress test. You are free to play around. The internet is huge. Hang out in the IRC channels.&lt;br /&gt;
&lt;br /&gt;
There is a workaround for issues where at times the display doesn&#039;t show up if you use say, a DVI to HDMI converter, etc. Suggest you use VGA to HDMI or play around with the settings of boot.scr and other files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;We expect as the Alpine linux kernel versions progress further, you will be able to use Alpine linux directly without recompiling your own kernel, initramfs files etc&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comprehensive Introduction ==&lt;br /&gt;
Why do we need alpine linux when there are so many xyz distros available? Well it is one the most lightweight platforms with hot swap support for SD-cards and USB devices. There are options for allocation of SD-card free space for application storage.&lt;br /&gt;
&lt;br /&gt;
There are possibilities to completely upgrade a device running remotely with minimum downtime. Console logins are possible with USB null modems for field servicing. Most importantly you can be rest assured that it can survive against power cuts, restarts. For devices without onboard mmc, especially working on sd-card its way more important.&lt;br /&gt;
&lt;br /&gt;
The philosophy of commit only when required, keeps the entire OS read-only and in-memory without touching the storage at all. Thus devices can survive for longer times without crash.&lt;br /&gt;
&lt;br /&gt;
Arm devices unlike x86 dont come with bios in general. BIOS in x86 PCs is generally, a firmware configuring and connecting the hardware to the operating system and it offers support for a variety of OS and supports new OS versions. &lt;br /&gt;
&lt;br /&gt;
ARM use a different approach involving a boot loader for hardware configuration and operating system start-up. The boot loader is developed specifically for the application, adapted to one well-defined hardware SOC configuration, one operating system and only one version of it, which means you cannot probably use it for other SOCs without significant changes.&lt;br /&gt;
&lt;br /&gt;
We here generally talk about Allwinner especially H3 SOCs but you could probably apply this philosophy to other SOCs. The nanopi m1, Orange pi pc and Orange pi lite are only around $10 making them great home servers, firewalls for lowest possible cost.&lt;br /&gt;
&lt;br /&gt;
A linux os cannot be started just like that on an ARM Device, without a small amount of machine specific code to initialize that system. &lt;br /&gt;
&lt;br /&gt;
There are typically 4 stages involved in the ARM Device boot-up process&lt;br /&gt;
&lt;br /&gt;
* (stage 1) ROM - Reads from initialized persistent storage (selected by boot mode), loads SPL into internal Ram&lt;br /&gt;
* (stage 2) SPL Loader - SPL once loaded does additional setup and loads from persistent storage bootloader (u-boot) into DDR RAM&lt;br /&gt;
* (stage 3) U-boot - U-boot once loaded continues the processor setup and reads the Linux Kernel into DDR RAM&lt;br /&gt;
* (stage 4) Kernel - Once Kernel is loaded, it boots Linux and initializes the user run time environment&lt;br /&gt;
&lt;br /&gt;
The first stage of the boot process is the Secondary Program Loader (SPL). This preliminary piece of code is responsible for board initialization, loading the u-boot binary (“secondary program”) and handling the control flow over to the u-boot main program. It is device specific, and is often provided as a closed source binary blob by the SoC vendor.&lt;br /&gt;
&lt;br /&gt;
The secondary program loader (SPL) and the u-boot binary reside in a special on-board flash memory region or on the first sectors of the uSD/eMMC card. Arm devices use microSD or eMMC modules for storing the SPL and u-boot binary&lt;br /&gt;
&lt;br /&gt;
At the second stage of the boot process, the u-boot main program is executed. U-boot first looks for a custom environment stored at a reserved space on the microSD or eMMC module, or falls back to the compile time default environment if needed. At this time, you can interrupt the automatic boot process by pressing a key on your serial console, which starts an interactive u-boot shell. The u-boot variable called &#039;&#039;&#039;bootdelay&#039;&#039;&#039; specifies the number of seconds to wait for a keypress before continuing automatic boot.&lt;br /&gt;
&lt;br /&gt;
The automatic boot process executes a special u-boot macro, called bootcmd, which loads and executes the following procedures:&lt;br /&gt;
&lt;br /&gt;
 1. (opt.) a custom u-boot environment: uEnv.txt&lt;br /&gt;
 2. (opt.) a precompiled u-boot macro: boot.scr&lt;br /&gt;
 3. the kernel image, e.g. vmlinuz&lt;br /&gt;
 4. (opt.) the device tree binary, e. g. .dtb&lt;br /&gt;
 5. (opt.) the initial ramdisk, e. g. initramfs&lt;br /&gt;
&lt;br /&gt;
The third stage is the loading of the Linux kernel. However, before the Linux kernel takes control, u-boot passes a command line to the kernel containing essential parameters.&lt;br /&gt;
&lt;br /&gt;
For example in u-boot you could set bootargs for it pass to the kernel some parameters&lt;br /&gt;
&lt;br /&gt;
* setenv bootargs /boot/vmlinuz-4.6.0-rc1-sunxi earlyprintk modules=loop,squashfs,sd-mod,usb-storage modloop=/boot/modloop-sunxi console=${console} rootwait panic=10&lt;br /&gt;
&lt;br /&gt;
Parameters can be viewed after the operating system has booted by typing the following into a Terminal window (just an example):&lt;br /&gt;
&lt;br /&gt;
* cat /proc/cmdline root=/dev/mmcblk0p2 rootwait rw console=ttyS0,115200n8 console=tty0 no_console_suspend vdaccfg=0xa00 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=1080p m_bpp=32 vout=hdmi disablehpd=true&lt;br /&gt;
&lt;br /&gt;
The kernel initializes the hardware, mount the root file-system (according to the root=.. kernel parameter) and passes the control flow to /sbin/init.&lt;br /&gt;
&lt;br /&gt;
The Linux kernel consists of the following components:&lt;br /&gt;
&lt;br /&gt;
* Kernel image 32 bit platform: &amp;lt;boot-partition&amp;gt;/zImage or &amp;lt;boot-partition&amp;gt;/uImage, depending on your u-boot&#039;s capabilities and configuration&lt;br /&gt;
* Kernel image 64 bit platform: &amp;lt;boot-partition&amp;gt;/Image&lt;br /&gt;
* Device tree binary, a low level device description, specific to your device (&amp;lt;boot-partition&amp;gt;/&amp;lt;board&amp;gt;.dtb)&lt;br /&gt;
* Kernel modules (/lib/modules/&amp;lt;kernel-version&amp;gt;/*)&lt;br /&gt;
* Device firmware (/lib/firmware/*)&lt;br /&gt;
* Kernel C header files (/usr/include/linux)&lt;br /&gt;
&lt;br /&gt;
These components are build out of the kernel sources with the help of the make utility. Usually the kernel image and the device tree binary are loaded from a small vfat boot partition (mounted as /boot or /media/boot), whereas the rest resides in the root file system. &lt;br /&gt;
&lt;br /&gt;
However for our case here, we will have one raw u-boot sector followed by a large fat partition &lt;br /&gt;
&lt;br /&gt;
Each stage adds functionality. It is important to note that SPL, U-Boot and the Linux Kernel are all statically linked to start running at specific locations from a memory map defined by the CPU. That memory map is nothing but a layout that defines where both internal memory and DDR are mapped to. &lt;br /&gt;
&lt;br /&gt;
In here we are concerned with SD-Cards, and depending on how the SD card is connected, the location to where to write the data to can be different. &lt;br /&gt;
&lt;br /&gt;
OKAY WAIT!!! WRITING DATA??? &lt;br /&gt;
&lt;br /&gt;
Dont be confused, yes you will need to compile from source the SPL Loader and write it to SD-Card in a particular way and then compile u-boot from source and write it in a particular and same goes for the rest. Otherwise how will you boot our favorite alpine linux?&lt;br /&gt;
&lt;br /&gt;
But where do you get the sources? Generally if the SOC is supported in Linux (its called mainline) you can directly use the latest kernel, otherwise you will need to get the sources from the SOC manufacturer.&lt;br /&gt;
&lt;br /&gt;
Below is a SD-CARD layout for typical Allwinner which generally combine U-boot with the SPL loader from block 8. This then loads initramfs etc.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;start&amp;quot; is a 1k-block number here. (Multiply it by two to get the corresponding sector number - assuming 512 byte sectors). This layout works generally for Linux Mainline Kernels 4.x and above&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! start&lt;br /&gt;
 ! size&lt;br /&gt;
 ! usage&lt;br /&gt;
 |-&lt;br /&gt;
 | 0 || 8KB || Unused, available for partition table&lt;br /&gt;
 |-&lt;br /&gt;
 | 8 || 1024KB || Initial SPL loader + u-boot (just burn using dd)&lt;br /&gt;
 |-&lt;br /&gt;
 | 1024 || till end || vmlinuz + initramfs + modloop + dtb + Alpine apks folder (format vfat + enable boot flag, preferred from 2048)&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please noted in general the third fat partition is from 2048 till end&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Notice that while discussing above, I told there are generally four stages, I have infact combined SPL with U-boot and shown as one stage; indeed it is now possible to generate a single file say &#039;&#039;&#039;&amp;quot;u-boot-sunxi-with-spl.bin&amp;quot;&#039;&#039;&#039; while compiling.&lt;br /&gt;
&lt;br /&gt;
And yes, you saw it right, the partition that holds vmlinuz eta al is actually fat and no we will NOT have any issues with symbolic links etc. Yes its not your typical rootfs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The idea is that Alpinelinux beautifully loads and compresses into memory the entire OS and maintains it there, so aspects of symbolic links issues etc never come into picture, as the fat partition is never touched and whenever any changes occur and if and only they are committed, they are saved in a pre-compressed tar.gz archive, saved and then loaded back on fly during the next boot&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
== Boot-loaders aka U-Boot ==&lt;br /&gt;
Let us begin. The first is to understand U-boot.&lt;br /&gt;
&lt;br /&gt;
Distros like alpine linux for that matter any linux do not need to manipulate any kind of bootloader-specific&lt;br /&gt;
configuration data to indicate which storage device the system should boot from.&lt;br /&gt;
&lt;br /&gt;
Distros simply need to copy the boot configuration files in an ext2/3/4 or FAT partition, mark the partition bootable (via&lt;br /&gt;
the MBR bootable flag, or GPT legacy_bios_bootable attribute), and U-Boot (or any other bootloader) will find those boot files and execute them. This is conceptually identical to creating a grub2 configuration file on a desktop PC.&lt;br /&gt;
&lt;br /&gt;
Note that in the absence of any partition that is explicitly marked bootable, &#039;&#039;&#039;U-Boot falls back to searching the first valid partition of a disk for boot configuration files&#039;&#039;&#039;. Other bootloaders are recommended to do the same, since I believe that partition table bootable flags aren&#039;t so commonly used outside the realm of x86 PCs.&lt;br /&gt;
&lt;br /&gt;
U-Boot can also search for boot configuration files from a TFTP server. The standard format for boot configuration files is that of extlinux.conf, as&lt;br /&gt;
handled by U-Boot&#039;s &amp;quot;syslinux&amp;quot; (disk) or &amp;quot;pxe boot&amp;quot; (network).&lt;br /&gt;
&lt;br /&gt;
U-Boot searches for /extlinux/extlinux.conf then /boot/extlinux/extlinux.conf on disk, or pxelinux.cfg/default over the network.&lt;br /&gt;
&lt;br /&gt;
One example extlinux.conf generated by the Alpine Linux installer is:&lt;br /&gt;
  LABEL grsec&lt;br /&gt;
  MENU DEFAULT&lt;br /&gt;
  MENU LABEL Linux grsec&lt;br /&gt;
  LINUX /boot/vmlinuz-grsec&lt;br /&gt;
  INITRD /boot/initramfs-grsec&lt;br /&gt;
  DEVICETREEDIR /boot/dtbs&lt;br /&gt;
  APPEND BOOT_IMAGE=/boot/vmlinuz-grsec modules=loop,squashfs,sd-mod,usb-storage modloop=/boot/modloop-grsec console=${console}&lt;br /&gt;
&lt;br /&gt;
Another example extlinux.conf is:&lt;br /&gt;
  LABEL Linux Mailine 4.6RC2&lt;br /&gt;
  LINUX /boot/vmlinuz-4.6.0-rc1-sunxi&lt;br /&gt;
  INITRD /boot/initramfs-new.uImage&lt;br /&gt;
  FDT /boot/sun8i-h3-orangepi-pc.dtb&lt;br /&gt;
  APPEND BOOT_IMAGE=/boot/vmlinuz-4.6.0-rc1-sunxi modules=loop,squashfs,sd-mod,usb-storage modloop=/boot/modloop-sunxi console=${console}&lt;br /&gt;
&lt;br /&gt;
== What to compile ==&lt;br /&gt;
What are you basically looking for? What files do you need to compile, how and where do you need to compile from? And where do you need to put them? How do you need to put them? Well dont worry we will cover them here.&lt;br /&gt;
&lt;br /&gt;
You will need the following files (incase of mainline or 4.x latest kernels incase your SOC is supported - In our case yes Allwinner H3)&lt;br /&gt;
* U-boot bootloader (aka u-boot-sunxi-with-spl.bin file say for Orange pi pc Allwinner H3) - compiled separately&lt;br /&gt;
* Device specific .dtb file (in here called sun8i-h3-orangepi-pc.dtb) generated as part of your mainline kernel compilation &lt;br /&gt;
* Linux Kernel Image either uImage/zImage (In our case zImage called vmlinuz-4.6-rc1-sunxi)&lt;br /&gt;
* Initramfs file (what is it? you will learn as we progress)&lt;br /&gt;
* modloop file (what is it again? you will learn as we progress)&lt;br /&gt;
* boot.scr or extlinux.conf file for telling U-boot where from and how to find and load all above files into memory&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that we will be using boot.scr going forward instead of extlinux.conf, u-boot generally searches /boot.scr or /boot/boot.scr&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Incase of legacy kernels (3.x etc) you will need the following which we will not cover here&lt;br /&gt;
* uImage (linux kernel)&lt;br /&gt;
* script.bin (converted from fex format, notice if we have fex, we dont need dtb files here)&lt;br /&gt;
* ext4/ext3 rootfs file system&lt;br /&gt;
* U-boot bootloader etc&lt;br /&gt;
&lt;br /&gt;
== Compiling U-boot ==&lt;br /&gt;
You can follow this process or compile it along with Armbian kernel in the next section. Assuming below that you are building on an x64 bit ubuntu 14.04 LTS&lt;br /&gt;
&lt;br /&gt;
* git clone git://git.denx.de/u-boot.git&lt;br /&gt;
&lt;br /&gt;
Determine your build target aka your board. Go to your u-boot tree and search in the directory configs/ for your board, the file name looks like &amp;lt;board_name&amp;gt;_defconfig. So, if your device is orange pi pc your build target is orangepi_pc_defconfig&lt;br /&gt;
&lt;br /&gt;
* make CROSS_COMPILE=arm-linux-gnueabihf- &amp;lt;board_name&amp;gt;_defconfig&lt;br /&gt;
&lt;br /&gt;
* make CROSS_COMPILE=arm-linux-gnueabihf- menuconfig (optional in-case you want to play with menuconfig)&lt;br /&gt;
&lt;br /&gt;
* make CROSS_COMPILE=arm-linux-gnueabihf-&lt;br /&gt;
&lt;br /&gt;
When compiling natively on ARM board, omit the CROSS_COMPILE=…&lt;br /&gt;
&lt;br /&gt;
When the build is completed, there will be &#039;&#039;&#039;u-boot-sunxi-with-spl.bin&#039;&#039;&#039; available in your u-boot tree.&lt;br /&gt;
&lt;br /&gt;
create a file boot.cmd and configure it as above.&lt;br /&gt;
&lt;br /&gt;
== Compiling Kernel with .dtb file ==&lt;br /&gt;
&lt;br /&gt;
The first and foremost thing to compiling a kernel is to verify your SOC is supported by mainline linux kernel. The kernel must also have these options enabled and compiled in, instead of a module (better) &lt;br /&gt;
&lt;br /&gt;
 CONFIG_SQUASHFS=y The squashfs 4.0 is in &amp;quot;misc&amp;quot; under &amp;quot;filesystems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 CONFIG_BLK_DEV_LOOP=y This is under &amp;quot;Device drivers&amp;quot; -&amp;gt; &amp;quot;Block devices&amp;quot; -&amp;gt; &amp;quot;Loopback device support&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [*]Enable loadable module support ---&amp;gt;&lt;br /&gt;
*  Device Drivers ---&amp;gt;Graphics support ---&amp;gt;Frame buffer Devices ---&amp;gt;[*]support for frame buffer devices ---&amp;gt;[*]Simple framebuffer support&lt;br /&gt;
*  Device Drivers ---&amp;gt;Graphics support ---&amp;gt;Console display driver support ---&amp;gt;[*]Framebuffer Console support&lt;br /&gt;
&lt;br /&gt;
simplefb is a quick and easy way to get a display up on a HDMI monitor is to build U-Boot with sunxi cfb console support and Don&#039;t forget to change your console in your boot.cmd/boot.scr to console=tty1 to enable the simple framebuffer driver.&lt;br /&gt;
&lt;br /&gt;
Pickup stable release &lt;br /&gt;
&lt;br /&gt;
* git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git&lt;br /&gt;
&lt;br /&gt;
or pick up the sunxi-next branch maintained with all the inclusions that have been accepted, merged and will be included in the next stable release&lt;br /&gt;
&lt;br /&gt;
* git clone git://github.com/linux-sunxi/linux-sunxi.git -b sunxi-next&lt;br /&gt;
&lt;br /&gt;
* make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sunxi_defconfig&lt;br /&gt;
&lt;br /&gt;
* make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig (you want to include above squashfs and blk_dev_loop with menuconfig)&lt;br /&gt;
&lt;br /&gt;
to build run the following and after the compilation ends, you should have generated both the zImage in arch/arm/boot, and a device tree blob (.dtb) in arch/arm/boot/dts.&lt;br /&gt;
&lt;br /&gt;
* ARCH=arm CROSS_COMPILE=&amp;lt;toolchain-prefix&amp;gt; make zImage dtbs&lt;br /&gt;
&lt;br /&gt;
This device tree blob (or simply dtb) gives to the kernel the description of the hardware it&#039;s currently running on. &lt;br /&gt;
&lt;br /&gt;
In device tree blob (dtb) goal, it&#039;s pretty similar to the FEX scripts that Allwinner uses, yet far more generic. Dont worry remember we shown fex files incase of legacy kernels (3.x etc) converted to script.bin. &lt;br /&gt;
&lt;br /&gt;
Dtb allows to compile a single kernel image that will run on several platforms.&lt;br /&gt;
&lt;br /&gt;
To identify the dtb file that you will use on your board, first look into arch/arm/boot/dts. You should see a whole bunch of them, most being irrelevant to us because targeting boards based on other ARM SoCs. All the sunxi dtb follow the pattern &amp;lt;family&amp;gt;-&amp;lt;soc&amp;gt;-&amp;lt;board&amp;gt;.dtb &lt;br /&gt;
&lt;br /&gt;
If you have configured certain drivers as modules, you need to build and install these as well:&lt;br /&gt;
&lt;br /&gt;
* ARCH=arm CROSS_COMPILE=&amp;lt;toolchain-prefix&amp;gt; INSTALL_MOD_PATH=&amp;lt;any-path-you-like&amp;gt; make modules modules_install&lt;br /&gt;
&lt;br /&gt;
After the build succeeds, you can find the modules in the supplied INSTALL_MOD_PATH directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Armbian has an easy way of compiling kernel as well (just incase), so look below:&#039;&#039;&#039; - Till we fill this section with Alpine way of compiling things&lt;br /&gt;
&lt;br /&gt;
* Create a VM Ubuntu 14.04 LTS x64 server image with 40GB of disk (dont need install any compilation tools, the scripts will download suitable)&lt;br /&gt;
* apt-get -y -qq install git&lt;br /&gt;
* git clone --depth 1 https://github.com/igorpecovnik/lib&lt;br /&gt;
* cp lib/compile.sh .&lt;br /&gt;
* vim compile.sh&lt;br /&gt;
&lt;br /&gt;
Please make sure you have the following options as follows&lt;br /&gt;
&lt;br /&gt;
 KERNEL_ONLY=&amp;quot;yes&amp;quot; //compile only kernel, u-boot and other packages and not buid complete OS image&lt;br /&gt;
 KERNEL_CONFIGURE=&amp;quot;yes&amp;quot;  //to include your modules&lt;br /&gt;
 CLEAN_LEVEL=&amp;quot;make,images,debs&amp;quot;&lt;br /&gt;
 KERNEL_KEEP_CONFIG=&amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that you can add your patches in the patches folder. All patches must have file name extension .patch.&lt;br /&gt;
&lt;br /&gt;
or use&lt;br /&gt;
&lt;br /&gt;
* ./compile.sh BRANCH=dev BOARD=orangepih3 KERNEL_ONLY=yes PROGRESS_DISPLAY=plain COMPRESS_OUTPUTIMAGE=yes RELEASE=jessie&lt;br /&gt;
&lt;br /&gt;
Let us go with first option. You will prompted to select board. &lt;br /&gt;
&lt;br /&gt;
Select &#039;&#039;&#039;orangepih3&#039;&#039;&#039; and then select &#039;&#039;&#039;dev&#039;&#039;&#039; branch&lt;br /&gt;
&lt;br /&gt;
Select your kernel config options as told above (squashfs modules etc).&lt;br /&gt;
&lt;br /&gt;
Once the compilation is finished in the output folder you will notice the following files&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DTB FILE&#039;&#039;&#039;&lt;br /&gt;
 linux-dtb-dev-sunxi_5.07_armhf.deb -- untar it and it will contain boot/dtb-4.6.0-rc1-sunxi/sun8i-h3-orangepi-pc.dtb&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;UBOOT+SPL FILE&#039;&#039;&#039;&lt;br /&gt;
 linux-u-boot-dev-orangepih3_5.07_armhf.deb -- untar it and it will contain usr/lib/linux-u-boot-dev-orangepih3_5.07_armf/u-boot-sunxi-with-spl.bin&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;VMLINUZ KERNEL&#039;&#039;&#039;&lt;br /&gt;
 linux-image-dev-sunxi_5.07_armhf.deb -- untar it and it will contain boot/vmlinuz-4.6.0-rc1-sunxi&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MODLOOP FILES&#039;&#039;&#039;&lt;br /&gt;
 linux-image-dev-sunxi_5.07_armhf.deb -- untar it (it should ultimately be in lib/modules/4.6.0-rc1-sunxi)&lt;br /&gt;
 linux-firmware-image-dev-sunxi_5.07_armhf.deb -- untar it (it should ultimately be in /lib/modules/firmware)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;INITRAMFS FILES&#039;&#039;&#039;&lt;br /&gt;
 linux-image-dev-sunxi_5.07_armhf.deb -- untar it (it should ultimately be in lib/modules/4.6.0-rc1-sunxi)&lt;br /&gt;
 linux-firmware-image-dev-sunxi_5.07_armhf.deb -- untar it (it should ultimately be in /lib/firmware)&lt;br /&gt;
&lt;br /&gt;
MAKE SURE YOU ALSO GET Generic ARM Image from http://www.alpinelinux.org/downloads/&lt;br /&gt;
&lt;br /&gt;
EXTRACT THE tar.gz file and you will need the &#039;&#039;&#039;initramfs-grsec&#039;&#039;&#039; and the &#039;&#039;&#039;apk folder&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next proceed to below sections.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpinelinux is expected to have a bleeding edge release option soon along with LTS releases.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Creating Initramfs File ==&lt;br /&gt;
The purpose of initrd and initramfs (also known, generically, as &amp;quot;initial RAM disk&amp;quot;) is similar: they contain a minimal root file-system, along with some scripts. When the kernel boots, if it is instructed to use an initrd or initramfs (done with boot loader configuration) it unpacks the file in RAM, chroot()s into it, and run some predefined scripts. Finally, the &amp;quot;real&amp;quot; root file system is mounted, the kernel switches to it and the normal init process can begin.&lt;br /&gt;
&lt;br /&gt;
Why do we need an initial RAM disk in the first place? You&#039;re probably wondering this if you use to build your own kernel with the necessary modules for your hardware built-in. In that case, you almost never need an initial RAM disk.&lt;br /&gt;
&lt;br /&gt;
But many distributions have to ship a binary kernel that should work on most, or even all, different combinations of hardware, storage, file-systems, etc. They can&#039;t obviously build all the possible modules into the kernel. So they ship a minimal, generic kernel, and use an initial RAM disk that contains most hardware modules and some logic to detect which modules need to be loaded to be able to continue to boot the system normally (ie from the hard drive).&lt;br /&gt;
&lt;br /&gt;
An initramfs contains at least one file called /init. This file is executed by the kernel as the main init process (PID 1). It has to do all the work. In addition, there can be any number of additional files and directories that are required by /init. They are usually files you&#039;ll also find on any other root filesystem, such as /dev for device nodes, /proc for kernel information, /bin for binaries, and so on. The structure of an initramfs can be simple, or it can be complicated, depending on what you are planning to do.&lt;br /&gt;
&lt;br /&gt;
When the kernel mounts the initramfs, your target root partition is not yet mounted, so you can&#039;t access any of your files. That means there is nothing but the initramfs. So everything you need, everything you want, you have to include it in your initramfs. If you want a shell, you have to include it in your initramfs. If you want to mount something, you need a mount utility. If you need to load a module, your initramfs has to provide both the module, as well as a utility to load it. If the utility depends on libraries in order to work, you have to include the libraries as well. This seems complicated, and it is, because the initramfs has to function independently.&lt;br /&gt;
&lt;br /&gt;
This means that it&#039;s possible to boot the kernel, load some modules and run some tasks (from the RAM disk), and finally start the normal boot process (/sbin/init etc.). &lt;br /&gt;
&lt;br /&gt;
The initial RAM disk must contain a fully functional file system, including some essential programs and libraries. &lt;br /&gt;
&lt;br /&gt;
For space reasons, small footprint binaries are usually used (eg ash, busybox, or klibc). &lt;br /&gt;
&lt;br /&gt;
Once the initial RAM disk&#039;s job is over and the kernel has switched to the real root file system, the memory used by the RAM disk is freed.&lt;br /&gt;
&lt;br /&gt;
As briefly mentioned, there are two types of initial RAM disk: initrd and initramfs. The main difference is that an initrd contain a raw filesystem image (eg ext2), while an initramfs contains a cpio archive (which, when expanded, produces a directory hierarchy). Note that there are quite a few other differences, not mentioned here. &lt;br /&gt;
&lt;br /&gt;
In both cases, the image file is compressed (typically with gzip) and the kernel expands and mount it. All the recent Linux distribution that use an initial RAM disk use an initramfs image. initrd is being used less and less. To check if the file you&#039;re interested in is an initrd or an initramfs, you can decompress it and feed it to file:&lt;br /&gt;
&lt;br /&gt;
* gunzip -c /boot/initrd-2.6 | file -&lt;br /&gt;
&lt;br /&gt;
Output is as below and that file is a real initrd&lt;br /&gt;
 /dev/stdin: Linux rev 1.0 ext2 filesystem data&lt;br /&gt;
&lt;br /&gt;
Here&#039;s what you&#039;d see with an initramfs:&lt;br /&gt;
*  gunzip -c /root/initrams-grsec | file -&lt;br /&gt;
&lt;br /&gt;
Note the output which says &amp;quot;SVR4 with no CRC&amp;quot; format which will be useful later.&lt;br /&gt;
 /dev/stdin: ASCII cpio archive (SVR4 with no CRC)&lt;br /&gt;
&lt;br /&gt;
Modify initramfs-grsec taken from the Generic ARM Image of Alpinelinux&lt;br /&gt;
---------&lt;br /&gt;
As said, an initramfs image is a compressed cpio archive, although the file name may sometimes be deceiving; sometimes it still has &amp;quot;initrd&amp;quot; in its name, and also many times it does not end in .gz or other suffixes that indicate compression:&lt;br /&gt;
&lt;br /&gt;
* file /root/initrams-grsec&lt;br /&gt;
&lt;br /&gt;
 /boot/root: gzip compressed data, from Unix, last modified:..., max compression&lt;br /&gt;
&lt;br /&gt;
Now cpio is an ancient (and a bit weird) archive format. When de-archiving, it needs to read the archive from standard input (GNU cpio also has a --file option to specify the file on the command line). The directory hierarchy is created in the current working directory. So:&lt;br /&gt;
&lt;br /&gt;
* mkdir temp&lt;br /&gt;
* cd temp&lt;br /&gt;
* gunzip -c /boot/root/initrams-grsec | cpio -i&lt;br /&gt;
28293 blocks&lt;br /&gt;
&lt;br /&gt;
* ls -l &lt;br /&gt;
 total 64....&lt;br /&gt;
 drwxr-xr-x  2 root root 4096 2016-04-28 14:16 bin&lt;br /&gt;
 drwxr-xr-x  3 root root 4096 2016-04-28 14:16 dev&lt;br /&gt;
 drwxr-xr-x  6 root root 4096 2016-04-28 14:16 etc&lt;br /&gt;
 -rwxr-xr-x  1 root root 3355 2016-04-28 14:16 init&lt;br /&gt;
 drwxr-xr-x  5 root root 4096 2016-04-28 14:16 lib/modules/4.6.0-rc1-sunxi&lt;br /&gt;
 drwxr-xr-x  5 root root 4096 2016-04-28 14:16 lib/modules/firmware&lt;br /&gt;
 drwxr-xr-x  2 root root 4096 2016-04-28 14:16 media&lt;br /&gt;
 drwxr-xr-x  2 root root 4096 2016-04-28 14:16 newroot&lt;br /&gt;
 drwxr-xr-x 12 root root 4096 2016-04-28 14:16 proc&lt;br /&gt;
 drwxr-xr-x  3 root root 4096 2016-04-28 14:16 run&lt;br /&gt;
&lt;br /&gt;
Now you can finally edit and change the contents at will (no space limitations, unlike initrd). When you&#039;re done, you have to recreate the compressed cpio archive. Again, cpio is a bit weird when archiving, because it wants to read the names of the files to archive on standard input (and writes the archive on standard output). &lt;br /&gt;
&lt;br /&gt;
* Extract from linux-image-dev-sunxi_5.07_armhf.deb the /lib/modules/4.6.0-rc1-sunxi folder and copy it into the above extracted lib/modules dir.&lt;br /&gt;
&lt;br /&gt;
* Note it may already contain a folder called &amp;quot;4.1.20-0-grsec&amp;quot;, it is not required and you can delete it&lt;br /&gt;
&lt;br /&gt;
* Extract from linux-firmware-image-dev-sunxi_5.07_armhf.deb /lib/firmware folder and copy it into the above extracted lib/modules dir&lt;br /&gt;
&lt;br /&gt;
next you can do as follows:&lt;br /&gt;
&lt;br /&gt;
* pwd&lt;br /&gt;
&lt;br /&gt;
 /root/temp&lt;br /&gt;
&lt;br /&gt;
* find . | cpio -H newc -o | gzip -9 &amp;gt; /root/initramfs-sunxi&lt;br /&gt;
 34207 blocks&lt;br /&gt;
&lt;br /&gt;
The only catch is that the -H newc option must be specified because the cpio archive contained in the initramfs has to be in the (new) &amp;quot;SVR4 with no CRC&amp;quot; portable format, as we saw at the beginning. In case you&#039;re wondering, cpio can create archives in other formats: bin, odc, crc, tar, ustar, hpbin, hpodc are those listed in the info page for GNU cpio.&lt;br /&gt;
&lt;br /&gt;
Note that the construct&lt;br /&gt;
&lt;br /&gt;
* find . | something&lt;br /&gt;
&lt;br /&gt;
is generally considered unsafe and to be avoided in shell scripting, because files could have newlines and control characters in them that could deceive the consumer of those filenames. This is generally not the case for filenames contained in an initramfs image, so it is &amp;quot;safe enough&amp;quot; to use here.&lt;br /&gt;
&lt;br /&gt;
* change back to /root&lt;br /&gt;
&lt;br /&gt;
* mkimage -n initramfs-sunxi -A arm -O linux -T ramdisk -C none -d initramfs-sunxi initramfs-sunxi-new&lt;br /&gt;
&lt;br /&gt;
This will create a u-boot compatible ramdisk with its headers.&lt;br /&gt;
&lt;br /&gt;
So your initramfs file is &#039;&#039;&#039;initramfs-sunxi-new&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Creating modloop File ==&lt;br /&gt;
The modloop file contains the folders like below...&lt;br /&gt;
* /modules/4.6.0-rc1-sunxi&lt;br /&gt;
* /modules/4.6.0-rc1-sunxi/kernel&lt;br /&gt;
* /modules/4.6.0-rc1-sunxi/arch&lt;br /&gt;
* /modules/firmware&lt;br /&gt;
&lt;br /&gt;
If you run the following command on modloop-grsec or any other similar modloop file got from the Generic ARM Image of Alpinelinux&lt;br /&gt;
* file modloop-grsec&lt;br /&gt;
&lt;br /&gt;
You will realize, it outpus as&lt;br /&gt;
 Squashfs filesystem, little endian, version 4.0, xzy bytes, xyz nodes, blocksize: xzy bytes, created...&lt;br /&gt;
&lt;br /&gt;
You can create a &amp;quot;squashfs-temp&amp;quot; directory and create a sub-dir &amp;quot;modules&amp;quot; and then copy above required files concerning your particular kernel from the above deb extracted sources of Armbian and you are good to go. Then just run the command below.&lt;br /&gt;
&lt;br /&gt;
* mksquashfs [source folder] [SquashFS target file] -b 1048576 -comp xz -Xdict-size 100%&lt;br /&gt;
* mksquashfs squashfs-temp/ modloop-sunxi -b 1048576 -comp xz -Xdict-size 100%&lt;br /&gt;
&lt;br /&gt;
Resulting file &#039;&#039;&#039;modloop-sunxi&#039;&#039;&#039; is ready for usage&lt;br /&gt;
&lt;br /&gt;
Please understand that mksquashfs compresses using gzip (deflate) as default, but if the compression time doesn’t matter as much, you should use the xz (LZMA2) option of more recent SquashFS version. Yes please use xz. &lt;br /&gt;
&lt;br /&gt;
The command above activates xz using the highest possible compression options and the highest possible blocksize (1 MiB instead of the default 128 kiB). Therefore the process of creating the SquashFS file is slower than if using default options, but the resulting file is much smaller and might be (depending on disk IO time etc) a bit faster. LZMA2 is a highly asymmetric compression algorithm, so decompression is much faster than compression&lt;br /&gt;
&lt;br /&gt;
The command compresses the entire source folder into the SquashFS target file.&lt;br /&gt;
&lt;br /&gt;
Make sure that the SquashFS target file doesn’t exist before using this command. If it already exists, mksquashfs tries to update it, but this might yield undesirable results (I didn’t check that, it probably only produces a lot of error messages but a valid output file)&lt;br /&gt;
&lt;br /&gt;
You can mount the resulting file using this command (assuming the target folder exists and is empty):&lt;br /&gt;
* mount [SquashFS file] [folder you want to mount it in]&lt;br /&gt;
&lt;br /&gt;
If this command fails, you might need to specify some options explicitly:&lt;br /&gt;
* mount -o loop -t squashfs [SquashFS file] [folder you want to mount it in]&lt;br /&gt;
&lt;br /&gt;
If you want to auto-mount the SquashFS, you can also add an _/etc/fstab _entry like this:&lt;br /&gt;
* [SquashFS file] [folder you want to mount it in] squashfs auto,defaults 0 0&lt;br /&gt;
&lt;br /&gt;
== How to burn to SD Card ==&lt;br /&gt;
Let us write to the SD-Card, I will assume here that you already have compiled your kernel, u-boot and want to move forward.&lt;br /&gt;
&lt;br /&gt;
When we need to actually put things on the SD card, be careful with dd it can and will wipe your hard disk if you make a mistake. In my case I had an SD card reader so I set things to point at that slot only by using the by-id links from udev. These by-id links which include the serial number which helped to avoid mistakes. The following commands assume you have done the same and are using by-id links.&lt;br /&gt;
&lt;br /&gt;
In linux blank the first 1MB of the card using the following (my sd-card is /dev/sda1&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;dd if=/dev/zero of=/dev/sda bs=1M count=1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
But you need to be careful when using dd on special files (i.e., devices).  &lt;br /&gt;
&lt;br /&gt;
For example, the below command will write one tape block of 1024 bytes; &lt;br /&gt;
&lt;br /&gt;
* dd if=(whatever input) of=(a magnetic tape device) bs=1024 count=1 &lt;br /&gt;
&lt;br /&gt;
However, the below command will write 1024 small blocks of one byte each&lt;br /&gt;
 &lt;br /&gt;
* dd if=(whatever input) of=(a magnetic tape device) bs=1 count=1024   &lt;br /&gt;
&lt;br /&gt;
These are not the same; the 1024 small blocks will take up more room on the tape than the one large block, because of inter-record gaps, and may cause problems for reading the tape.&lt;br /&gt;
&lt;br /&gt;
Now Assuming you have got the file u-boot-sunxi-with-spl.bin, it just has to be burned to sd card using the following command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;dd if=u-boot-sunxi-with-spl.bin of=/dev/sda bs=1024 seek=8&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes depending on how you compile; you can generate spl and u-boot separately (it is not recommended by me) you can install the components separately using&lt;br /&gt;
&lt;br /&gt;
* dd if=spl/sunxi-spl.bin of=/dev/sda bs=1024 seek=8&lt;br /&gt;
* dd if=u-boot.img of=/dev/sda bs=1024 seek=40&lt;br /&gt;
&lt;br /&gt;
Please note, if you are using old source (v2013.07 or earlier, then the procedure is slightly different)&lt;br /&gt;
&lt;br /&gt;
* dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8&lt;br /&gt;
* dd if=u-boot.bin of=/dev/sdX bs=1024 seek=32&lt;br /&gt;
&lt;br /&gt;
Typically for understanding, this is how the layout for SD-Card in above cases is;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 ! start&lt;br /&gt;
 ! size&lt;br /&gt;
 ! usage&lt;br /&gt;
 |-&lt;br /&gt;
 | 0 || 8KB || Unused, available for partition table etc.&lt;br /&gt;
 |-&lt;br /&gt;
 | 8 || 32KB || Initial SPL loader (8 to 24KB prior to 2013.07 and earlier)&lt;br /&gt;
 |-&lt;br /&gt;
 | 40 || 504KB || U-Boot (32KB to 512KB for 2013.07 and earlier)&lt;br /&gt;
 |-&lt;br /&gt;
 | 544 || 128KB || environment&lt;br /&gt;
 |-&lt;br /&gt;
 | 672 || 352KB || reserved&lt;br /&gt;
 |-&lt;br /&gt;
 | 1024 || - || Free for partitions&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Remember to leave sufficient space for all u-boot files when partitioning the card. The u-boot will not have any partition type defined. Recommended to have first fat partition start at sector 2048 (1MB)&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Next Using fdisk, create a new primary partition on the card (so far there are no partitions, only uboot has been burned on the card)&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Set the starting sector of the card as 2048&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Now install fat file system on the newly created partition by running mkfs.fat /dev/sda1&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Using fdisk, set the bootable flag of the partition&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When setting the bootable flag of the partition, to create a FAT32 partition, if you are using fdisk, the FAT32 partition type is called W95 FAT32 (LBA) and its ID is 0xc&lt;br /&gt;
&lt;br /&gt;
You can rename the sd-card as rootfs...&lt;br /&gt;
&lt;br /&gt;
Please note that with recent U-Boot it&#039;s fine to use ext2/ext3/ext4 as boot partition, or as in our case fat file-systems in the any partition.&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------&lt;br /&gt;
There is debug serial port which you can use to connect to PC using putty set @ 115200 kbps. You should able to watch the following.&lt;br /&gt;
&lt;br /&gt;
 U-Boot SPL 2016.03-armbian (Apr 08 2016 - 01:09:18)&lt;br /&gt;
 DRAM: 512 MiB&lt;br /&gt;
 Failed to set core voltage! Can&#039;t set CPU frequency&lt;br /&gt;
 Trying to boot from MMC1&lt;br /&gt;
 U-Boot 2016.03-armbian (Apr 08 2016 - 01:09:18 +0530) Allwinner Technology&lt;br /&gt;
 CPU:   Allwinner H3 (SUN8I 1680)&lt;br /&gt;
 Model: Xunlong Orange Pi PC&lt;br /&gt;
 I2C:   ready&lt;br /&gt;
 DRAM:  512 MiB&lt;br /&gt;
 MMC:   SUNXI SD/MMC: 0&lt;br /&gt;
 *** Warning - bad CRC, using default environment&lt;br /&gt;
 In:    serial&lt;br /&gt;
 Out:   serial&lt;br /&gt;
 Err:   serial&lt;br /&gt;
 Net:   No ethernet found.&lt;br /&gt;
 starting USB...&lt;br /&gt;
 USB0:   USB EHCI 1.00&lt;br /&gt;
 USB1:   USB OHCI 1.0&lt;br /&gt;
 USB2:   USB EHCI 1.00&lt;br /&gt;
 USB3:   USB OHCI 1.0&lt;br /&gt;
 USB4:   USB EHCI 1.00&lt;br /&gt;
 USB5:   USB OHCI 1.0&lt;br /&gt;
 scanning bus 0 for devices... 1 USB Device(s) found&lt;br /&gt;
 scanning bus 2 for devices... 1 USB Device(s) found&lt;br /&gt;
 scanning bus 4 for devices... 1 USB Device(s) found&lt;br /&gt;
 Hit any key to stop autoboot:  0&lt;br /&gt;
 switch to partitions #0, OK&lt;br /&gt;
 mmc0 is current device&lt;br /&gt;
 Scanning mmc 0:1...&lt;br /&gt;
 Found /boot/extlinux/extlinux.conf&lt;br /&gt;
 Retrieving file: /boot/extlinux/extlinux.conf&lt;br /&gt;
 reading /boot/extlinux/extlinux.conf&lt;br /&gt;
 232 bytes read in 29 ms (7.8 KiB/s)&lt;br /&gt;
 1:      Linux Mailine 4.6RC2&lt;br /&gt;
 Retrieving file: /boot/uinitrd&lt;br /&gt;
 reading /boot/uinitrd&lt;br /&gt;
  **Unable to read file /boot/uinitrd&lt;br /&gt;
  for failure retrieving initrd&lt;br /&gt;
 SCRIPT FAILED: continuing...&lt;br /&gt;
 USB device 0: unknown device&lt;br /&gt;
 No ethernet found.&lt;br /&gt;
 missing environment variable: pxeuuid&lt;br /&gt;
 No ethernet found.&lt;br /&gt;
 Retrieving file: /boot/extlinux/pxelinux.cfg/0&lt;br /&gt;
 No ethernet found.&lt;br /&gt;
 Retrieving file: /boot/extlinux/pxelinux.cfg/default-arm-sunxi&lt;br /&gt;
 No ethernet found.&lt;br /&gt;
 Retrieving file: /boot/extlinux/pxelinux.cfg/default-arm&lt;br /&gt;
 No ethernet found.&lt;br /&gt;
 Retrieving file: /boot/extlinux/pxelinux.cfg/default&lt;br /&gt;
 No ethernet found.&lt;br /&gt;
 Config file not found&lt;br /&gt;
 No ethernet found.&lt;br /&gt;
 =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following to browser through the sd-card&lt;br /&gt;
* fatls mmc 0:1 boot&lt;br /&gt;
&lt;br /&gt;
Next step would require simply copying the required files like boot configuration files, kernels etc in the above FAT partition (note there is only one FAT partition and it is marked as bootable) and U-Boot (or any other bootloader) will find those boot files and execute them.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Assuming you have compiled vmlinuz-4.6.0-rc1-sunxi, you can create a directory called /boot in the root of micro-sd fat partition and copy it there.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Similarly create another folder called /boot/dtbs in the micro-sd card and copy the corresponding sun8i-h3-orangepi-pc.dtb file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Similarly create boot.scr and copy it to the /boot folder&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Basically while booting, U-boot will look for uEnv.txt or boot.scr in the first partition FAT or it will look for extlinux.conf. In here we will define boot.scr. &lt;br /&gt;
&lt;br /&gt;
boot.scr contains needed uboot commands for loading kernel, initrd, setting kernel parameters and booting.&lt;br /&gt;
&lt;br /&gt;
To create boot.scr first make a u-boot script boot.cmd with the u-boot commands you need for booting the system:&lt;br /&gt;
&lt;br /&gt;
* setenv fdt_high ffffffff&lt;br /&gt;
* setenv machid 1029 &lt;br /&gt;
* setenv bootargs earlyprintk /boot/vmlinuz-4.6.0-rc1-sunxi modules=loop,squashfs,sd-mod,usb-storage modloop=/boot/modloop-sunxi console=${console} &lt;br /&gt;
* load mmc 0:1 0x43000000 boot/dtbs/sun8i-h3-orangepi-pc.dtb&lt;br /&gt;
* load mmc 0:1 0x41000000 boot/vmlinuz-4.6.0-rc1-sunxi&lt;br /&gt;
* load mmc 0:1 0x45000000 boot/initramfs-sunxi-new&lt;br /&gt;
* bootz 0x41000000 0x45000000 0x43000000&lt;br /&gt;
&lt;br /&gt;
Then translate this to a boot.scr by using the mkimage command&lt;br /&gt;
&lt;br /&gt;
 mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&lt;br /&gt;
If you are using an older U-Boot (you shouldn&#039;t - Which?), you might require the following line, &#039;&#039;&#039;fdt_high ffffffff&#039;&#039;&#039; to keep the extracted kernel from overwriting the device tree configuration, however in general you dont require it.&lt;br /&gt;
&lt;br /&gt;
setenv is for setting flags in the u-boot environment&lt;br /&gt;
&lt;br /&gt;
The bootm/bootz command is used to start operating system images. From the image header it gets information about the type of the operating system, the file compression method used (if any), the load and entry point addresses, etc. The command will then load the image to the required memory address, uncompressing it on the fly if necessary. Depending on the OS it will pass the required boot arguments and start the OS at it&#039;s entry point.&lt;br /&gt;
&lt;br /&gt;
The first argument to bootm is the memory address (in RAM, ROM or flash memory) where the image is stored, followed by optional arguments that depend on the OS. Load is nothing but loading the file into the RAM location.&lt;br /&gt;
&lt;br /&gt;
Linux requires the flattened device tree blob to be passed at boot time, and bootm expects its third argument to be the address of the blob in memory. &lt;br /&gt;
&lt;br /&gt;
Second argument to bootm depends on whether an initrd initial ramdisk image is to be used. If the kernel should be booted without the initial ramdisk, the second argument should be given as &amp;quot;-&amp;quot;, otherwise it is interpreted as the start address of initrd (in RAM, ROM or flash memory).&lt;br /&gt;
&lt;br /&gt;
To boot a Linux kernel image without a initrd ramdisk image, the following command can be used:&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; bootm ${kernel_addr} - ${fdt_addr}&lt;br /&gt;
If a ramdisk image shall be used, you can type:&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}&lt;br /&gt;
Both examples of course imply that the variables used are set to correct addresses for a kernel, fdt blob and a initrd ramdisk image&lt;br /&gt;
&lt;br /&gt;
 bootm &amp;lt;Linux uImage address&amp;gt; &amp;lt;mkimage wrapped ramdisk address&amp;gt; &amp;lt;device tree (dtb) address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the bootm/bootz command, U-Boot is relocating the images before it boots Linux such that the addresses above may not be what the kernel sees. U-Boot also alters the device tree to tell the kernel where the ramdisk image is located in memory (initrd-start and initrd-end). The command sets the r2 register to the address of the device tree in memory which is not done by the go command.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Remember the console=${console} is important for you to interact with Alpinelinux once it boots&#039;&#039;&lt;br /&gt;
* &#039;&#039;Instead of bootm, you use bootz&#039;&#039;&lt;br /&gt;
* &#039;&#039;bootz basically starts a kernel image loaded at the given address in RAM along with other images &#039;&#039;&lt;br /&gt;
* &#039;&#039;You could possibly use 0x42000000 for your vmlinuz&#039;&#039;&lt;br /&gt;
* &#039;&#039;the setenv machid commands asks nanopi m1 to report itself as orange pi pc as we loading orange pi pc dtb and kernel&#039;&#039;&lt;br /&gt;
* &#039;&#039;all the above commands can also be run via the u-boot prompt and examined via the serial debug port without compiling boot.cmd&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
People generally caution as below:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;The new kernels have CMA enabled by default. CMA is trying to reserve 192MB of physically contiguous memory between physical addresses 0x43000000 and 0x50000000. Using specifically this address range is important because CedarX hardware can work only with the first 256MB of physical DRAM (the base physical address of DRAM is 0x40000000). Now if initrd is placed by u-boot somewhere in the middle of this memory area (cutting it into two halves), then CMA can&#039;t reserve physically contiguous 192MB memory block there anymore. So the reservation of the CMA memory area fails at boot time:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;The solution for this problem is not to place initrd anywhere between 0x43000000 and 0x50000000&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Make sure you also create and copy the files modloop-sunxi, initramfs-sunxi-new to the /boot folder&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Lastly copy the apks folder to the root of the sdcard&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The apks folder can be extracted by downloading the Generic ARM Image from http://www.alpinelinux.org/downloads/&lt;br /&gt;
&lt;br /&gt;
Your SD-Card will look as below.&lt;br /&gt;
* /boot&lt;br /&gt;
* /apks&lt;br /&gt;
&lt;br /&gt;
and under /boot directory, the following&lt;br /&gt;
* /boot/dtbs/sun8i-h3-orangepi-pc.dtb&lt;br /&gt;
* /boot/boot.scr&lt;br /&gt;
* /boot/initramfs-new&lt;br /&gt;
* /boot/modloop-sunxi&lt;br /&gt;
* /boot/vmlinuz-4.6.0-rc1-sunxi&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Practice, read, ask, hang out in the forums, channels and that is how you can learn. Dont worry about people not responding, they are not being rude, some could be busy, the ones that aren&#039;t will respond, finally dont be shy, drop an email to the mailing list.&lt;br /&gt;
&lt;br /&gt;
== For debugging purposes only ==&lt;br /&gt;
need to paste tested scenarios&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Alpine_on_ARM|Alpine on ARM]]&lt;br /&gt;
* [https://blog.christophersmart.com/2016/10/23/building-and-booting-upstream-linux-and-u-boot-for-orange-pi-one-arm-board/ Building and Booting Upstream Linux and U-Boot for Orange Pi One ARM Board (with Ethernet) (2016)]&lt;br /&gt;
* {{Issue|17280}} - Orange Pi Zero 3 installation attempts of Alpine Linux v3.22 onwards - Gitlab reports.&lt;br /&gt;
* [https://linux-sunxi.org/ linux-sunxi.org]&lt;br /&gt;
&lt;br /&gt;
[[category: ARM]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Locale&amp;diff=31919</id>
		<title>Locale</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Locale&amp;diff=31919"/>
		<updated>2026-01-04T17:08:19Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* See also */ Added [https://devurandom.xyz/tech/alpine_linux_stuff/#:~:text=russian%20console%20keymap devurandom.xyz - Russian console keymap]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Musl]] does not implement most of the locale features that glibc implements.&lt;br /&gt;
&lt;br /&gt;
To Fix unicode defaults: &lt;br /&gt;
&amp;lt;code&amp;gt;sed -i &#039;s/#unicode=&amp;quot;NO&amp;quot;/#unicode=&amp;quot;NO&amp;quot;\nunicode=&amp;quot;YES&amp;quot;/&#039; /etc/rc.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Musl does not implement most of the locale features that glibc implements. The {{Pkg|musl-locales}} package provides [https://git.adelielinux.org/adelie/musl-locales translations] with varying degrees of completion. The below command installs a limited set of locales (languages) for musl (C library) generated console messages. &lt;br /&gt;
{{Cmd|# apk add musl-locales}} &lt;br /&gt;
&lt;br /&gt;
The {{Pkg|musl-locales}} package also provides &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; command. To list defined locales:&lt;br /&gt;
{{cmd|locale -a}}&lt;br /&gt;
&lt;br /&gt;
This package includes a file {{Path|/etc/profile.d/00locale.sh}}. You&#039;ll need to re-login or source it manually for locales to work.&lt;br /&gt;
&lt;br /&gt;
Copy the default locale settings file {{Path|/etc/profile.d/20locale.sh}} to a custom override file:{{Cmd|# cp /etc/profile.d/20locale.sh /etc/profile.d/20locale.sh.sh}} &lt;br /&gt;
&lt;br /&gt;
Now custom override file can be edited with &amp;lt;Code&amp;gt;nano /etc/profile.d/locale.sh.sh&amp;lt;/Code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Language support ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Need to identify proper page for maintaining this information, if this is not appropriate --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To pull in the translation packages for all installed packages: {{Cmd|# apk add lang}}&lt;br /&gt;
&lt;br /&gt;
To list available hunspell dictionary packages, so that you relevant language dictionary can be added: {{Cmd|apk list hunspell*}}&lt;br /&gt;
&lt;br /&gt;
To list translation packages for your specific(xy) language: {{Cmd|apk list *-xy *-xy-*}}&lt;br /&gt;
&lt;br /&gt;
For example, to list translation packages for Portuguese(pt) language: {{Cmd|apk list *-pt *-pt-*}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Compose key]]&lt;br /&gt;
* [https://git.adelielinux.org/adelie/musl-locales Adelielinux musl-locales page]&lt;br /&gt;
* [https://devurandom.xyz/tech/alpine_linux_stuff/#:~:text=russian%20console%20keymap devurandom.xyz - Russian console keymap]&lt;br /&gt;
&lt;br /&gt;
[[Category:Localization]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ACF_how_to_write&amp;diff=31918</id>
		<title>ACF how to write</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ACF_how_to_write&amp;diff=31918"/>
		<updated>2026-01-03T04:19:13Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* See also */ &amp;quot;Legacy ACF view patterns - web elements.lua – For historical reference only.&amp;quot;  Page was orphaned and is obsolete.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=How to Write an ACF=&lt;br /&gt;
&lt;br /&gt;
For some examples please see the Web Configuration Framework projects in the Alpine Linux git repository&lt;br /&gt;
&lt;br /&gt;
https://git.alpinelinux.org/&lt;br /&gt;
&lt;br /&gt;
*acf-unbound - a simple ACF to control a service&lt;br /&gt;
*acf-awall - a slightly more complicated ACF for a firewall&lt;br /&gt;
*acf-provisioning - a complicated database application based on ACF&lt;br /&gt;
*...&lt;br /&gt;
&lt;br /&gt;
==From &amp;lt;nil&amp;gt; to a running ACF example application==&lt;br /&gt;
&lt;br /&gt;
===Step 1 - The Programming Language===&lt;br /&gt;
* ACF uses lua as its programming language. Have a look at [https://www.lua.org/ lua.org] before starting.&lt;br /&gt;
&lt;br /&gt;
===Step 2 - The Application Environment===&lt;br /&gt;
* Setup the ACF web application by running &#039;&#039;setup-acf&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 3 - Create A Development Directory===&lt;br /&gt;
* In your user home create a directory for your application (e.g. mkdir ~/myapp)&lt;br /&gt;
* And cd into it (e.g. cd ~/myapp)&lt;br /&gt;
&lt;br /&gt;
===Step 4 - MVC, How Does It Affect My Coding?===&lt;br /&gt;
ACF is an MVC based framework. What does this mean to you? Your application is separated into three layers: Model, View, Controller - each of which may have one or more files.&lt;br /&gt;
* Controller: The event dispatcher. Most of the controller functionality is handled by the ACF mvc.lua code and some standard controllers (such as acf_www-controller.lua or acf_cli-controller.lua). For the controller layer of your new ACF package, you must export one lua function per action in a lua module named &#039;myapp-controller.lua&#039;. The ACF controller code will interpret the user interaction to load your new controller and fire the appropriate action - the same-named function in your controller will be called.&lt;br /&gt;
* View: The view layer defines what your application will look like. For most actions, such as forms, your application can use the built-in automatic view generation. For others, you can link to standard views which are included in the acf-core package. For other actions, such as lists of data, you may create view files, each presenting a dynamic HTML page with only as much code as necessary to display the data you receive from the controller.&lt;br /&gt;
* Model:  The &#039;real work&#039; is done in the Model (e.g. modifying config files, starting/stopping services etc.). Each action exported by your controller will call into model functions to retrieve data and carry out actions.&lt;br /&gt;
&lt;br /&gt;
===Step 5 - The Example Files To Start With===&lt;br /&gt;
Now let us have a look at the files we need to place into our application directory:&lt;br /&gt;
&lt;br /&gt;
* config.mk&lt;br /&gt;
* Makefile&lt;br /&gt;
* myapp-controller.lua&lt;br /&gt;
* myapp-model.lua&lt;br /&gt;
* myapp.roles&lt;br /&gt;
* myapp.menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;config.mk:&#039;&#039;&#039;&lt;br /&gt;
For use with the Makefile. Just copy/paste it. We will look at it later.&lt;br /&gt;
 prefix=/usr&lt;br /&gt;
 datadir=${prefix}/share&lt;br /&gt;
 sysconfdir=${prefix}/etc&lt;br /&gt;
 localstatedir=${prefix}/var&lt;br /&gt;
 acfdir=${datadir}/acf&lt;br /&gt;
 wwwdir=${acfdir}/www&lt;br /&gt;
 cgibindir=${acfdir}/cgi-bin&lt;br /&gt;
 appdir=${acfdir}/app&lt;br /&gt;
 acflibdir=${acfdir}/lib&lt;br /&gt;
 sessionsdir=${localstatedir}/lib/acf/sessions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Makefile:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Makefile is called to install our ACF application so that we can see it working.&lt;br /&gt;
 APP_NAME=myapp&lt;br /&gt;
 PACKAGE=acf-$(APP_NAME)&lt;br /&gt;
 VERSION=0.1&lt;br /&gt;
 &lt;br /&gt;
 APP_DIST=        \&lt;br /&gt;
         myapp*        \&lt;br /&gt;
 &lt;br /&gt;
 EXTRA_DIST=README Makefile config.mk&lt;br /&gt;
 &lt;br /&gt;
 DISTFILES=$(APP_DIST) $(EXTRA_DIST)&lt;br /&gt;
 &lt;br /&gt;
 TAR=tar&lt;br /&gt;
 &lt;br /&gt;
 P=$(PACKAGE)-$(VERSION)&lt;br /&gt;
 tarball=$(P).tar.bz2&lt;br /&gt;
 install_dir=$(DESTDIR)/$(appdir)/$(APP_NAME)&lt;br /&gt;
 &lt;br /&gt;
 all:&lt;br /&gt;
 clean:&lt;br /&gt;
 	rm -rf $(tarball) $(P)&lt;br /&gt;
 &lt;br /&gt;
 dist: $(tarball)&lt;br /&gt;
 &lt;br /&gt;
 install:&lt;br /&gt;
 	mkdir -p &amp;quot;$(install_dir)&amp;quot;&lt;br /&gt;
 	cp -a $(APP_DIST) &amp;quot;$(install_dir)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 $(tarball):     $(DISTFILES)&lt;br /&gt;
 	rm -rf $(P)&lt;br /&gt;
 	mkdir -p $(P)&lt;br /&gt;
 	cp $(DISTFILES) $(P)&lt;br /&gt;
 	$(TAR) -jcf $@ $(P)&lt;br /&gt;
 	rm -rf $(P)&lt;br /&gt;
 &lt;br /&gt;
 # target that creates a tar package, unpacks is and install from package&lt;br /&gt;
 dist-install: $(tarball)&lt;br /&gt;
 	$(TAR) -jxf $(tarball)&lt;br /&gt;
 	$(MAKE) -C $(P) install DESTDIR=$(DESTDIR)&lt;br /&gt;
 	rm -rf $(P)&lt;br /&gt;
 &lt;br /&gt;
 include config.mk&lt;br /&gt;
 &lt;br /&gt;
 .PHONY: all clean dist install dist-install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;myapp-controller.lua:&#039;&#039;&#039;&lt;br /&gt;
 -- the myapp controller&lt;br /&gt;
 local mymodule = {}&lt;br /&gt;
 &lt;br /&gt;
 mymodule.default_action = &amp;quot;myaction&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mymodule.myaction = function(self)&lt;br /&gt;
    -- self.clientdata contains the user data&lt;br /&gt;
    -- self.model points to our model&lt;br /&gt;
    -- use the helper function to implement our form&lt;br /&gt;
    return self.handle_form(self, self.model.getdata, self.model.setdata, self.clientdata, &amp;quot;Submit&amp;quot;, &amp;quot;Edit data&amp;quot;, &amp;quot;Data Submitted&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 return mymodule&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;myapp-model.lua:&#039;&#039;&#039;&lt;br /&gt;
 -- acf model for myapp&lt;br /&gt;
 local mymodule = {}&lt;br /&gt;
 &lt;br /&gt;
 local cfgfile = &amp;quot;/tmp/myfile&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 -- This function returns a cfe (table of values) containing the file&#039;s&lt;br /&gt;
 -- value as a string. If the file does not exist, we&#039;ll&lt;br /&gt;
 -- simply return &amp;quot;&amp;quot; (an empty string, but NOT nil)&lt;br /&gt;
 mymodule.getdata = function(self, clientdata)&lt;br /&gt;
    local retval = cfe({ type=&amp;quot;group&amp;quot;, value={}, label=&amp;quot;Data&amp;quot; })&lt;br /&gt;
    retval.value.data = cfe({ type=&amp;quot;longtext&amp;quot;, label=&amp;quot;Data&amp;quot; })&lt;br /&gt;
 &lt;br /&gt;
    local fileptr = io.open(cfgfile, &amp;quot;r&amp;quot;)&lt;br /&gt;
    if fileptr ~= nil then&lt;br /&gt;
       retval.value.data.value = fileptr:read(&amp;quot;*a&amp;quot;) or &amp;quot;&amp;quot;&lt;br /&gt;
       fileptr:close()&lt;br /&gt;
    end&lt;br /&gt;
 &lt;br /&gt;
    return retval&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This function will write new contents into our file&lt;br /&gt;
 -- The newdata parameter receives the same cfe as returned by getdata, now with the user data filled in&lt;br /&gt;
 mymodule.setdata = function(self, newdata, action)&lt;br /&gt;
    fileptr = io.open( cfgfile, &amp;quot;w+&amp;quot; )&lt;br /&gt;
    if fileptr ~= nil then&lt;br /&gt;
       fileptr:write(newdata.value.data.value)&lt;br /&gt;
       fileptr:close()&lt;br /&gt;
    else&lt;br /&gt;
       newdata.errtxt = &amp;quot;Failed to save data&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    return newdata&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 return mymodule&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;myapp.roles:&#039;&#039;&#039;&lt;br /&gt;
 GUEST=myapp:myaction&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;myapp.menu:&#039;&#039;&#039;&lt;br /&gt;
 # Cat   Group   Tab     Action&lt;br /&gt;
 Test    MyApp   MyAction  myaction&lt;br /&gt;
&lt;br /&gt;
===Step 6 - What Does It Do?===&lt;br /&gt;
This program just displays a &amp;amp;lt;textarea&amp;gt; box and a &amp;quot;Submit&amp;quot; button. The user can enter text that is saved into a file once he presses &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====In Depth====&lt;br /&gt;
Now let us have a closer look at the different files&#039; contents:&lt;br /&gt;
&lt;br /&gt;
=====myapp-controller.lua=====&lt;br /&gt;
The controller is an event dispatcher. So, here you define all the actions that the user can call or that are defined in the menu. Each action is a separate function that will receive &#039;&#039;self&#039;&#039; as the only parameter.&lt;br /&gt;
&lt;br /&gt;
In our case the action is &#039;&#039;myaction&#039;&#039; - a simple form.&lt;br /&gt;
&lt;br /&gt;
This function can call the &#039;&#039;model&#039;s&#039;&#039; functions to update and/or retrieve data (e.g. self.model.getdata()).&lt;br /&gt;
&lt;br /&gt;
Anything that this function returns will be passed on to the &#039;&#039;view&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=====myapp-model.lua=====&lt;br /&gt;
The functions defined in here can be accessed by the controller to update/set/retrieve data, start/stop services, basically do any &#039;real work&#039;.&lt;br /&gt;
&lt;br /&gt;
In our case, we have implemented the getdata/setdata functions required for a form.&lt;br /&gt;
&lt;br /&gt;
The getdata function receives a copy of &#039;self&#039;, a clientdata table, and a string containing the submit action. It will generate a &#039;CFE&#039; table defining the form and including the current data.&lt;br /&gt;
&lt;br /&gt;
The setdata function is only called when the form is submitted, and it receives a copy of &#039;self&#039; and the updated form &#039;CFE&#039; now containing the submitted data. The setdata function will attempt to perform the action, returning the same form &#039;CFE&#039;. If there is an error, it will fill in the errtxt field of the &#039;CFE&#039;.&lt;br /&gt;
&lt;br /&gt;
=====myapp.roles=====&lt;br /&gt;
This file determines which users have access to which controllers and views. A separate &#039;&#039;roles&#039;&#039; file is generally defined for each ACF. The format of the file is as follows:&lt;br /&gt;
 group=controller:action[,controller:action]&lt;br /&gt;
Each line defines controller:action combinations that are permitted for a particular group. &#039;&#039;&#039;GUEST&#039;&#039;&#039; is a special group to which all users, including anonymous users, are members.&lt;br /&gt;
&lt;br /&gt;
=====myapp.menu=====&lt;br /&gt;
In this file you define:&lt;br /&gt;
* &#039;&#039;&#039;The Category&#039;&#039;&#039; in which a menu entry for your program will appear&lt;br /&gt;
* &#039;&#039;&#039;The Group&#039;&#039;&#039; menu name under Category for this controller&lt;br /&gt;
* &#039;&#039;&#039;The Tab&#039;&#039;&#039; name on the controller page&lt;br /&gt;
* &#039;&#039;&#039;The Action&#039;&#039;&#039; with-in your controller that will be called once the user clicks on the menu entry or tab defined by Category, Group, and Tab.&lt;br /&gt;
&lt;br /&gt;
===Step 7 - How To Get It Going?===&lt;br /&gt;
Once you have completed all the above mentioned steps, go on with:&lt;br /&gt;
* sudo make install (this will install your app)&lt;br /&gt;
* point your browser to &amp;lt;nowiki&amp;gt;https://ip-of-your-dev-host/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===More Info===&lt;br /&gt;
====Where is the View?====&lt;br /&gt;
The above example does not contain any code for a view. So, how is the action getting displayed?&lt;br /&gt;
&lt;br /&gt;
For every action that you define in myapp-controller.lua, you can define a separate view file named: myapp-&#039;&#039;action&#039;&#039;-html.lsp&lt;br /&gt;
&lt;br /&gt;
If there is no view file for a specific action, the application will look for a generic view file for the controller named: myapp-html.lsp&lt;br /&gt;
&lt;br /&gt;
If that file does not exist, the ACF controller will attempt to display the &#039;CFE&#039; using the built-in library functions. This works well for forms, and is what allows us to display our view here.&lt;br /&gt;
&lt;br /&gt;
Here is a &#039;&#039;view&#039;&#039; file that displays our action using the built-in library functions. It looks exactly the same as when no view exists.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;myapp-myaction-html.lsp:&#039;&#039;&#039; &lt;br /&gt;
 &amp;lt;%&lt;br /&gt;
 local form, viewlibrary, page_info, session = ...&lt;br /&gt;
 htmlviewfunctions = require(&amp;quot;htmlviewfunctions&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 htmlviewfunctions.displayitem(form, page_info)&lt;br /&gt;
 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view receives the data to be displayed from the &#039;&#039;controller&#039;&#039;. The view has access to the table returned by the controller action along with a helper library, a table of page information, and the session data &#039;&#039;(see the second line)&#039;&#039;.  The view can also load other libraries, but it should not directly access the &#039;&#039;controller&#039;&#039;, &#039;&#039;model&#039;&#039;, or any global variables.&lt;br /&gt;
&lt;br /&gt;
====How to exchange data between model-view-controller?====&lt;br /&gt;
To exchange data between model, view, and controller ACF uses &#039;&#039;Configuration Framework Entities (CFEs)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Please see [[ACF_core_principles]] for further details on CFEs.&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* [[Acf-core-0.15_Release_Notes]] - Separation between ACF functionality and web interface.&lt;br /&gt;
* [[Web_elements.lua|Legacy ACF view patterns - web elements.lua]] – For historical reference only.&lt;br /&gt;
&lt;br /&gt;
[[Category:ACF]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Web_elements.lua&amp;diff=31917</id>
		<title>Web elements.lua</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Web_elements.lua&amp;diff=31917"/>
		<updated>2026-01-03T04:10:24Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Added Obsolete box:  refers to legacy 2012 version.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Obsolete|This version relates to the legacy Alpine Configuration Framework (ACF) (2012}}&lt;br /&gt;
&lt;br /&gt;
=== render_table ===&lt;br /&gt;
&#039;&#039;&#039;INPUT:&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
This library function required the following inputs/parameters.&lt;br /&gt;
* Element&lt;br /&gt;
** The element should be type &#039;table&#039;&lt;br /&gt;
** Element could be: group, label, html, log, link, form&lt;br /&gt;
* Level&lt;br /&gt;
** Level should be a &#039;number&#039;&lt;br /&gt;
&#039;&#039;&#039;OUTPUT:&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
This library function deliverers the following output/parameters.&lt;br /&gt;
* HTML&lt;br /&gt;
** HTML formated output/elements&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;The output is partially generated by html.lua&amp;lt;/span&amp;gt;&lt;br /&gt;
=== render_mainmenu ===&lt;br /&gt;
&#039;&#039;&#039;INPUT:&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
This library function required the following inputs/parameters.&lt;br /&gt;
* menu&lt;br /&gt;
* prefix&lt;br /&gt;
* controller&lt;br /&gt;
* action&lt;br /&gt;
&#039;&#039;&#039;OUTPUT:&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
This library function deliverers the following output/parameters.&lt;br /&gt;
* MainMenu (HTML)&lt;br /&gt;
** HTML formated output/elements&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;The output is partially generated by html.lua&amp;lt;/span&amp;gt;&lt;br /&gt;
=== render_submenu ===&lt;br /&gt;
&#039;&#039;&#039;INPUT:&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
This library function required the following inputs/parameters.&lt;br /&gt;
* menu&lt;br /&gt;
* group&lt;br /&gt;
* cat&lt;br /&gt;
* subcat&lt;br /&gt;
&#039;&#039;&#039;OUTPUT:&#039;&#039;&#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
This library function deliverers the following output/parameters.&lt;br /&gt;
* SubMenu (HTML)&lt;br /&gt;
** HTML formated output/elements&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;The output is partially generated by html.lua&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=31916</id>
		<title>Tutorials and Howtos</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=31916"/>
		<updated>2026-01-03T03:57:45Z</updated>

		<summary type="html">&lt;p&gt;John3-16: /* VPN */ Added Vpnc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:package_edutainment.svg|right|link=]]&lt;br /&gt;
{{TOC left}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Welcome to Tutorials and Howtos, a place of basic and advanced configuration tasks for your Alpine Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Howtos are smaller articles&#039;&#039;&#039; explaining how to perform a particular task with Alpine Linux, that expects a minimal knowledge from reader to perform actions. Howto&#039;s have been organized in the below page based on the topics.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The [[#Tutorials|tutorials]] are hands-on&#039;&#039;&#039; and the reader is expected to try and achieve the goals described in each step, possibly with the help of a good example. The output in one step is the starting point for the following step.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
* Contributors are requested to refer to [[Help:Editing]] first and make use of resources like [[How to write a HOWTO]].&lt;br /&gt;
* Contributions must be complete articles. &lt;br /&gt;
* Don&#039;t override already made contributions, unless there is a mistake. &lt;br /&gt;
* If you want to request a topic, please add your request in this page&#039;s [[Talk:Tutorials_and_Howtos|Discussion]].}}&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
* {{:Daily driver guide}}&lt;br /&gt;
&lt;br /&gt;
=== Networking ===&lt;br /&gt;
&lt;br /&gt;
* [[Bluetooth]] - Instructions for installing and configuring Bluetooth&lt;br /&gt;
* [[Bonding]] - Bond (or aggregate) multiple ethernet interfaces&lt;br /&gt;
* [[Bridge]] - Configuring a network bridge&lt;br /&gt;
** [[Bridge wlan0 to eth0]]&lt;br /&gt;
* [[Configure Networking]]&lt;br /&gt;
* [[How to configure static routes]]&lt;br /&gt;
* Modem&lt;br /&gt;
** [[Using HSDPA modem]]&lt;br /&gt;
** [[Using serial modem]]&lt;br /&gt;
* [[mDNS]] - Howto implement multicast DNS resolution in Alpine. &lt;br /&gt;
* [[Multi ISP]] &#039;&#039;(Dual-ISP setup with load-balancing and automatic failover)&#039;&#039;&lt;br /&gt;
* [[PXE boot]]&lt;br /&gt;
* Wi-Fi&lt;br /&gt;
** [[Wi-Fi|Connecting to a wireless access point]]&lt;br /&gt;
** [[How to setup a wireless access point]] &#039;&#039;(Setting up Secure Wireless AP w/ WPA encryption with bridge to wired network)&#039;&#039;&lt;br /&gt;
* Use [https://github.com/ifupdown-ng/ifupdown-ng/blob/main/doc/interfaces-vxlan.scd vxlan], if using  [[Ifupdown-ng]] instead of [[VLAN]]&lt;br /&gt;
* [[Setting up a Home Router]]&lt;br /&gt;
&lt;br /&gt;
=== Backup and data migration ===&lt;br /&gt;
&lt;br /&gt;
* [[Migrating data]]&lt;br /&gt;
* [[Rsnapshot]] - setting up periodic backups&lt;br /&gt;
&lt;br /&gt;
=== Other topics ===&lt;br /&gt;
&lt;br /&gt;
* [[Gaming on Alpine]]&lt;br /&gt;
* [[Remote Desktop Server]]&lt;br /&gt;
* [[Default applications|How to change default application]]&lt;br /&gt;
* [[CPU frequency scaling]]&lt;br /&gt;
* [[Mimalloc]]&lt;br /&gt;
* [[Enable Serial Console on Boot]]&lt;br /&gt;
* [[How to build the Alpine Linux kernel]]&lt;br /&gt;
* [[Nextcloud]] &#039;&#039;(Self hostable cloud suite - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Setting up lm_sensors]]&lt;br /&gt;
* [[Fingerprint Authentication with swaylock]]&lt;br /&gt;
* [[Desktop environments and Window managers|List of supported Desktop environments and Window managers]]&lt;br /&gt;
&lt;br /&gt;
== Diskless ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]]&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
&lt;br /&gt;
== Other Architectures ==&lt;br /&gt;
&lt;br /&gt;
=== ARM ===&lt;br /&gt;
&lt;br /&gt;
* [[Alpine on ARM]]&lt;br /&gt;
&lt;br /&gt;
==== Raspberry Pi ====&lt;br /&gt;
&lt;br /&gt;
* [[Raspberry Pi|Raspberry Pi main page]]&lt;br /&gt;
* [[Raspberry Pi Bluetooth Speaker|Raspberry Pi - Bluetooth Speaker]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi|Raspberry Pi - Router with VPN]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi (IPv6)|Raspberry Pi - Router with VPN (IPv6)]]&lt;br /&gt;
* [[Classic install or sys mode on Raspberry Pi|Raspberry Pi - Sys mode install]]&lt;br /&gt;
* [[Raspberry Pi LVM on LUKS|Raspberry Pi - Sys mode install - LVM on LUKS]]&lt;br /&gt;
* [[RPI Video Receiver|Raspberry Pi - Video Receiver]] &#039;&#039;(network video decoder using Rasperry Pi and omxplayer)&#039;&#039;&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]] - kiosk or digital sign&lt;br /&gt;
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]&lt;br /&gt;
* [[Raspberry Pi 3 - Setting Up Bluetooth]]&lt;br /&gt;
* [[Raspberry Pi 4 - Persistent system acting as a NAS and Time Machine]]&lt;br /&gt;
* [[How to set up Alpine as a wireless router|Raspberry Pi Zero W - Wireless router]] &#039;&#039;(Setting up a firewalled, Wireless AP with wired network on a Pi Zero W)&#039;&#039;&lt;br /&gt;
* [[RPI Video Receiver]]&lt;br /&gt;
&lt;br /&gt;
=== IBM Z (IBM z Systems) ===&lt;br /&gt;
&lt;br /&gt;
* [[s390x|s390x - Installation]]&lt;br /&gt;
&lt;br /&gt;
=== PowerPC ===&lt;br /&gt;
&lt;br /&gt;
* [[Ppc64le|Powerpc64le - Installation]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[#Desktop security|Desktop security]] lists steps for securing Alpine Linux desktops&lt;br /&gt;
* [[Setting up a laptop]] page has detailed guidelines to configure a secured laptop&lt;br /&gt;
* [[Securing Alpine Linux|Secure Alpine Linux]] using Security Technical Implementation Guides (STIGs)&lt;br /&gt;
&lt;br /&gt;
== Services == &lt;br /&gt;
&lt;br /&gt;
{{Note| Services are arranged in alphabetical order.}}&lt;br /&gt;
&lt;br /&gt;
=== Content management systems ===&lt;br /&gt;
&lt;br /&gt;
* [[DokuWiki]] &#039;&#039;(Simple and easy to use wiki, no database required)&#039;&#039;&lt;br /&gt;
* [[Drupal]] &#039;&#039;(Content Management System (CMS) written in PHP)&#039;&#039;&lt;br /&gt;
* [[Kopano]] &#039;&#039;(Microsoft Outlook compatible Groupware)&#039;&#039;&lt;br /&gt;
* [[Mahara]] &#039;&#039;(E-portfolio and social networking system)&#039;&#039;&lt;br /&gt;
* [[MediaWiki]] &#039;&#039;(Free web-based wiki software application)&#039;&#039;&lt;br /&gt;
* [[Pastebin]] &#039;&#039;(Pastebin software application)&#039;&#039;&lt;br /&gt;
* [[WordPress]] &#039;&#039;(Web software to create website or blog)&#039;&#039;&lt;br /&gt;
* [[Moodle]] &#039;&#039;(Online Learning Management system)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Database === &lt;br /&gt;
&lt;br /&gt;
* [[MariaDB]] or [[MySQL|MySQL]]&lt;br /&gt;
&lt;br /&gt;
=== DNS ===&lt;br /&gt;
&lt;br /&gt;
* [[DNSCrypt-Proxy]] &#039;&#039;Encrypt and authenticate DNS calls from your system&#039;&#039;&lt;br /&gt;
* [[Setting up nsd DNS server]]&lt;br /&gt;
* [[Small-Time DNS with BIND9]] &#039;&#039;(A simple configuration with ad blocking for your home network)&#039;&#039;&lt;br /&gt;
* Unbound&lt;br /&gt;
** [[Setting up unbound DNS server]]&lt;br /&gt;
** [[Using Unbound as an Ad-blocker]] &#039;&#039;(Setup ad blocking for your network)&#039;&#039;&lt;br /&gt;
* [[TinyDNS Format]]&lt;br /&gt;
&lt;br /&gt;
=== File server ===&lt;br /&gt;
&lt;br /&gt;
* [[Setting up an NFS server|nfs-server]]&lt;br /&gt;
* [[Setting up a Samba server|samba-server]] &#039;&#039;(standard file sharing)&#039;&#039;&lt;br /&gt;
* [[Setting up a samba-ad-dc|samba-ad-dc]] &#039;&#039;(Active Directory compatible domain controller)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
&lt;br /&gt;
* [https://git.alpinelinux.org/awall/about/ Alpine Wall User&#039;s Guide]&lt;br /&gt;
** [[Zero-To-Awall]] -&#039;&#039;AWall for dummies&#039;&#039;&lt;br /&gt;
** [[How-To Alpine Wall]] - &#039;&#039;AWall for Shorewall users&#039;&#039;&lt;br /&gt;
** [[Alpine Wall]] - &#039;&#039;AWall - Firewall management framework - Design Document&#039;&#039;&lt;br /&gt;
* [[Iptables]]&lt;br /&gt;
* [[nftables]]&lt;br /&gt;
* [[Uncomplicated Firewall|Uncomplicated Firewall or UFW]]&lt;br /&gt;
&lt;br /&gt;
=== HTTP and web services ===&lt;br /&gt;
&lt;br /&gt;
* [[Althttpd]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
** [[Apache with php-fpm]]&lt;br /&gt;
** [[Setting Up Apache with PHP]]&lt;br /&gt;
** [[Apache authentication: NTLM Single Signon]]&lt;br /&gt;
* [[Darkhttpd]]&lt;br /&gt;
* [[Lighttpd]]&lt;br /&gt;
** [[Lighttpd Advanced security]]&lt;br /&gt;
** [[Setting Up Lighttpd With FastCGI]]&lt;br /&gt;
** [[Production Web server: Lighttpd|Production web server: Lighttpd‎‎]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
** [[Nginx as reverse proxy with acme (letsencrypt)]]&lt;br /&gt;
** [[Nginx with PHP]]&lt;br /&gt;
* Squid Proxy&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
** [[Setting up Explicit Squid Proxy]]&lt;br /&gt;
** [[Setting up Transparent Squid Proxy]] &#039;&#039;(Covers Squid proxy and URL Filtering system)&#039;&#039;&lt;br /&gt;
** [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
* [[Tomcat]]&lt;br /&gt;
** [[Production LAMP system: Lighttpd + PHP + MySQL‎‎|Production LAMP system: Lighttpd + PHP + MariaDB/MySQL‎‎]]&lt;br /&gt;
&lt;br /&gt;
=== IRC ===&lt;br /&gt;
&lt;br /&gt;
* [[NgIRCd]] &#039;&#039;(Server for Internet Relay Chat/IRC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Mail ===&lt;br /&gt;
&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(Hosting mail, webservices and other services)&#039;&#039;&lt;br /&gt;
* [[Hosting Web/Email services on Alpine]]&lt;br /&gt;
* Exim/Dovecot&lt;br /&gt;
** [[Small-Time Email with Exim and Dovecot]] &#039;&#039;(A simple configuration for your home network.)&lt;br /&gt;
** [[Setting up dovecot with imap and tls]]&lt;br /&gt;
* [[relay email to gmail (msmtp, mailx, sendmail]]&lt;br /&gt;
* [[relay email (nullmailer)]]&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Setting up postfix with virtual domains]]&lt;br /&gt;
* Server protection&lt;br /&gt;
** [[Setting up clamsmtp]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring ===&lt;br /&gt;
&lt;br /&gt;
* [[Awstats]] &#039;&#039;(Free log file analyzer)&#039;&#039;&lt;br /&gt;
* [[Cacti: traffic analysis and monitoring network]] &#039;&#039;(Front-end for rrdtool networking monitor)&#039;&#039;&lt;br /&gt;
* [[Cvechecker]] &#039;&#039;(Compare installed packages for Common Vulnerabilities Exposure)&#039;&#039; &amp;lt;!-- Monitoring and Security --&amp;gt;&lt;br /&gt;
* [[Linfo]]&lt;br /&gt;
* [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[PhpSysInfo]] &#039;&#039;(A simple application that displays information about the host it&#039;s running on)&#039;&#039;&lt;br /&gt;
* [[Logcheck]] &#039;&#039;(log file monitoring tool)&#039;&#039;&lt;br /&gt;
* [[Matomo]] &#039;&#039;(A real time web analytics software program)&#039;&#039;&lt;br /&gt;
* [[Rasdaemon]] &#039;&#039;(Platform Reliability, Availability and Serviceability monitoring tool)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft, solution, Networking and Monitoring and Server --&amp;gt;&lt;br /&gt;
** [[Setting up NRPE daemon]] &#039;&#039;(Performs remote Nagios checks)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting Up Fprobe And Ntop|Ntop]] &#039;&#039;(NetFlow collection and analysis using a remote fprobe instance; for alpine 3.10-3.12 only)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
* [[Traffic monitoring]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
** [[Setting up monitoring using rrdtool (and rrdcollect)]]&lt;br /&gt;
** [[Setting up traffic monitoring using rrdtool (and snmp)]] &amp;lt;!-- Monitoring --&amp;gt;&lt;br /&gt;
* [[Zabbix|Zabbix - the professional complete manager]] &#039;&#039;(Monitor and track the status of network services and hardware)&#039;&#039;&lt;br /&gt;
* [[ZoneMinder video camera security and surveillance]]&lt;br /&gt;
&lt;br /&gt;
=== Remote Administration ===&lt;br /&gt;
&lt;br /&gt;
* ACF&lt;br /&gt;
** [[Changing passwords for ACF|ACF - changing passwords]]&lt;br /&gt;
** [[Generating SSL certs with ACF]] &amp;lt;!-- Generating SSL certs with ACF 1.9 --&amp;gt;&lt;br /&gt;
** [[setup-acf| ACF - setup]] &#039;&#039;(Configures ACF (webconfiguration/webmin) so you can manage your box through https)&#039;&#039;&lt;br /&gt;
* [[Setting up a SSH server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator |OpenSSH 2FA]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
* [[OpenVCP]] &#039;&#039;(VServer Control Panel)&#039;&#039;&lt;br /&gt;
* [[PhpMyAdmin]] &#039;&#039;(Web-based administration tool for MYSQL)&#039;&#039;&lt;br /&gt;
* [[PhpPgAdmin]] &#039;&#039;(Web-based administration tool for PostgreSQL)&#039;&#039;&lt;br /&gt;
* [[Webmin]] &#039;&#039;(A web-based interface for Linux system)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Telephony ===&lt;br /&gt;
&lt;br /&gt;
* [[FreePBX|FreePBX on Alpine Linux]]&lt;br /&gt;
* [[Setting up Zaptel/Asterisk on Alpine]]&lt;br /&gt;
* [[Kamailio]] &#039;&#039;(SIP Server, formerly OpenSER)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== VPN ===&lt;br /&gt;
* [[Freeradius Active Directory Integration]]&lt;br /&gt;
* [[GNUnet]]&lt;br /&gt;
* [[IGMPproxy]]&lt;br /&gt;
* [[Setting up a OpenVPN server|OpenVPN server]] &#039;&#039;(Allowing single users or devices to remotely connect to your network)&#039;&#039;&lt;br /&gt;
* [[OpenVSwitch]]&lt;br /&gt;
* [[Tor]]&lt;br /&gt;
* [[Using Alpine on Windows domain with IPSEC isolation]]&lt;br /&gt;
* [[Configure a Wireguard interface (wg)|Wireguard]]&lt;br /&gt;
* [[Vpnc]]&lt;br /&gt;
&lt;br /&gt;
=== Other Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[apcupsd]] &#039;&#039;(UPS Monitoring with apcupsd)&#039;&#039;&lt;br /&gt;
* [[Chrony and GPSD | Chrony, gpsd, and a garmin LVC 18 as a Stratum 1 NTP source ]]&lt;br /&gt;
* [[Glpi]] &#039;&#039;(Manage inventory of technical resources)&#039;&#039;&lt;br /&gt;
* [[How to setup a Alpine Linux mirror]]&lt;br /&gt;
* [[nut-ups|NUT UPS]] &#039;&#039;(UPS Monitoring with Network UPS Tools)&#039;&#039;&lt;br /&gt;
* [[Odoo]]&lt;br /&gt;
* [[Configure OpenLDAP | OpenLDAP]] &#039;&#039;(Installing and configuring the Alpine package for OpenLDAP)&#039;&#039;&lt;br /&gt;
* [[Setting up a LLDAP server|lldap-server]] &#039;&#039;(Directory Server)&#039;&#039;&lt;br /&gt;
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Software development ==&lt;br /&gt;
&lt;br /&gt;
* [[Cgit]]&lt;br /&gt;
* [[OsTicket]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Patchwork]] &#039;&#039;(Patch review management system)&#039;&#039;&lt;br /&gt;
* [[Redmine]] &#039;&#039;(Project management system) [Deprecated]&#039;&#039;&lt;br /&gt;
* [[Request Tracker]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Setting up trac wiki|Trac]] &#039;&#039;(Enhanced wiki and issue tracking system for software development projects)&#039;&#039;&lt;br /&gt;
* [[Ansible]] &#039;&#039;(Configuration management)&#039;&#039;&lt;br /&gt;
* [[Installing Oracle Java|Oracle Java (installation)]]&lt;br /&gt;
&lt;br /&gt;
== Storage ==&lt;br /&gt;
&lt;br /&gt;
* [[Setting up disks manually|Manual partitioning]]&lt;br /&gt;
* [[Disk Replication with DRBD|DRBD: Disk Replication]]&lt;br /&gt;
* [[Filesystems]]&lt;br /&gt;
** [[Burning ISOs]]&lt;br /&gt;
* [[Setting up iSCSI|iSCSI Setup]]&lt;br /&gt;
** [[iSCSI Raid and Clustered File Systems]]&lt;br /&gt;
** [[Linux iSCSI Target (TCM)|iSCSI Target (TCM)/LinuxIO (LIO)]]&lt;br /&gt;
** [[Linux iSCSI Target (tgt)|User space iSCSI Target (tgt)]]&lt;br /&gt;
* [[Setting up Logical Volumes with LVM|LVM Setup]]&lt;br /&gt;
** [[Setting up LVM on GPT-labeled disks|LVM on GPT-labeled disks]]&lt;br /&gt;
** [[Installing on GPT LVM|LVM on GPT-labeled disks (updated)]]&lt;br /&gt;
** [[LVM on LUKS]]&lt;br /&gt;
* RAID&lt;br /&gt;
** [[Raid Administration]]&lt;br /&gt;
** [[Setting up a software RAID array]]&lt;br /&gt;
* [[ZFS]]&lt;br /&gt;
** [[Root on ZFS with native encryption]]&lt;br /&gt;
** [[Setting up ZFS on LUKS]]&lt;br /&gt;
* [[CEPH|CEPH]]&lt;br /&gt;
&lt;br /&gt;
== Virtualization ==&lt;br /&gt;
&lt;br /&gt;
* [[Docker]]&lt;br /&gt;
* [[Installing Alpine in a virtual machine]]&lt;br /&gt;
** [[Install Alpine on VMware ESXi]]&lt;br /&gt;
* [[KVM]] &#039;&#039;(Setting up Alpine as a KVM hypervisor)&#039;&#039;&lt;br /&gt;
* [[LXC]] &#039;&#039;(Setting up a Linux container in Alpine Linux)&#039;&#039;&lt;br /&gt;
* [[QEMU]]&lt;br /&gt;
* Xen&lt;br /&gt;
** [[Xen Dom0]] &#039;&#039;(Setting up Alpine as a dom0 for Xen hypervisor)&#039;&#039;&lt;br /&gt;
** [[Xen Dom0 on USB or SD]]&lt;br /&gt;
** [[Create Alpine Linux PV DomU|Xen DomU (paravirtualized)]]&lt;br /&gt;
** [[Xen LiveCD]]&lt;br /&gt;
** [[Xen PCI Passthrough]]&lt;br /&gt;
** [[K8s]] Building a K8s Kubernetes Cluster on Alpine Linux&lt;br /&gt;
* [[Runc]]&lt;br /&gt;
&lt;br /&gt;
== [[Simple_Walkthrough]] ==&lt;br /&gt;
* [[About-virtualization-simple]]&lt;br /&gt;
* [[LXC_Alpinelinux_Simple]]&lt;br /&gt;
* [[Qemu-simple]]&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
* [[TTY_Autologin|TTY Autologin]]&lt;br /&gt;
* [[Kexec|Faster rebooting with kexec]]&lt;br /&gt;
* [[Dynamic Multipoint VPN (DMVPN)]] combined with [[Small Office Services]]&lt;br /&gt;
* [[DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]]&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039;&lt;br /&gt;
* [[Linux iSCSI Target (TCM)]]&lt;br /&gt;
* [[ISP Mail Server 3.x HowTo]] &#039;&#039;(Postfix+PostfixAdmin+DoveCot+Roundcube+ClamAV+Spamd - A full-service ISP mail server)&#039;&#039;&lt;br /&gt;
* [[Grommunio Mail Server]] &#039;&#039;(Mariadb+Postfix+Rspamd+Grommunio - Full-service mail server as MS exchange replacement)&#039;&#039;&lt;br /&gt;
* [[Replacing non-Alpine Linux with Alpine remotely]]&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
* [[Streaming Security Camera Video with VLC]]&lt;br /&gt;
* [[Install Alpine on a btrfs filesystem with refind as boot manager]]&lt;br /&gt;
* [[Compile software from source|How to Compile a software from source in Alpine Linux]]&lt;br /&gt;
* [https://ww2.coastal.edu/mmurphy2/oer/alpine/ Alpine Linux tutorials - Dr Murphy, Computing Science Associate Professor]&lt;br /&gt;
* [[Michael&#039;s base installation procedure|Michael&#039;s base installation procedure]]&lt;br /&gt;
* [[Michael&#039;s cwm  desktop (minimal)|Michael&#039;s cwm desktop (minimal)]]&lt;br /&gt;
* [[Michael&#039;s sway desktop (minimal)|Michael&#039;s Sway desktop (minimal)]]&lt;br /&gt;
* [[Sway_customization_guide|Sway customization guide]] &#039;&#039;(Tutorial re Sway config file basics)&#039;&#039;&lt;br /&gt;
* [[Using Distrobox For VR Gaming|Using Distrobox For VR Gaming]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setting_up_a_Home_Router&amp;diff=31915</id>
		<title>Setting up a Home Router</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setting_up_a_Home_Router&amp;diff=31915"/>
		<updated>2026-01-03T03:44:12Z</updated>

		<summary type="html">&lt;p&gt;John3-16: Added /*See also */ : Setting up a wireless AP with udhcpd and NAT (page had been orphaned).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{Expand|To include information on ipv6}}&lt;br /&gt;
&lt;br /&gt;
This HowTo is written to indicate the basics necessary to get a simple router set up for a network. Unlike most HowTos, this will not form an exhaustive list of instructions, as a home router is not one piece of software, and not every piece of software listed here will be relevant to your specific requirements. Moreover, the individual pieces of software themselves, in particular firewalls, require configuration which requires documentation in their own right.&lt;br /&gt;
&lt;br /&gt;
As such this HowTo will indicate the relevant pieces of software, and link to the corresponding documentation. It will also contain some more general guidance.&lt;br /&gt;
&lt;br /&gt;
== Before You Start ==&lt;br /&gt;
&lt;br /&gt;
=== You should know ===&lt;br /&gt;
&lt;br /&gt;
This article presumes that you are familiar with the fundamentals of IP networks. In particular you should have a good understanding of the terms:&lt;br /&gt;
&lt;br /&gt;
* IP Address&lt;br /&gt;
* Address Mask&lt;br /&gt;
* Subnet&lt;br /&gt;
* CIDR (Notation of the form 192.168.1.0/24)&lt;br /&gt;
&lt;br /&gt;
==Enable Routing and Set Up Routes==&lt;br /&gt;
&lt;br /&gt;
The clue is in the name that routing is at the heart of what a router does.&lt;br /&gt;
&lt;br /&gt;
To enable routing, you will need to add a line&lt;br /&gt;
&amp;lt;code&amp;gt;net.ipv4.ip_forward=1&amp;lt;/code&amp;gt; to the file /etc/sysctl.conf and then run &lt;br /&gt;
&amp;lt;code&amp;gt;sysctl -p&amp;lt;/code&amp;gt; with administrative privileges.&lt;br /&gt;
&lt;br /&gt;
If you have subnets managed by their own routers in your network, you may need to add [[How to configure static routes|static routing]].&lt;br /&gt;
&lt;br /&gt;
Dynamic routing is an advanced topic which goes beyond the range of this HowTo.&lt;br /&gt;
&lt;br /&gt;
==Configuring Network Interfaces==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, routers are in charge of their own IP addresses, as such you will need to understand how to [[Configure Networking#Static address configuration|configure static IP addresses on the interfaces]].&lt;br /&gt;
&lt;br /&gt;
==Connecting to the Internet - pppd==&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you are planning on connecting your router directly to the internet, you should have a firewall in place. See next section.}}&lt;br /&gt;
&lt;br /&gt;
If you are looking to connect your router directly to the internet without using the router from your ISP, then you will need to configure pppd. The documentation for pppd can be found [https://linux.die.net/man/8/pppd here].&lt;br /&gt;
&lt;br /&gt;
On a practical note, it is helpful to download pppd and your firewall of choice using your ISPs provided router and configure them prior to connecting your home-made router to the internet directly.&lt;br /&gt;
&lt;br /&gt;
==Firewalls==&lt;br /&gt;
&lt;br /&gt;
Firewalls At the time of writing, there are three main firewall options available of which the author is aware:&lt;br /&gt;
&lt;br /&gt;
* [[Uncomplicated Firewall|ufw - the uncomplicated firewall]]&lt;br /&gt;
* [https://wiki.nftables.org/wiki-nftables/index.php/Main_Page nftables]&lt;br /&gt;
* IPTables is also an option - but be advised that it is an older piece of software with a somewhat arcane syntax. It has been superseded by nftables.&lt;br /&gt;
&lt;br /&gt;
==DHCP Server==&lt;br /&gt;
&lt;br /&gt;
A DHCP server is responsible for assigning dynamic IP addresses to computers attached to your network.&lt;br /&gt;
&lt;br /&gt;
If your network is small enough, and the constituent computers do not change regularly, you might consider sticking with static (manually) assigned IP addresses. However, beyond a certain size and/or if you have changing members of your network (for example, house guests using your wi-fi), then DHCP becomes quite important.&lt;br /&gt;
&lt;br /&gt;
The only DHCP server that the author was able to install and operate from the default repositories at the time of writing was [https://dnsmasq.org/docs/dnsmasq-man.html dnsmasq.]&lt;br /&gt;
&lt;br /&gt;
==Hosting Wi-Fi==&lt;br /&gt;
&lt;br /&gt;
See [[How to setup a wireless access point]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Wireless_AP_with_udhcpd_and_NAT|Setting up a wireless AP with udhcpd and NAT]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Remote_Desktop_Server&amp;diff=31914</id>
		<title>Remote Desktop Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Remote_Desktop_Server&amp;diff=31914"/>
		<updated>2026-01-03T03:13:16Z</updated>

		<summary type="html">&lt;p&gt;John3-16: 1. Added &amp;#039;X11vnc&amp;#039; stub.  2. Promoted &amp;#039;Remmina as client&amp;#039; section to top-level, instead of being a server under &amp;#039;Remote Desktop Server based on Vino and XRDP&amp;#039;;  3. Added intro for Remmina;  4.  Amended soft link to startplasma-x11: should typically be done as user;  5. Assumption stated that &amp;#039;community&amp;#039; is enabled instead of using @community tag;  6. Style/grammar amendments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These guides assume that the community repo [[Enable_Community_Repository|has been enabled]].&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Server Based on XRDP and xorgxrdp ==&lt;br /&gt;
&lt;br /&gt;
This was tested and works for v 3.17.2 with [[Xfce]] as the desktop.&lt;br /&gt;
&lt;br /&gt;
First ensure that the desktop is working without remote access (if feasible).&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|xrdp}} and {{Pkg|xorgxrdp}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; apk add xrdp xorgxrdp}}&lt;br /&gt;
&lt;br /&gt;
Start the necessary services:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; rc-service xrdp start&lt;br /&gt;
&amp;amp;#35; rc-service xrdp-sesman start}}&lt;br /&gt;
&lt;br /&gt;
After testing that this works, you may set the services to start automatically:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; rc-update add xrdp&lt;br /&gt;
&amp;amp;#35; rc-update add xrdp-sesman}}&lt;br /&gt;
&lt;br /&gt;
That should be all that is needed to connect from a Windows client with its default &amp;quot;Remote Desktop&amp;quot; client.  The xrdp configuration file though will contain several services that will not work, so to remove them, edit {{Pkg|/etc/xrdp/xrdp.ini}} and remove all lines from, and including: {{ic|[Xvnc]}} to the end. &lt;br /&gt;
&lt;br /&gt;
Note: If you are using KDE, please a link as follows so that there is no screen after logging in:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ ln -s /usr/bin/startplasma-x11 ~/.xinitrc}}&lt;br /&gt;
&lt;br /&gt;
{{ic|doas}} should only be used for that command if {{Path|~/.xinitrc}} is owned by root or by another user, but that would be atypical for a user-specific configuration.&lt;br /&gt;
&lt;br /&gt;
{{Note|From v3.22 upwards, xrdp is broken in combination with KDE, because only Wayland is supported with KDE: [[https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.22.0|since v3.22]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Server based on Vino and XRDP ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THIS DOES NOT WORK on 3.17.2 with Xfce - Not Yet Deleted in Case it helps others&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First of all, make sure that you have a desktop environment properly installed (See: [[Desktop environments and Window managers]]).&lt;br /&gt;
&lt;br /&gt;
Next, install {{Pkg|vino}} and {{Pkg|xrdp}} with the following command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;amp;#35; apk add vino xrdp}}&lt;br /&gt;
&lt;br /&gt;
Replace the {{Path|/etc/xrdp/xrdp.ini}} file&#039;s content with:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/xrdp/xrdp.ini|&amp;lt;nowiki&amp;gt;[globals]&lt;br /&gt;
bitmap_cache=yes&lt;br /&gt;
bitmap_compression=yes&lt;br /&gt;
port=3389&lt;br /&gt;
crypt_level=low&lt;br /&gt;
channel_code=1&lt;br /&gt;
max_bpp=24&lt;br /&gt;
&lt;br /&gt;
[xrdp1]&lt;br /&gt;
name=Vino&lt;br /&gt;
lib=libvnc.so&lt;br /&gt;
ip=127.0.0.1&lt;br /&gt;
port=5900&lt;br /&gt;
username=ask&lt;br /&gt;
password=ask&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you want the XRDP service to start automatically, add the services to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rc-update add xrdp&lt;br /&gt;
&amp;amp;#35; rc-update add xrdp-sesman&lt;br /&gt;
&amp;amp;#35; rc-update add vino}}&lt;br /&gt;
&lt;br /&gt;
To start:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rc-service xrdp start&lt;br /&gt;
&amp;amp;#35; rc-service xrdp-sesman start&lt;br /&gt;
&amp;amp;#35; rc-service vino start}}&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
&lt;br /&gt;
==== Disabling XRDP Notification and Confirmation ====&lt;br /&gt;
&lt;br /&gt;
If you do not want the client confirmation before the session being accepted:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;export DISPLAY=:0.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Cmd|gsettings set org.gnome.Vino notify-on-connect false&lt;br /&gt;
gsettings set org.gnome.Vino prompt-enabled false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== X11vnc ==&lt;br /&gt;
{{Main|X11vnc}}&lt;br /&gt;
[[X11vnc]] enables connection to the active X11 session, so one sees what is on the physical display, to include login screens and onscreen applications.  Unlike certain VNC servers that launch a virtual desktop, it does not create an additional X session and is therefore leaner.&lt;br /&gt;
&lt;br /&gt;
== Remmina as client ==&lt;br /&gt;
{{Draft}}&lt;br /&gt;
Remmina is a remote desktop client that can connect to servers such as x11vnc, XRDP, and Windows RDP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Administration]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
</feed>