Guide to Create and Deploy a Custom and WordPress Website on Akash Network Using a Single SDL File
This guide provides step-by-step instructions to set up a custom and WordPress website and deploy it to Akash using a single SDL (Service Deployment Language) file. The SDL will configure a full installation environment, including the web server, database, and WordPress.
Prerequisites
- Akash CLI installed: Ensure you have the Akash CLI installed and configured.
- Akash account funded: Your Akash wallet should have sufficient funds for deployment.
- Domain setup: Optionally, set up a domain with DNS pointing to your Akash deployment.
- Docker familiarity: Basic understanding of Docker containers as Akash uses containerized workloads.
- Akash SDL template: Use a preconfigured SDL format for Akash deployments.
Step 1: Write the SDL File
Below is an SDL file that includes both a WordPress installation and a MySQL database, deployed in a single setup.
Step 2: Customize the SDL File
- Database Credentials: Update the environment variables in the SDL (
MYSQL_ROOT_PASSWORD
,MYSQL_USER
,MYSQL_PASSWORD
, etc.). - Storage Size: Adjust the
storage.size
parameter for both services based on your expected website and database usage. - CPU and Memory: Allocate appropriate
cpu
andmemory
resources depending on your workload.
Step 3: Deploy to Akash Network
-
Initialize Deployment:
-
Query Lease: Find available providers and create a lease:
-
Verify Deployment: Ensure the deployment is active and the services are running:
-
Access the Website:
- Obtain the deployment’s public IP or domain:
- Configure DNS to map your domain to the provided IP or access via the generated IP.
Step 4: Complete WordPress Setup
- Open the WordPress installation URL in your browser (
http://<deployment_ip>
). - Follow the on-screen instructions to:
- Set up the admin account.
- Configure the website title and language.
- Complete the WordPress installation.
Notes
- File Persistence: To retain WordPress and MySQL data across redeployments, use Akash’s persistent storage or configure external backups.
- Domain Integration: Use services like Cloudflare to easily point your domain to the Akash deployment.
- Security: Secure your deployment by:
- Updating passwords.
- Configuring HTTPS using reverse proxies like Traefik or Nginx.
This setup leverages a single SDL file for ease of deployment, ensuring the entire WordPress stack (web server + database) operates seamlessly on the Akash Network.