diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/aws.xml b/.idea/aws.xml
new file mode 100644
index 0000000..1850186
--- /dev/null
+++ b/.idea/aws.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/csv-editor.xml b/.idea/csv-editor.xml
new file mode 100644
index 0000000..613fc08
--- /dev/null
+++ b/.idea/csv-editor.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..280f0a3
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/magento2plugin.xml b/.idea/magento2plugin.xml
new file mode 100644
index 0000000..6485e05
--- /dev/null
+++ b/.idea/magento2plugin.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..3ce3588
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..9286e98
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/php.xml b/.idea/php.xml
new file mode 100644
index 0000000..f324872
--- /dev/null
+++ b/.idea/php.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/raspap-docker.iml b/.idea/raspap-docker.iml
new file mode 100644
index 0000000..4312e89
--- /dev/null
+++ b/.idea/raspap-docker.iml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..cadae7f
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 3740b7d..3017ee0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,3 +1,83 @@
-FROM alehaa/debian-systemd:buster
-RUN apt update && apt install -y sudo wget procps curl systemd && rm -rf /var/lib/apt/lists/*
-COPY setup.sh .
+# Base image
+FROM debian:latest
+
+RUN debian_frontend=noninteractive
+
+USER root
+RUN echo 'iptables-persistent iptables-persistent/autosave_v4 boolean true' | debconf-set-selections
+RUN echo 'iptables-persistent iptables-persistent/autosave_v6 boolean true' | debconf-set-selections
+
+
+# Update the system
+RUN apt-get update && apt-get upgrade -y
+
+# Install dependencies
+RUN apt-get install -y \
+ git \
+ lighttpd \
+ php7.4-cgi \
+ hostapd \
+ dnsmasq \
+ vnstat \
+ qrencode \
+ dhcpcd5 -y \
+ iptables-persistent
+
+
+
+# Enable PHP for lighttpd
+RUN lighttpd-enable-mod fastcgi-php
+
+# Clone RaspAP repository
+RUN git clone https://github.com/RaspAP/raspap-webgui /var/www/html/raspap-webgui
+
+# Copy additional lighttpd config file
+COPY raspap-webgui/config/50-raspap-router.conf /etc/lighttpd/conf-available/50-raspap-router.conf
+RUN ln -s /etc/lighttpd/conf-available/50-raspap-router.conf /etc/lighttpd/conf-enabled/50-raspap-router.conf
+
+# Set up configuration directories
+RUN mkdir /etc/raspap/
+RUN mkdir /etc/raspap/backups
+RUN mkdir /etc/raspap/networking
+RUN mkdir /etc/raspap/hostapd
+RUN mkdir /etc/raspap/lighttpd
+
+# Copy auth control file
+RUN cp /var/www/html/raspap-webgui/raspap.php /etc/raspap/
+
+# Set file ownership
+RUN chown -R www-data:www-data /var/www/html
+RUN chown -R www-data:www-data /etc/raspap
+
+# Move control scripts
+RUN mv /var/www/html/raspap-webgui/installers/*log.sh /etc/raspap/hostapd
+RUN mv /var/www/html/raspap-webgui/installers/service*.sh /etc/raspap/hostapd
+RUN chown -c root:www-data /etc/raspap/hostapd/*.sh
+RUN chmod 750 /etc/raspap/hostapd/*.sh
+
+# Copy default configurations
+COPY raspap-webgui/config/hostapd.conf /etc/default/hostapd
+COPY raspap-webgui/config/hostapd.conf /etc/hostapd/hostapd.conf
+COPY raspap-webgui/config/090_raspap.conf /etc/dnsmasq.d/090_raspap.conf
+COPY raspap-webgui/config/090_wlan0.conf /etc/dnsmasq.d/090_wlan0.conf
+COPY raspap-webgui/config/dhcpcd.conf /etc/dhcpcd.conf
+COPY raspap-webgui/config/config.php /var/www/html/includes/
+COPY raspap-webgui/config/defaults.json /etc/raspap/networking/
+
+# Enable IP forwarding
+RUN #mkdir /etc/sysctl.d/
+RUN #echo "net.ipv4.ip_forward=1" >> /etc/sysctl.d/90_raspap.conf
+#RUN sysctl -p /etc/sysctl.d/90_raspap.conf
+RUN #/etc/init.d/procps restart
+USER root
+
+# Set up iptables masquerade rules
+#RUN iptables -t nat -git
+# Enable hostapd service
+RUN echo "DAEMON_CONF=\"/etc/hostapd/hostapd.conf\"" >> /etc/default/hostapd
+
+# Expose port 80
+EXPOSE 80
+
+# Start lighttpd service
+CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..7a73a41
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/dnsmasq.conf b/dnsmasq.conf
new file mode 100644
index 0000000..6316eed
--- /dev/null
+++ b/dnsmasq.conf
@@ -0,0 +1,8 @@
+interface=wlan0
+dhcp-range=192.168.50.100,192.168.50.200,255.255.255.0,12h
+dhcp-option=3,192.168.50.1
+dhcp-option=6,192.168.50.1
+server=8.8.8.8
+server=8.8.4.4
+log-queries
+log-dhcp
diff --git a/hostapd.conf b/hostapd.conf
new file mode 100644
index 0000000..a33c900
--- /dev/null
+++ b/hostapd.conf
@@ -0,0 +1,9 @@
+interface=wlan0
+ssid=raspi-webgui
+hw_mode=g
+channel=6
+wpa=2
+wpa_passphrase=secretpassword
+wpa_key_mgmt=WPA-PSK
+wpa_pairwise=CCMP
+rsn_pairwise=CCMP
diff --git a/lighttpd.conf b/lighttpd.conf
new file mode 100644
index 0000000..702f40d
--- /dev/null
+++ b/lighttpd.conf
@@ -0,0 +1,18 @@
+server.document-root = "/var/www/html"
+server.port = 80
+server.modules = (
+ "mod_fastcgi",
+ "mod_accesslog"
+)
+index-file.names = ("index.php", "index.html", "index.lighttpd.html")
+fastcgi.server = (
+ ".php" => (
+ "localhost" => (
+ "socket" => "/var/run/php/php7.3-fpm.sock",
+ "bin-path" => "/usr/bin/php-cgi7.3",
+ "max-procs" => 1,
+ "broken-scriptfilename" => "enable"
+ )
+ )
+)
+accesslog.filename = "/var/log/lighttpd/access.log"
diff --git a/raspap-webgui b/raspap-webgui
new file mode 160000
index 0000000..9ddff8f
--- /dev/null
+++ b/raspap-webgui
@@ -0,0 +1 @@
+Subproject commit 9ddff8f245713fa97c86d3ba945649248ce0ce28
diff --git a/supervisord.conf b/supervisord.conf
new file mode 100644
index 0000000..ade1f95
--- /dev/null
+++ b/supervisord.conf
@@ -0,0 +1,40 @@
+[unix_http_server]
+file=/var/run/supervisor.sock
+
+[supervisord]
+logfile=/var/log/supervisor/supervisord.log
+logfile_maxbytes=50MB
+logfile_backups=10
+loglevel=info
+pidfile=/var/run/supervisord.pid
+nodaemon=false
+minfds=1024
+minprocs=200
+
+[rpcinterface:supervisor]
+supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
+
+[supervisorctl]
+serverurl=unix:///var/run/supervisor.sock
+
+[program:lighttpd]
+command=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
+autostart=true
+autorestart=true
+stderr_logfile=/var/log/supervisor/lighttpd.err.log
+stdout_logfile=/var/log/supervisor/lighttpd.out.log
+
+[program:hostapd]
+command=/usr/sbin/hostapd -B /etc/raspap/hostapd/hostapd.conf
+autostart=true
+autorestart=true
+stderr_logfile=/var/log/supervisor/hostapd.err.log
+stdout_logfile=/var/log/supervisor/hostapd.out.log
+
+[program:dnsmasq]
+command=/usr/sbin/dnsmasq -C /etc/raspap/networking/dnsmasq.conf
+autostart=true
+autorestart=true
+stderr_logfile=/var/log/supervisor/dnsmasq.err.log
+stdout_logfile=/var/log/supervisor/dnsmasq.out.log
+