<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://eden.sahanafoundation.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dominic</id>
	<title>Sahana Eden Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://eden.sahanafoundation.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dominic"/>
	<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/wiki/Special:Contributions/Dominic"/>
	<updated>2026-04-27T13:02:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=273</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=273"/>
		<updated>2026-02-04T07:52:03Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Configuring Key-based Login */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with the database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host. In these places, replace the designation with the respective IP address.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden Account ==&lt;br /&gt;
&lt;br /&gt;
Login to the DB Host and create a user account for Eden:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
adduser eden&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt; to add the following lines to the &#039;&#039;sudoers&#039;&#039; configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# User rules for eden&lt;br /&gt;
eden ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow Eden to become &#039;&#039;root&#039;&#039; without password.&lt;br /&gt;
&lt;br /&gt;
== Configuring Key-based Login ==&lt;br /&gt;
&lt;br /&gt;
On your local machine, generate a new RSA key pair:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f eden -C &amp;quot;eden&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Leave the password empty as this key is to be used for script automation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will generate two files, &#039;&#039;eden&#039;&#039; (=private key) and &#039;&#039;eden.pub&#039;&#039; (=public key), in the current directory. Install the public key on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat eden.pub | ssh eden@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the private key to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp eden admin@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host and store the key in a safe location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
cp /tmp/eden ~/.ssh&lt;br /&gt;
chown root.root ~/.ssh/eden&lt;br /&gt;
chmod 600 ~/.ssh/eden&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verify that you can use this key to SSH-login from the App Host to the DB Host (via private IP), as user &#039;&#039;eden&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/eden eden@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the &amp;lt;code&amp;gt;listen_address&amp;lt;/code&amp;gt; setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
&lt;br /&gt;
=== Installing Release Package ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host and make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring DB Host ===&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=eden&lt;br /&gt;
DBHOST_KEY=/root/.ssh/eden&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup with Edenctl ===&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=272</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=272"/>
		<updated>2026-02-04T07:50:36Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with the database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host. In these places, replace the designation with the respective IP address.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden Account ==&lt;br /&gt;
&lt;br /&gt;
Login to the DB Host and create a user account for Eden:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
adduser eden&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt; to add the following lines to the &#039;&#039;sudoers&#039;&#039; configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# User rules for eden&lt;br /&gt;
eden ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow Eden to become &#039;&#039;root&#039;&#039; without password.&lt;br /&gt;
&lt;br /&gt;
== Configuring Key-based Login ==&lt;br /&gt;
&lt;br /&gt;
On your local machine, generate a new RSA key pair:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f eden -C &amp;quot;eden&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Leave the password empty as this key is to be used for script automation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will generate two files, &#039;&#039;eden&#039;&#039; (=private key) and &#039;&#039;eden.pub&#039;&#039; (=public key), in the current directory. Install the public key on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat eden.pub | ssh eden@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the private key to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp eden admin@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host and store the key in a safe location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
cp /tmp/eden ~/.ssh&lt;br /&gt;
chown root.root ~/.ssh/eden&lt;br /&gt;
chmod 600 ~/.ssh/eden&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verify that you can SSH-login from the App Host to the DB Host (via private IP), as user &#039;&#039;eden&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/eden eden@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the &amp;lt;code&amp;gt;listen_address&amp;lt;/code&amp;gt; setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
&lt;br /&gt;
=== Installing Release Package ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host and make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring DB Host ===&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=eden&lt;br /&gt;
DBHOST_KEY=/root/.ssh/eden&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup with Edenctl ===&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=271</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=271"/>
		<updated>2026-02-02T23:26:39Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Configure Host-based Access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with the database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host. In these places, replace the designation with the respective IP address.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;. Make a note of these details, too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the &amp;lt;code&amp;gt;listen_address&amp;lt;/code&amp;gt; setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=270</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=270"/>
		<updated>2026-02-02T23:24:53Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites and Terminology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with the database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host. In these places, replace the designation with the respective IP address.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;. Make a note of these details, too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_address setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=269</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=269"/>
		<updated>2026-02-02T23:22:03Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites and Terminology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with the database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;. Make a note of these details, too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_address setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=268</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=268"/>
		<updated>2026-02-02T23:21:43Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites and Terminology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with the database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;. Note these details down:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_address setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=267</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=267"/>
		<updated>2026-02-02T23:20:09Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Dual Host Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with the database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_address setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=266</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=266"/>
		<updated>2026-02-02T23:18:42Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Configure Host-based Access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_address setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=265</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=265"/>
		<updated>2026-02-02T23:13:38Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Dual Host Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=264</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=264"/>
		<updated>2026-02-02T23:12:44Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Server Administration with Edenctl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; that comes with the DEB-Packages of the Eden release. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| pull || Update Eden from GitHub || new in Eden-6.1&lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || new in Eden-6.2 (not yet released)&lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;setup&#039;&#039;&#039; command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;teardown&#039;&#039;&#039; command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden web interface using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden web interface and thereby prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the web user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;new in Eden-6.2 (not yet released)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=263</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=263"/>
		<updated>2026-02-02T20:22:11Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Server Administration with Edenctl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; that comes with the DEB-Packages of the Eden release. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;setup&#039;&#039;&#039; command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;teardown&#039;&#039;&#039; command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden web interface using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden web interface and thereby prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the web user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=262</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=262"/>
		<updated>2026-02-02T20:21:22Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039;. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;setup&#039;&#039;&#039; command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;teardown&#039;&#039;&#039; command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden web interface using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden web interface and thereby prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the web user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=261</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=261"/>
		<updated>2026-02-02T20:20:59Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Start and Stop */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039;. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;setup&#039;&#039;&#039; command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;teardown&#039;&#039;&#039; command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden web interface using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden web interface and thereby prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the web user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=260</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=260"/>
		<updated>2026-02-02T20:20:05Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Setup and Teardown */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039;. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;setup&#039;&#039;&#039; command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;&#039;teardown&#039;&#039;&#039; command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=259</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=259"/>
		<updated>2026-02-02T20:19:43Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Setup and Teardown */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039;. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The setup command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The teardown command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=258</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=258"/>
		<updated>2026-02-02T20:17:15Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Setup and Teardown */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039;. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The setup command will not work if the Eden instance has already been set up.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The teardown command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=257</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=257"/>
		<updated>2026-02-02T20:16:34Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Server Administration with Edenctl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for Eden server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039;. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
The setup command will not work if the Eden instance has already been set up.&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The teardown command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=256</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=256"/>
		<updated>2026-02-02T20:15:43Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Server Administration with Edenctl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for server administration on &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039;. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
The setup command will not work if the Eden instance has already been set up.&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The teardown command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=255</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=255"/>
		<updated>2026-02-02T20:15:27Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Server Administration with Edenctl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for server administration on Debian/Linux. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands Overview ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| setup || Set up a newly installed Eden instance ||&lt;br /&gt;
|-&lt;br /&gt;
| teardown || Undo a completed setup ||&lt;br /&gt;
|-&lt;br /&gt;
| start || Start the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| stop || Stop the web interface || &lt;br /&gt;
|-&lt;br /&gt;
| shell || Open a Python shell in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| run || Run a Python script in the web2py+Eden environment || &lt;br /&gt;
|-&lt;br /&gt;
| clean || Reset the Eden instance || &lt;br /&gt;
|-&lt;br /&gt;
| template || Switch to another configuration template || &lt;br /&gt;
|-&lt;br /&gt;
| compile || (Re-)compile models, controllers and views || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
The setup command will not work if the Eden instance has already been set up.&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The teardown command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=254</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=254"/>
		<updated>2026-02-02T20:09:22Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for server administration on Debian/Linux. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
The setup command will not work if the Eden instance has already been set up.&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The teardown command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
&lt;br /&gt;
To open a Python shell in the web2py+Eden environment, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl shell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Scripts ==&lt;br /&gt;
&lt;br /&gt;
To run a Python script in the web2py+Eden shell, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl run /path/to/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=253</id>
		<title>Guidelines:Edenctl</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Edenctl&amp;diff=253"/>
		<updated>2026-02-02T20:05:59Z</updated>

		<summary type="html">&lt;p&gt;Dominic: Created page with &amp;quot;= Server Administration with Edenctl =  The &amp;#039;&amp;#039;&amp;#039;edenctl&amp;#039;&amp;#039;&amp;#039; tool is a &amp;#039;&amp;#039;bash&amp;#039;&amp;#039; script for server administration on Debian/Linux. The general usage of this script is (as root user):  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; edenctl [command] [parameters] &amp;lt;/syntaxhighlight&amp;gt;  == Setup and Teardown ==  To set up a newly installed Eden, run:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; edenctl setup &amp;lt;/syntaxhighlight&amp;gt;  This will run you step-by-step through the setup process. Enter your server details...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Server Administration with Edenctl =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;edenctl&#039;&#039;&#039; tool is a &#039;&#039;bash&#039;&#039; script for server administration on Debian/Linux. The general usage of this script is (as root user):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl [command] [parameters]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup and Teardown ==&lt;br /&gt;
&lt;br /&gt;
To set up a newly installed Eden, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).&lt;br /&gt;
&lt;br /&gt;
The setup command will not work if the Eden instance has already been set up.&lt;br /&gt;
&lt;br /&gt;
Once completed, you can undo the setup with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl teardown&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The teardown command will not drop the Eden database - this must be done manually.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Start and Stop ==&lt;br /&gt;
&lt;br /&gt;
After the setup, you can start the Eden application using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the Eden application and prevent user access, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl stop&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;stop&#039;&#039;&#039; commands only start/stop the uWSGI daemon.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
&lt;br /&gt;
It is possible to upgrade your Eden instance directly from GitHub, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl pull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; It can be necessary to perform certain database migrations after the &#039;&#039;&#039;pull&#039;&#039;&#039; for Eden to work correctly - always check the release for migration advice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Clean ==&lt;br /&gt;
&lt;br /&gt;
You can reset the Eden database using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will remove all data from the database, and perform a fresh &#039;&#039;&#039;first run&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; This operation is primarily intended for demos, and not recommended for production servers.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Switching Templates ==&lt;br /&gt;
&lt;br /&gt;
You can switch to a different template using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl template &amp;quot;TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; After switching templates, you need to reset the instance using &amp;lt;code&amp;gt;edenctl clean&amp;lt;/code&amp;gt;.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=252</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=252"/>
		<updated>2026-02-02T19:43:29Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
== Prerequisites and Terminology ==&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
== Preparing the Servers ==&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing PostgreSQL ==&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Eden ==&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=251</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=251"/>
		<updated>2026-02-02T19:42:50Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Secure Server Operation =&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end under Debian/Linux.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Unprivileged Account ==&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradm&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradm&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradm&lt;br /&gt;
serveradm ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Key-based Login ==&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradm -C &amp;quot;serveradm&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradm.pub | ssh serveradm@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradm&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
== Disable Root Login and Password Authentication ==&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradm&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradm&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=250</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=250"/>
		<updated>2026-02-02T19:42:21Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Secure Server Operation =&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end under Debian/Linux.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradm&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradm&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradm&lt;br /&gt;
serveradm ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradm -C &amp;quot;serveradm&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradm.pub | ssh serveradm@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradm&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradm&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradm&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=249</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=249"/>
		<updated>2026-02-02T19:41:55Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Dual Host Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Dual Host Setup =&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=248</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=248"/>
		<updated>2026-02-02T19:41:30Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end under Debian/Linux.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradm&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradm&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradm&lt;br /&gt;
serveradm ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradm -C &amp;quot;serveradm&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradm.pub | ssh serveradm@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradm&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradm&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradm&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=247</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=247"/>
		<updated>2026-02-02T19:41:07Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=246</id>
		<title>Guidelines:DebianPackages</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=246"/>
		<updated>2026-02-02T19:40:49Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Guidelines:Deployment|All Deployment Guidelines]]&lt;br /&gt;
&lt;br /&gt;
= Debian Packages =&lt;br /&gt;
&lt;br /&gt;
As of version 6.0, Eden provides packaged releases for installation, setup and server administration. Packages for Debian (*.deb) are currently provided as assets attached to the respective GitHub release:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/sahana/eden/releases&lt;br /&gt;
&lt;br /&gt;
Using packaged releases is the recommended setup method for production servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before starting the installation, you must have a server machine (virtual or bare metal) ready, installed with a suitable &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; distribution. As a rule, Eden supports the last two Debian releases ([https://wiki.debian.org/DebianStable stable] and [https://wiki.debian.org/DebianOldStable oldstable]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;: Occasionally, support for the current stable can be delayed while we are fixing incompatibilities - but the oldstable should always be available.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The server must have access to corresponding Debian repositories in order to install dependencies, either locally or via internet.&lt;br /&gt;
&lt;br /&gt;
You must be able to access the server via &#039;&#039;&#039;SSH&#039;&#039;&#039; (alternatively physical console), and to become the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; user. See our [[Guidelines:SecureOperation]] for recommendations for a safe SSH setup.&lt;br /&gt;
&lt;br /&gt;
Additionally, you will need a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; for the intended &#039;&#039;&#039;server URL&#039;&#039;&#039; pointing to the server&#039;s IP address, which you can obtain from your domain services provider. Make sure the server is accessible from the network under that server URL via both HTTP and HTTPs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; for setting up with a separate DB host (&amp;quot;Dual Host Setup&amp;quot;) see our [[Guidelines:DualHost]] instead.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Login to the server via SSH, and make yourself root with &amp;lt;code&amp;gt;sudo su -&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Download the release package matching your Debian version, e.g. for Eden-6.0 on Debian-12 Bookworm:&lt;br /&gt;
&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;wget https://github.com/sahana/eden/releases/download/6.0/sahana-eden-debian12_6.0-1_all.deb&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
  apt-get update&lt;br /&gt;
  apt-get install -f sahana-eden-debian12_6.0-1_all.deb&lt;br /&gt;
&lt;br /&gt;
This will install all necessary dependencies, including &#039;&#039;&#039;PostgreSQL&#039;&#039;&#039; with &#039;&#039;&#039;PostGIS&#039;&#039;&#039;, the &#039;&#039;&#039;web2py&#039;&#039;&#039; framework, the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and &#039;&#039;&#039;uWSGI&#039;&#039;&#039;, and finally &#039;&#039;&#039;Eden&#039;&#039;&#039; itself.&lt;br /&gt;
&lt;br /&gt;
The package also deploys the &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; tool to configure and manage the server.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
If you want to use a custom configuration &#039;&#039;&#039;template&#039;&#039;&#039;, add a symbolic link for it in the &amp;lt;code&amp;gt;/home/web2py/applications/eden/modules/templates&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; to configure the Eden instance on your server:&lt;br /&gt;
&lt;br /&gt;
  edenctl setup&lt;br /&gt;
&lt;br /&gt;
Enter your server details as you are prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: if your server URL is &#039;&#039;eden.example.com&#039;&#039;, then the hostname would be &#039;&#039;eden&#039;&#039;, and the domain &#039;&#039;example.com&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edenctl will configure the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and set up a &#039;&#039;&#039;uWSGI&#039;&#039;&#039; daemon to connect it to web2py/Eden. It will also set up and initialize the database, and &#039;&#039;&#039;pre-populate&#039;&#039;&#039; it with some basic data from the configuration template you selected.&lt;br /&gt;
&lt;br /&gt;
It will also configure SSL (HTTPs) with [https://certbot.eff.org/pages/about Certbot] to manage the server certificate and key.&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can start your Eden instance with&lt;br /&gt;
&lt;br /&gt;
  edenctl start&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=245</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=245"/>
		<updated>2026-02-02T19:39:49Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Secure Server Operation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end under Debian/Linux.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradm&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradm&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradm&lt;br /&gt;
serveradm ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradm -C &amp;quot;serveradm&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradm.pub | ssh serveradm@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradm&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradm&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradm&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=244</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=244"/>
		<updated>2026-02-02T19:39:07Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Setting Up Eden */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=243</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=243"/>
		<updated>2026-02-02T19:38:53Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Configure Host-based Access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=242</id>
		<title>Guidelines:DebianPackages</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=242"/>
		<updated>2026-02-02T19:38:30Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Debian Packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debian Packages =&lt;br /&gt;
&lt;br /&gt;
As of version 6.0, Eden provides packaged releases for installation, setup and server administration. Packages for Debian (*.deb) are currently provided as assets attached to the respective GitHub release:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/sahana/eden/releases&lt;br /&gt;
&lt;br /&gt;
Using packaged releases is the recommended setup method for production servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before starting the installation, you must have a server machine (virtual or bare metal) ready, installed with a suitable &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; distribution. As a rule, Eden supports the last two Debian releases ([https://wiki.debian.org/DebianStable stable] and [https://wiki.debian.org/DebianOldStable oldstable]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;: Occasionally, support for the current stable can be delayed while we are fixing incompatibilities - but the oldstable should always be available.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The server must have access to corresponding Debian repositories in order to install dependencies, either locally or via internet.&lt;br /&gt;
&lt;br /&gt;
You must be able to access the server via &#039;&#039;&#039;SSH&#039;&#039;&#039; (alternatively physical console), and to become the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; user. See our [[Guidelines:SecureOperation]] for recommendations for a safe SSH setup.&lt;br /&gt;
&lt;br /&gt;
Additionally, you will need a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; for the intended &#039;&#039;&#039;server URL&#039;&#039;&#039; pointing to the server&#039;s IP address, which you can obtain from your domain services provider. Make sure the server is accessible from the network under that server URL via both HTTP and HTTPs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; for setting up with a separate DB host (&amp;quot;Dual Host Setup&amp;quot;) see our [[Guidelines:DualHost]] instead.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Login to the server via SSH, and make yourself root with &amp;lt;code&amp;gt;sudo su -&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Download the release package matching your Debian version, e.g. for Eden-6.0 on Debian-12 Bookworm:&lt;br /&gt;
&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;wget https://github.com/sahana/eden/releases/download/6.0/sahana-eden-debian12_6.0-1_all.deb&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
  apt-get update&lt;br /&gt;
  apt-get install -f sahana-eden-debian12_6.0-1_all.deb&lt;br /&gt;
&lt;br /&gt;
This will install all necessary dependencies, including &#039;&#039;&#039;PostgreSQL&#039;&#039;&#039; with &#039;&#039;&#039;PostGIS&#039;&#039;&#039;, the &#039;&#039;&#039;web2py&#039;&#039;&#039; framework, the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and &#039;&#039;&#039;uWSGI&#039;&#039;&#039;, and finally &#039;&#039;&#039;Eden&#039;&#039;&#039; itself.&lt;br /&gt;
&lt;br /&gt;
The package also deploys the &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; tool to configure and manage the server.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
If you want to use a custom configuration &#039;&#039;&#039;template&#039;&#039;&#039;, add a symbolic link for it in the &amp;lt;code&amp;gt;/home/web2py/applications/eden/modules/templates&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; to configure the Eden instance on your server:&lt;br /&gt;
&lt;br /&gt;
  edenctl setup&lt;br /&gt;
&lt;br /&gt;
Enter your server details as you are prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: if your server URL is &#039;&#039;eden.example.com&#039;&#039;, then the hostname would be &#039;&#039;eden&#039;&#039;, and the domain &#039;&#039;example.com&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edenctl will configure the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and set up a &#039;&#039;&#039;uWSGI&#039;&#039;&#039; daemon to connect it to web2py/Eden. It will also set up and initialize the database, and &#039;&#039;&#039;pre-populate&#039;&#039;&#039; it with some basic data from the configuration template you selected.&lt;br /&gt;
&lt;br /&gt;
It will also configure SSL (HTTPs) with [https://certbot.eff.org/pages/about Certbot] to manage the server certificate and key.&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can start your Eden instance with&lt;br /&gt;
&lt;br /&gt;
  edenctl start&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=241</id>
		<title>Guidelines:DebianPackages</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=241"/>
		<updated>2026-02-02T19:35:50Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debian Packages =&lt;br /&gt;
&lt;br /&gt;
As of version 6.0, Eden provides packaged releases for installation, setup and server administration. Packages for Debian (*.deb) are currently provided as assets attached to the respective GitHub release:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/sahana/eden/releases&lt;br /&gt;
&lt;br /&gt;
Using packaged releases is the recommended setup method for production servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before starting the installation, you must have a server machine (virtual or bare metal) ready, installed with a suitable &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; distribution. As a rule, Eden supports the last two Debian releases ([https://wiki.debian.org/DebianStable stable] and [https://wiki.debian.org/DebianOldStable oldstable]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;: Occasionally, support for the current stable can be delayed while we are fixing incompatibilities - but the oldstable should always be available.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The server must have access to corresponding Debian repositories in order to install dependencies, either locally or via internet.&lt;br /&gt;
&lt;br /&gt;
You must be able to access the server via &#039;&#039;&#039;SSH&#039;&#039;&#039; (alternatively physical console), and to become the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; user. See our [[Guidelines:SecureOperation]] for recommendations for a safe SSH setup.&lt;br /&gt;
&lt;br /&gt;
Additionally, you will need a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; for the intended &#039;&#039;&#039;server URL&#039;&#039;&#039; pointing to the server&#039;s IP address, which you can obtain from your domain services provider. Make sure the server is accessible from the network under that server URL via both HTTP and HTTPs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Login to the server via SSH, and make yourself root with &amp;lt;code&amp;gt;sudo su -&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Download the release package matching your Debian version, e.g. for Eden-6.0 on Debian-12 Bookworm:&lt;br /&gt;
&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;wget https://github.com/sahana/eden/releases/download/6.0/sahana-eden-debian12_6.0-1_all.deb&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
  apt-get update&lt;br /&gt;
  apt-get install -f sahana-eden-debian12_6.0-1_all.deb&lt;br /&gt;
&lt;br /&gt;
This will install all necessary dependencies, including &#039;&#039;&#039;PostgreSQL&#039;&#039;&#039; with &#039;&#039;&#039;PostGIS&#039;&#039;&#039;, the &#039;&#039;&#039;web2py&#039;&#039;&#039; framework, the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and &#039;&#039;&#039;uWSGI&#039;&#039;&#039;, and finally &#039;&#039;&#039;Eden&#039;&#039;&#039; itself.&lt;br /&gt;
&lt;br /&gt;
The package also deploys the &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; tool to configure and manage the server.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
If you want to use a custom configuration &#039;&#039;&#039;template&#039;&#039;&#039;, add a symbolic link for it in the &amp;lt;code&amp;gt;/home/web2py/applications/eden/modules/templates&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; to configure the Eden instance on your server:&lt;br /&gt;
&lt;br /&gt;
  edenctl setup&lt;br /&gt;
&lt;br /&gt;
Enter your server details as you are prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: if your server URL is &#039;&#039;eden.example.com&#039;&#039;, then the hostname would be &#039;&#039;eden&#039;&#039;, and the domain &#039;&#039;example.com&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edenctl will configure the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and set up a &#039;&#039;&#039;uWSGI&#039;&#039;&#039; daemon to connect it to web2py/Eden. It will also set up and initialize the database, and &#039;&#039;&#039;pre-populate&#039;&#039;&#039; it with some basic data from the configuration template you selected.&lt;br /&gt;
&lt;br /&gt;
It will also configure SSL (HTTPs) with [https://certbot.eff.org/pages/about Certbot] to manage the server certificate and key.&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can start your Eden instance with&lt;br /&gt;
&lt;br /&gt;
  edenctl start&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:Deployment&amp;diff=240</id>
		<title>Guidelines:Deployment</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:Deployment&amp;diff=240"/>
		<updated>2026-02-02T19:34:22Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Installation from Release Package */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installation and Setup =&lt;br /&gt;
&lt;br /&gt;
== Installation from Release Package ==&lt;br /&gt;
&lt;br /&gt;
As of version 6.0, Eden provides packaged releases. This is the recommended setup method for production servers. The packages are available as assets attached to the respective GitHub release.&lt;br /&gt;
&lt;br /&gt;
* [[Guidelines:DebianPackages|Installation on Debian/Linux]]&lt;br /&gt;
* [[Guidelines:DualHost|Installation on Debian/Linux with separate DB Host]]&lt;br /&gt;
* [[Guidelines:Edenctl|Server Setup and Management with edenctl]]&lt;br /&gt;
* [[Guidelines:SecureOperation|SSH Setup Recommendations]]&lt;br /&gt;
&lt;br /&gt;
== Installation from GitHub Repository ==&lt;br /&gt;
&lt;br /&gt;
It is also possible to install Eden directly from a GitHub repository. This option is recommended for demos and UAT, where you want to install a development version.&lt;br /&gt;
&lt;br /&gt;
* [[Guidelines:InstallationScripts|Installation and Configuration scripts for Debian/Linux]]&lt;br /&gt;
* [[Guidelines:ServiceScripts|Server Setup and Management using traditional Service Scripts]]&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=239</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=239"/>
		<updated>2026-02-02T19:23:57Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Setting Up Eden */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Note:&#039;&#039;&#039; The actual location and name of the package depends on the release - check on GitHub for the latest available package.&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=238</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=238"/>
		<updated>2026-02-02T19:22:43Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Configure Host-based Access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Note:&#039;&#039;&#039; if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Note:&#039;&#039;&#039; The actual name of the package depends on the release - check the release on GitHub for the latest available package.&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=237</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=237"/>
		<updated>2026-02-02T19:22:32Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Setting Up Eden */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Note: if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Note:&#039;&#039;&#039; The actual name of the package depends on the release - check the release on GitHub for the latest available package.&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=236</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=236"/>
		<updated>2026-02-02T19:21:11Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites and Terminology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Make a note  of the IPs, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apphost-public-ip 000.000.000.000&lt;br /&gt;
apphost-private-ip 000.000.000.000&lt;br /&gt;
dbhost-public-ip 000.000.000.000&lt;br /&gt;
dbhost-private-ip 000.000.000.000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...so that you have them readily at hand when walking through this guide. We will use designations like &#039;&#039;&amp;lt;apphost-public-ip&amp;gt;&#039;&#039;, for instance, to refer to the public IP of the App Host.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FQDN eden.example.com&lt;br /&gt;
Hostname eden&lt;br /&gt;
Domain example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name as required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Note: if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=235</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=235"/>
		<updated>2026-02-02T19:15:09Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites and Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;App Host&#039;&#039;&#039; and &#039;&#039;&#039;DB Host&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only; in some intranet setups, public IP and private IP may be the same). Thus, a designation like &#039;&#039;apphost-public-ip&#039;&#039;, for instance, refers to the public IP of the App Host. &lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the App Host, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This guideline further assumes that you have set up the servers for key-based SSH login (see [[Guidelines:SecureOperation]]) with a non-privileged user account &#039;&#039;serveradm&#039;&#039; (replace this with the actual user name where required).&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Servers ===&lt;br /&gt;
&lt;br /&gt;
First, we need to setup an additional key pair on the App Host, for &#039;&#039;edenctl&#039;&#039; to login at the DB Host. On your local machine, generate a key pair with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -C &amp;quot;apphost&amp;quot; -f apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the password empty, as the private key is to be used by the &#039;&#039;edenctl&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
This will generate two files &amp;lt;code&amp;gt;apphost&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apphost.pub&amp;lt;/code&amp;gt; in the local directory. Copy the private key (&#039;&#039;apphost&#039;&#039;) to the App Host, using the private key of the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scp -i serveradm apphost serveradm@&amp;lt;apphost-public-ip&amp;gt;:/tmp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the public key (&#039;&#039;apphost.pub&#039;&#039;) for the &amp;lt;code&amp;gt;serveradm&amp;lt;/code&amp;gt; user on the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat apphost.pub | ssh -i serveradm serveradm@&amp;lt;dbhost-public-ip&amp;gt; &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the App Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@&amp;lt;apphost-public-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and move the private key into a secure location:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
mv /tmp/apphost ~/.ssh/apphost&lt;br /&gt;
chown root.root ~/.ssh/apphost&lt;br /&gt;
chmod 600 ~/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to login from the App Host to the DB Host using this key and the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh -i ~/.ssh/apphost serveradm@&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing PostgreSQL ===&lt;br /&gt;
&lt;br /&gt;
On the DB Host, make yourself &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install PostgreSQL and PostGIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -y postgresql-17 postgresql-17-postgis-3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Host-based Access ===&lt;br /&gt;
&lt;br /&gt;
You need to tell PostgreSQL that the App Host is permitted to access the DB server. To do so, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/pg_hba.conf&amp;lt;/code&amp;gt;, adding the following lines at the end (using the private IP of the App Host):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Eden App Host&lt;br /&gt;
host    all    all    &amp;lt;apphost-private-ip&amp;gt;/32   md5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Note: if your DB Host is behind a firewall, access from this IP/subnet to the port 5432 must be allowed. Adjust your firewall configuration as necessary.&lt;br /&gt;
&lt;br /&gt;
Further, you must tell PostgreSQL to listen on the private IP of the DB Host. For that, edit the file &amp;lt;code&amp;gt;/etc/postgresql/17/main/postgresql.conf&amp;lt;/code&amp;gt;, and modify the listen_addresses setting, adding the private IP of the DB Host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
listen_address = &#039;&amp;lt;dbhost-private-ip&amp;gt;,localhost&#039; # what IP address(es) to listen on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, restart PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart postgresql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Logout from the DB Host, going back to the App Host.&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Eden ===&lt;br /&gt;
&lt;br /&gt;
Copy the Eden DEB-package to the App Host - either using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local machine, or &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; to fetch it from GitHub, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
wget https://github.com/sahana/eden/releases/download/6.2/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install -f /tmp/sahana-eden-debian13_6.2-1_all.deb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a file &amp;lt;code&amp;gt;/etc/sahana/dbhost.conf&amp;lt;/code&amp;gt;, with the details of the DB Host, so that &#039;&#039;edenctl&#039;&#039; can login there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
DBHOST=&amp;lt;dbhost-private-ip&amp;gt;&lt;br /&gt;
DBHOST_USER=serveradm&lt;br /&gt;
DBHOST_KEY=/root/.ssh/apphost&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can set up the Eden instance as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl setup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eventually, start the Eden instance with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
edenctl start&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=234</id>
		<title>Guidelines:DualHost</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DualHost&amp;diff=234"/>
		<updated>2026-02-02T16:46:44Z</updated>

		<summary type="html">&lt;p&gt;Dominic: Created page with &amp;quot;== Dual Host Setup ==  In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:  === Terminology ===  This guideline assumes that you have two hosts running on Debian/Linux - we will use the &amp;#039;&amp;#039;&amp;#039;AppHost&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;DBHost&amp;#039;&amp;#039;&amp;#039; designations here to distinguish between the two.  Further, we assume that each host has a &amp;#039;&amp;#039;&amp;#039;public IP&amp;#039;&amp;#039;&amp;#039; (exposed to the internet) and a &amp;#039;&amp;#039;&amp;#039;private IP&amp;#039;&amp;#039;&amp;#039; (local network only). Thus, a...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dual Host Setup ==&lt;br /&gt;
&lt;br /&gt;
In certain situations, you may want to deploy Eden with a database on a separate host. Follow these steps for Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
=== Terminology ===&lt;br /&gt;
&lt;br /&gt;
This guideline assumes that you have two hosts running on Debian/Linux - we will use the &#039;&#039;&#039;AppHost&#039;&#039;&#039; and &#039;&#039;&#039;DBHost&#039;&#039;&#039; designations here to distinguish between the two.&lt;br /&gt;
&lt;br /&gt;
Further, we assume that each host has a &#039;&#039;&#039;public IP&#039;&#039;&#039; (exposed to the internet) and a &#039;&#039;&#039;private IP&#039;&#039;&#039; (local network only). Thus, a designation like &#039;&#039;apphost-public-ip&#039;&#039;, for instance, refers to the public IP of the AppHost. In some intranet setups, public IP and private IP may be the same.&lt;br /&gt;
&lt;br /&gt;
Make sure that you have a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; set up for the public IP of the AppHost, e.g. in the &#039;&#039;&#039;FQDN&#039;&#039;&#039; (fully qualified domain name) &amp;quot;eden.example.com&amp;quot;, the &amp;quot;eden&amp;quot; part constitutes the &#039;&#039;&#039;hostname&#039;&#039;&#039;, and &amp;quot;example.com&amp;quot; the &#039;&#039;&#039;domain&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Preparing the Servers&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;tbc&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=233</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=233"/>
		<updated>2026-02-02T16:36:28Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Secure Server Operation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end under Debian/Linux.&lt;br /&gt;
&lt;br /&gt;
 Note: this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradm&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradm&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradm&lt;br /&gt;
serveradm ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradm -C &amp;quot;serveradm&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradm.pub | ssh serveradm@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradm&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradm&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradm&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=232</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=232"/>
		<updated>2026-02-02T16:35:45Z</updated>

		<summary type="html">&lt;p&gt;Dominic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end.&lt;br /&gt;
&lt;br /&gt;
 Note: this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradm&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradm&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradm&lt;br /&gt;
serveradm ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradm -C &amp;quot;serveradm&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradm.pub | ssh serveradm@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradm&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradm&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradm serveradm@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradm&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=231</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=231"/>
		<updated>2026-02-02T16:32:51Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Secure Server Operation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end.&lt;br /&gt;
&lt;br /&gt;
 Note: this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradmin&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradmin&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradmin&lt;br /&gt;
serveradmin ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradmin -C &amp;quot;serveradmin&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradmin.pub | ssh serveradmin@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradmin&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradmin&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradmin&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=230</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=230"/>
		<updated>2026-02-02T16:32:37Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Secure Server Operation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end.&lt;br /&gt;
&lt;br /&gt;
  Note: this configuration is standard on many clouds, e.g. AWS EC2, so you do not need to do this manually. Check with your cloud service provider for details.&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradmin&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradmin&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradmin&lt;br /&gt;
serveradmin ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradmin -C &amp;quot;serveradmin&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradmin.pub | ssh serveradmin@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradmin&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradmin&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradmin&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=229</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=229"/>
		<updated>2026-02-02T16:31:05Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Secure Server Operation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end.&lt;br /&gt;
&lt;br /&gt;
  Note: this configuration is standard on many clouds, e.g. AWS EC2.&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradmin&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradmin&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradmin&lt;br /&gt;
serveradmin ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradmin -C &amp;quot;serveradmin&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradmin.pub | ssh serveradmin@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradmin&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradmin&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradmin&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=228</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=228"/>
		<updated>2026-02-02T16:27:43Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Secure Server Operation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server back-end:&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradmin&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradmin&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradmin&lt;br /&gt;
serveradmin ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradmin -C &amp;quot;serveradmin&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradmin.pub | ssh serveradmin@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradmin&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradmin&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradmin&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=227</id>
		<title>Guidelines:SecureOperation</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:SecureOperation&amp;diff=227"/>
		<updated>2026-02-02T16:27:28Z</updated>

		<summary type="html">&lt;p&gt;Dominic: Created page with &amp;quot;== Secure Server Operation ==  The following steps are recommended to secure your Eden server:  === Unprivileged Account ===  You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradmin&amp;quot;:  &amp;lt;code&amp;gt; adduser serveradmin &amp;lt;/code&amp;gt;  Enter a password for the new account when prompted for, and provide additional information as required.   To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers c...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Secure Server Operation ==&lt;br /&gt;
&lt;br /&gt;
The following steps are recommended to secure your Eden server:&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged Account ===&lt;br /&gt;
&lt;br /&gt;
You should use an unprivileged user account for SSH login. To do so, login as root and create a new user, e.g. &amp;quot;serveradmin&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
adduser serveradmin&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter a password for the new account when prompted for, and provide additional information as required. &lt;br /&gt;
&lt;br /&gt;
To permit the new user to &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; without password, edit the sudoers configuration file using the command &amp;lt;code&amp;gt;visudo&amp;lt;/code&amp;gt;. Add the following lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# User rules for serveradmin&lt;br /&gt;
serveradmin ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login to the server using the new account and password, and verify that sudo is working as expected:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, you should be &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Key-based Login ===&lt;br /&gt;
&lt;br /&gt;
You should use RSA keys for SSH login instead of passwords. To do so, generate a key pair on your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh-keygen -t rsa -m PEM -b 4096 -f serveradmin -C &amp;quot;serveradmin&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a passphrase for the private key when prompted (for purposes of script automation, e.g. edenctl, leave the passphrase empty).&lt;br /&gt;
&lt;br /&gt;
Install the public key on the server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cat serveradmin.pub | ssh serveradmin@[server-public-ip] &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 600 ~/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...replacing [server-public-ip] with the public IP address of the server. You will be prompted for the password of the &#039;&#039;serveradmin&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Next, login to the server using the newly installed key:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to verify everything is working as expected. &lt;br /&gt;
&lt;br /&gt;
You can repeat this process for a second key pair, as/if required, e.g. for a representative or as backup key. Make sure that all private keys are securely stored, and protected by passphrases.&lt;br /&gt;
&lt;br /&gt;
=== Disable Root Login and Password Authentication ===&lt;br /&gt;
&lt;br /&gt;
If you are not logged-in as &#039;&#039;serveradmin&#039;&#039; yet, login now (using the private key):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ssh -i serveradmin serveradmin@[server-public-up]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make yourself &#039;&#039;root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo su -&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and edit the &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; file. Uncomment or add the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, reload the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
systemctl reload sshd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you can no longer SSH-login as &#039;&#039;root&#039;&#039;, but only as &#039;&#039;serveradmin&#039;&#039; - and you must use a private key, as passwords will no longer be accepted.&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=226</id>
		<title>Guidelines:DebianPackages</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=226"/>
		<updated>2025-11-25T11:25:08Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debian Packages =&lt;br /&gt;
&lt;br /&gt;
As of version 6.0, Eden provides packaged releases for installation, setup and server administration. Packages for Debian (*.deb) are currently provided as assets attached to the respective GitHub release:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/sahana/eden/releases&lt;br /&gt;
&lt;br /&gt;
Using packaged releases is the recommended setup method for production servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before starting the installation, you must have a server machine (virtual or bare metal) ready, installed with a suitable &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; distribution. As a rule, Eden supports the last two Debian releases ([https://wiki.debian.org/DebianStable stable] and [https://wiki.debian.org/DebianOldStable oldstable]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;: Occasionally, support for the current stable can be delayed while we are fixing incompatibilities - but the oldstable should always be available.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The server must have access to corresponding Debian repositories in order to install dependencies, either locally or via internet.&lt;br /&gt;
&lt;br /&gt;
You must be able to access the server via &#039;&#039;&#039;SSH&#039;&#039;&#039; (alternatively physical console), and to become the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; user.&lt;br /&gt;
&lt;br /&gt;
Additionally, you will need a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; for the intended &#039;&#039;&#039;server URL&#039;&#039;&#039; pointing to the server&#039;s IP address, which you can obtain from your domain services provider. Make sure the server is accessible from the network under that server URL via both HTTP and HTTPs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Login to the server via SSH, and make yourself root with &amp;lt;code&amp;gt;sudo su -&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Download the release package matching your Debian version, e.g. for Eden-6.0 on Debian-12 Bookworm:&lt;br /&gt;
&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;wget https://github.com/sahana/eden/releases/download/6.0/sahana-eden-debian12_6.0-1_all.deb&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
  apt-get update&lt;br /&gt;
  apt-get install -f sahana-eden-debian12_6.0-1_all.deb&lt;br /&gt;
&lt;br /&gt;
This will install all necessary dependencies, including &#039;&#039;&#039;PostgreSQL&#039;&#039;&#039; with &#039;&#039;&#039;PostGIS&#039;&#039;&#039;, the &#039;&#039;&#039;web2py&#039;&#039;&#039; framework, the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and &#039;&#039;&#039;uWSGI&#039;&#039;&#039;, and finally &#039;&#039;&#039;Eden&#039;&#039;&#039; itself.&lt;br /&gt;
&lt;br /&gt;
The package also deploys the &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; tool to configure and manage the server.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
If you want to use a custom configuration &#039;&#039;&#039;template&#039;&#039;&#039;, add a symbolic link for it in the &amp;lt;code&amp;gt;/home/web2py/applications/eden/modules/templates&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; to configure the Eden instance on your server:&lt;br /&gt;
&lt;br /&gt;
  edenctl setup&lt;br /&gt;
&lt;br /&gt;
Enter your server details as you are prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: if your server URL is &#039;&#039;eden.example.com&#039;&#039;, then the hostname would be &#039;&#039;eden&#039;&#039;, and the domain &#039;&#039;example.com&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edenctl will configure the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and set up a &#039;&#039;&#039;uWSGI&#039;&#039;&#039; daemon to connect it to web2py/Eden. It will also set up and initialize the database, and &#039;&#039;&#039;pre-populate&#039;&#039;&#039; it with some basic data from the configuration template you selected.&lt;br /&gt;
&lt;br /&gt;
It will also configure SSL (HTTPs) with [https://certbot.eff.org/pages/about Certbot] to manage the server certificate and key.&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can start your Eden instance with&lt;br /&gt;
&lt;br /&gt;
  edenctl start&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=225</id>
		<title>Guidelines:DebianPackages</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=225"/>
		<updated>2025-11-25T11:24:28Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debian Packages =&lt;br /&gt;
&lt;br /&gt;
As of version 6.0, Eden provides packaged releases for installation, setup and server administration. Packages for Debian (*.deb) are currently provided as assets attached to the respective GitHub release:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/sahana/eden/releases&lt;br /&gt;
&lt;br /&gt;
Using packaged releases is the recommended setup method for production servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before starting the installation, you should have a server machine (virtual or bare metal) ready, installed with a suitable &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; distribution. As a rule, Eden supports the last two Debian releases ([https://wiki.debian.org/DebianStable stable] and [https://wiki.debian.org/DebianOldStable oldstable]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;: Occasionally, support for the current stable can be delayed while we are fixing incompatibilities - but the oldstable should always be available.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The server must have access to corresponding Debian repositories in order to install dependencies, either locally or via internet.&lt;br /&gt;
&lt;br /&gt;
You must be able to access the server via &#039;&#039;&#039;SSH&#039;&#039;&#039; (alternatively physical console), and to become the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; user.&lt;br /&gt;
&lt;br /&gt;
Additionally, you will need a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; for the intended &#039;&#039;&#039;server URL&#039;&#039;&#039; pointing to the server&#039;s IP address, which you can obtain from your domain services provider. Make sure the server is accessible from the network under that server URL via both HTTP and HTTPs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Login to the server via SSH, and make yourself root with &amp;lt;code&amp;gt;sudo su -&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Download the release package matching your Debian version, e.g. for Eden-6.0 on Debian-12 Bookworm:&lt;br /&gt;
&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;wget https://github.com/sahana/eden/releases/download/6.0/sahana-eden-debian12_6.0-1_all.deb&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
  apt-get update&lt;br /&gt;
  apt-get install -f sahana-eden-debian12_6.0-1_all.deb&lt;br /&gt;
&lt;br /&gt;
This will install all necessary dependencies, including &#039;&#039;&#039;PostgreSQL&#039;&#039;&#039; with &#039;&#039;&#039;PostGIS&#039;&#039;&#039;, the &#039;&#039;&#039;web2py&#039;&#039;&#039; framework, the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and &#039;&#039;&#039;uWSGI&#039;&#039;&#039;, and finally &#039;&#039;&#039;Eden&#039;&#039;&#039; itself.&lt;br /&gt;
&lt;br /&gt;
The package also deploys the &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; tool to configure and manage the server.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
If you want to use a custom configuration &#039;&#039;&#039;template&#039;&#039;&#039;, add a symbolic link for it in the &amp;lt;code&amp;gt;/home/web2py/applications/eden/modules/templates&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; to configure the Eden instance on your server:&lt;br /&gt;
&lt;br /&gt;
  edenctl setup&lt;br /&gt;
&lt;br /&gt;
Enter your server details as you are prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: if your server URL is &#039;&#039;eden.example.com&#039;&#039;, then the hostname would be &#039;&#039;eden&#039;&#039;, and the domain &#039;&#039;example.com&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edenctl will configure the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and set up a &#039;&#039;&#039;uWSGI&#039;&#039;&#039; daemon to connect it to web2py/Eden. It will also set up and initialize the database, and &#039;&#039;&#039;pre-populate&#039;&#039;&#039; it with some basic data from the configuration template you selected.&lt;br /&gt;
&lt;br /&gt;
It will also configure SSL (HTTPs) with [https://certbot.eff.org/pages/about Certbot] to manage the server certificate and key.&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can start your Eden instance with&lt;br /&gt;
&lt;br /&gt;
  edenctl start&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
	<entry>
		<id>https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=224</id>
		<title>Guidelines:DebianPackages</title>
		<link rel="alternate" type="text/html" href="https://eden.sahanafoundation.org/index.php?title=Guidelines:DebianPackages&amp;diff=224"/>
		<updated>2025-11-25T11:23:59Z</updated>

		<summary type="html">&lt;p&gt;Dominic: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debian Packages =&lt;br /&gt;
&lt;br /&gt;
As of version 6.0, Eden provides packaged releases for installation, setup and server administration. Packages for Debian (*.deb) are currently provided as assets attached to the respective GitHub release:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/sahana/eden/releases&lt;br /&gt;
&lt;br /&gt;
Using packaged releases is the recommended setup method for production servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Before starting the installation, you should have a server machine (virtual or bare metal) ready, installed with a suitable &#039;&#039;&#039;Debian/Linux&#039;&#039;&#039; distribution. As a rule, Eden supports the last two Debian releases ([https://wiki.debian.org/DebianStable stable] and [https://wiki.debian.org/DebianOldStable oldstable]). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;: Occasionally, support for the current stable can be delayed while we are fixing incompatibilities - but the oldstable should always be available.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The server should have access to corresponding Debian repositories in order to install dependencies, either locally or via internet.&lt;br /&gt;
&lt;br /&gt;
You should be able to access the server via &#039;&#039;&#039;SSH&#039;&#039;&#039; (alternatively physical console), and to become the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; user.&lt;br /&gt;
&lt;br /&gt;
Additionally, you will need a &#039;&#039;&#039;DNS A-record&#039;&#039;&#039; for the intended &#039;&#039;&#039;server URL&#039;&#039;&#039; pointing to the server&#039;s IP address, which you can obtain from your domain services provider. Make sure the server is accessible from the network under that server URL via both HTTP and HTTPs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Login to the server via SSH, and make yourself root with &amp;lt;code&amp;gt;sudo su -&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Download the release package matching your Debian version, e.g. for Eden-6.0 on Debian-12 Bookworm:&lt;br /&gt;
&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;wget https://github.com/sahana/eden/releases/download/6.0/sahana-eden-debian12_6.0-1_all.deb&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
  apt-get update&lt;br /&gt;
  apt-get install -f sahana-eden-debian12_6.0-1_all.deb&lt;br /&gt;
&lt;br /&gt;
This will install all necessary dependencies, including &#039;&#039;&#039;PostgreSQL&#039;&#039;&#039; with &#039;&#039;&#039;PostGIS&#039;&#039;&#039;, the &#039;&#039;&#039;web2py&#039;&#039;&#039; framework, the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and &#039;&#039;&#039;uWSGI&#039;&#039;&#039;, and finally &#039;&#039;&#039;Eden&#039;&#039;&#039; itself.&lt;br /&gt;
&lt;br /&gt;
The package also deploys the &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; tool to configure and manage the server.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
If you want to use a custom configuration &#039;&#039;&#039;template&#039;&#039;&#039;, add a symbolic link for it in the &amp;lt;code&amp;gt;/home/web2py/applications/eden/modules/templates&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;[[Guidelines:Edenctl|edenctl]]&amp;lt;/code&amp;gt; to configure the Eden instance on your server:&lt;br /&gt;
&lt;br /&gt;
  edenctl setup&lt;br /&gt;
&lt;br /&gt;
Enter your server details as you are prompted for them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip&#039;&#039;&#039;: if your server URL is &#039;&#039;eden.example.com&#039;&#039;, then the hostname would be &#039;&#039;eden&#039;&#039;, and the domain &#039;&#039;example.com&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edenctl will configure the &#039;&#039;&#039;nginx&#039;&#039;&#039; web server and set up a &#039;&#039;&#039;uWSGI&#039;&#039;&#039; daemon to connect it to web2py/Eden. It will also set up and initialize the database, and &#039;&#039;&#039;pre-populate&#039;&#039;&#039; it with some basic data from the configuration template you selected.&lt;br /&gt;
&lt;br /&gt;
It will also configure SSL (HTTPs) with [https://certbot.eff.org/pages/about Certbot] to manage the server certificate and key.&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can start your Eden instance with&lt;br /&gt;
&lt;br /&gt;
  edenctl start&lt;/div&gt;</summary>
		<author><name>Dominic</name></author>
	</entry>
</feed>