<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openclonk.org/index.php?action=history&amp;feed=atom&amp;title=Server_Setup</id>
	<title>Server Setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openclonk.org/index.php?action=history&amp;feed=atom&amp;title=Server_Setup"/>
	<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Server_Setup&amp;action=history"/>
	<updated>2026-04-29T00:06:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://wiki.openclonk.org/index.php?title=Server_Setup&amp;diff=1929&amp;oldid=prev</id>
		<title>Luchs: Notes on adding new applications</title>
		<link rel="alternate" type="text/html" href="https://wiki.openclonk.org/index.php?title=Server_Setup&amp;diff=1929&amp;oldid=prev"/>
		<updated>2020-07-20T14:48:11Z</updated>

		<summary type="html">&lt;p&gt;Notes on adding new applications&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Admin notes on the openclonk.org server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Each application (e.g., mwforum, mediawiki, ...) runs under its own user and is managed by a systemd user instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Adding a new application ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Create a new user:&lt;br /&gt;
# adduser $APP&lt;br /&gt;
&lt;br /&gt;
Enable systemd user units without logging in:&lt;br /&gt;
# loginctl enable-linger $APP&lt;br /&gt;
&lt;br /&gt;
Create unit files:&lt;br /&gt;
# sudo -iu $APP&lt;br /&gt;
$ mkdir -p ~/.config/systemd/user&lt;br /&gt;
$ vim ~/.config/systemd/user/$APP.service&lt;br /&gt;
$ systemctl --user enable --now $APP.service&lt;br /&gt;
&lt;br /&gt;
Allow nginx access to files in /home/$APP by adding nginx to the app&amp;#039;s group:&lt;br /&gt;
# usermod -aG $APP nginx&lt;br /&gt;
Note: SELinux only allows nginx access to files in /home/$APP/www&lt;br /&gt;
&lt;br /&gt;
Listen on Unix socket for nginx:&lt;br /&gt;
# echo &amp;quot;d /run/$APP 0750 $APP $APP&amp;quot; &amp;gt; /etc/tmpfiles.d/$APP.conf&lt;br /&gt;
# semanage fcontext -a -t httpd_var_run_t &amp;quot;/var/run/$APP(/.*)?&amp;quot;&lt;br /&gt;
# systemd-tmpfiles --create&lt;br /&gt;
Now let the application create its socket in /run/$APP/&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Luchs</name></author>
	</entry>
</feed>