This guide provides step-by-step instructions on deploying a SoftEther VPN server on the Akash Network.
Prerequisites
- Akash CLI Installed: Ensure you have the Akash CLI installed. Follow the Akash CLI Installation Guide if needed.
- AKT Tokens: Verify that your Akash wallet has sufficient AKT tokens to cover deployment costs.
- SoftEther VPN Docker Image: Use a SoftEther VPN Docker image compatible with Akash’s infrastructure.
Steps to Deploy SoftEther VPN
-
Set Up Environment Variables
Configure your environment with the necessary Akash settings:
Terminal window export AKASH_FROM=your_wallet_nameexport AKASH_KEYRING_BACKEND=testexport AKASH_GAS=autoexport AKASH_GAS_PRICES=0.025uaktexport AKASH_GAS_ADJUSTMENT=1.5export AKASH_BROADCAST_MODE=syncexport AKASH_NODE=https://rpc.testnet-02.aksh.pw:443export AKASH_CHAIN_ID=$(curl -s -k $AKASH_NODE/status | jq -r '.result.node_info.network')Replace
your_wallet_name
with your actual wallet name. Adjust other variables as necessary. -
Create or Recover Your Wallet Key
If you don’t have a wallet key, create one:
Terminal window provider-services keys add $AKASH_FROMTo recover an existing key:
Terminal window provider-services keys add $AKASH_FROM --recover -
Obtain AKT Tokens
Acquire AKT tokens from the faucet to fund your deployment:
Terminal window curl -s https://faucet.testnet-02.aksh.pw/request?address=$(provider-services keys show $AKASH_FROM -a) | jq -
Generate and Publish Your Client Certificate
Generate a client certificate:
Terminal window provider-services tx cert generate clientPublish the certificate:
Terminal window provider-services tx cert publish client -
Create a Deployment Manifest
Develop a deployment manifest (
deploy.yml
) for your SoftEther VPN server. Here’s an example:version: "2.0"services:vpn:image: your_softether_imageexpose:- port: 443external: trueprotocol: tcpReplace
your_softether_image
with the Docker image you intend to use. -
Deploy the VPN Server
Submit the deployment request:
Terminal window provider-services tx deployment create deploy.ymlMonitor the deployment status:
Terminal window provider-services query market order list --state openAccept a bid from a provider:
Terminal window provider-services tx market lease create --dseq your_dseq --provider your_provider_addressReplace
your_dseq
andyour_provider_address
with the appropriate values obtained from the previous command. -
Send the Deployment Manifest to the Provider
Terminal window provider-services send-manifest deploy.yml --dseq your_dseq -
Deposit Additional AKT for Lease Duration
Ensure your deployment has sufficient funds:
Terminal window provider-services tx deployment deposit 10000000uakt --dseq your_dseq -
Verify Deployment and Retrieve Connection Details
Check the lease status:
Terminal window provider-services lease-status --dseq your_dseq --provider your_provider_addressRetrieve the assigned IP address and port mapping:
Terminal window provider-services lease-logs --dseq your_dseq --provider your_provider_addressNote the external IP and port assigned to your VPN service.
-
Configure VPN Clients
Use the provided connection details to configure your VPN client. For SoftEther VPN, you may need to adjust settings based on the assigned IP and port.
Additional Notes
-
Port Mapping Limitations: Akash does not currently support direct (1:1) port mapping. To determine the mapped ports, use:
Terminal window provider-services lease-statusFor VPN services, it’s recommended to use OpenVPN over TCP port 443, as it works reliably within Akash’s networking constraints. Source
-
Client Configuration: After deployment, download the client certificate from the Akash dashboard. Modify the
remote
setting in the.ovpn
file to reflect the assigned IP and port. This configuration enables your OpenVPN client to connect to the SoftEther VPN server deployed on Akash.
Conclusion
By following these steps, you can successfully deploy a SoftEther VPN server on the Akash Network using the provider-services
CLI tool. Ensure you monitor your deployment’s status and maintain adequate AKT funds to keep your VPN service operational.
For more detailed guides and community discussions, consider exploring the following resources:
- Deploying a VPN Server in Akash
- SoftEther VPN Server on Akash with OpenVPN Client
- SoftEther VPN on Akash Network Deployment Guide
These resources offer additional insights and community experiences that can further assist you in deploying and managing your VPN service on Akash.