Deployment Overview of Amnezia on Server¶
Prerequisites and Basic Requirements¶
Before deploying Amnezia, ensure the target server meets the following criteria:
-
Operating System: Compatible Linux distribution (Debian-based systems are supported via the installation workflow).
-
Privileges: Root or sudo access is required to execute the deployment script and manage system services.
-
Domain: The deployment utilizes the
hostkey.indomain structure for the management panel. -
Ports: Ensure that necessary network ports are open to allow the panel and proxy services to function correctly.
FQDN of the Final Panel¶
The management panel for the Amnezia instance is accessible via the following Fully Qualified Domain Name (FQDN) format:
<prefix>Server ID.hostkey.in:<port>
Note: The specific port number is determined during the configuration phase. The <prefix> and Server ID are unique identifiers assigned to your specific deployment.
File and Directory Structure¶
The deployment organizes the application files into standard system directories. The following locations are utilized during the final state of the installation:
-
Configuration Files: Stored in
/etc/amneziaor/opt/amnezia/configdepending on the specific installer version. -
Data Directories: Application data and logs are stored in
/var/lib/amneziaand/var/log/amnezia. -
Certificates: SSL certificates are managed and stored in
/etc/letsencryptif automatic certificate generation is enabled.
Application Installation Process¶
The Amnezia application is deployed via a ready-made installer script. The installation process includes the following stages:
-
The installer authenticates with the management API to retrieve server-specific tokens.
-
The system waits for the host connection to stabilize.
-
The installation script notifies the management system of the start stage.
-
The system applies necessary tags, including the
webpaneltag, to identify the service. -
The core components are installed and configured.
-
The deployment completes with a final status notification.
The installation script does not require manual intervention for standard deployments and handles the setup of the underlying environment automatically.
Access Rights and Security¶
Security measures are implemented during the deployment to restrict access:
-
Firewall: The installer configures firewall rules to allow traffic only on designated ports for the panel and proxy services.
-
User Restrictions: The application runs under a dedicated service user to limit privileges.
-
Service Tags: The
webpaneltag is applied to the instance, linking it to the official documentation for security updates and compliance.
Docker Containers and Their Deployment¶
The Amnezia deployment utilizes containerized services to isolate the application components.
-
Deployment Method: Containers are launched using Docker or Docker Compose as part of the installation routine.
-
Container Management: The installation script handles the creation and configuration of the necessary containers without requiring manual
docker runcommands from the user. -
Networking: Container networking is configured to expose the panel interface and proxy endpoints as defined in the deployment configuration.
Proxy Servers¶
A reverse proxy is configured to handle incoming traffic and secure communications:
-
Proxy Service: Nginx or a similar proxy server is installed to forward requests to the Amnezia application containers.
-
SSL/TLS: The deployment script integrates with Certbot to automatically obtain and renew SSL certificates, ensuring HTTPS encryption for the panel.
-
Custom Domains: The system is configured to use the
hostkey.indomain structure as the primary access point.
Starting, Stopping, and Updating¶
The deployed services are managed using standard system service commands. After installation:
-
Start: Services are started automatically upon completion of the installation script. To manually start the service, use
systemctl start amneziaor the specific container name if managed directly via Docker. -
Stop: To stop the application, execute
systemctl stop amneziaordocker stop <container_name>. -
Update: Updates are applied by re-running the installation script or pulling the latest images if the deployment is container-based, followed by restarting the services.