diff --git a/src/freedombone-installer b/src/freedombone-installer
index e938daa1aabf9737569ab14cf5cb1e79f7b71f54..e66724d4c348f39dc08d9cba3330793ec1549cad 100755
--- a/src/freedombone-installer
+++ b/src/freedombone-installer
@@ -102,6 +102,12 @@ function webadmin_update_version {
 }
 
 function web_admin_create_add_apps {
+    if grep -q 'ONION_ONLY=' "$CONFIGURATION_FILE"; then
+        ONION_ONLY=$(grep 'ONION_ONLY=' "$CONFIGURATION_FILE" | head -n 1 | awk -F '=' '{print $2}')
+    else
+        ONION_ONLY='no'
+    fi
+
     appslist_add_filename="$webadmin_install_dir/apps_add.html"
 
     apps_add_template_filename="$webadmin_install_dir/apps_add_template.html"
@@ -204,6 +210,14 @@ function web_admin_create_add_apps {
                 sed -i "s|APPNAME|${app_name}|g" "$filename"
                 sed -i "s|APPDESCRIPTION|${DESCRIPTION}|g" "$filename"
 
+                # remove domain if onion only
+                if [[ "$ONION_ONLY" != 'no' ]]; then
+                    if grep -q 'install_domain' "$filename"; then
+                        sed -i '/install_domain/d' "$filename"
+                    fi
+                    sed -i "/installappconfirm.php/a <input type=\"hidden\" name=\"install_domain\" value=\"${app_name}.$(hostname)\">" "$filename"
+                fi
+
                 if grep -q 'freedns_code' "$filename"; then
                     sed -i '/freedns_code/d' "$filename"
                 fi