Install on Azure using ARM
This version of the installation tutorial deploys Squidex along with MongoDB (for datastore) and Caddy (for reverse proxy along with SSL) as a Container Group in Azure using an Azure Resource Manager or ARM template. The approach is called Infrastructure as Code.
The tutorial does not cover the basics of Azure. You should be familiar with them before you begin with the installation instructions.
This tutorial runs MongoDB as a single container and is recommended for non-production or trial environments. For production environments, it is best to use one of the MongoDB Atlas (or Enterprise) offerings from Azure marketplace, which provides capabilities such as High Availability.
Use this tutorial as a getting started guide in Azure to explore Squidex and use it as a Dev/Sandbox environment. This setup may not be recommended for a production environment.
Prerequisites
Before you begin, ensure you meet the following requirements:
An active Azure subscription.
The following providers registered in your Azure subscription:
Microsoft.ContainerInstance
Microsoft.Storage
Deployment Specifications & Other Details
The ARM template creates the following Azure resources:
An Azure Storage Account
Azure Container
Azure Share
Azure Container Instances (Group)
Squidex Web App Container (latest image)
MongoDB Container (latest image)
Caddy container (latest image)
Important Details
Default resource allocations
Squidex container: 1 vCPU and 1.5 GiB memory
MongoDB container: 2 vCPU and 2 GiB memory
Caddy container: 1 vCPU and 1.5 GiB memory
Squidex and MongoDB containers remain private and are not exposed to public.
Squidex talks to MongoDB without authentication (mongodb://localhost:27017). Since MongoDB is private it cannot be accessed from outside, hence secure to an extent. With the current setup you cannot connect using an external client like MongoDB Compass. You can however connect from Azure Container Instance, click here for instructions
Caddy reverse proxies to the Squidex Web App container.
An FQDN is provided by Azure Container Instance, Caddy provides SSL for this as the FQDN does not come with SSL. This FQDN is set as the
URLS__BASEURL
andVIRTUAL_HOST
for Squidex configuration.
NOTE: If you wish to modify any of the variables such as vCPU, Memory etc., you can do so by editing the ARM template. Click [here](#modifying-arm-variables) for basic instructions.
1. Launch the ARM Template
Simply click Deploy to Azure button to load the template in Azure Portal, fill in a few details (instructions below) and deploy Squidex.
2. Configure Details
On the Custom deployment page complete the following steps to submit the deployment.
Select your Subscription from the list.
Select an existing Resource group or click Create new to create a new Resource group.
If creating a new Resource group, enter a name and click Ok.
Select your preferred Region from the list.
Enter a name for the Container Group in Container Name field. (It uses the Resource Group name by default but you are free to change it)
If you wish to provide your own Domain/Sub-domain (e.g. example.com or squidex.example.com) enter it in the Squidex Domain field, otherwise leave it blank.
Click Review + create.
Ensure that the validation is successful.
Click Create to submit the deployment.
The deployment process will take a few minutes. (Preferably do not navigate away from this page)
3. Access Squidex
Once the deployment is complete, Click Outputs in the deployment page to retrieve the URL.
Copy the URL.
Alternatively, you can also retrieve the FQDN anytime from the Azure Container Instances blade.
NOTE: This is only for deployments where custom domain is NOT provided
4. Update DNS Record (For Own Domain Deployments Only)
Navigate to Azure Container Instances page, click on the Container instance (i.e. squidex) to access the details.
Under Overview, to the right you should find the IP Address (Public) value, copy it.
Now access your domain control panel, and create an A Record pointing your domain to this IP address.
Continue with the next steps once the DNS propagation is done, this will depend on your domain provider.
NOTE: The SSL certificates are not generated (by Caddy) until the DNS resolution works
5. Completing Squidex Installation
Open the URL in a browser to load the Squidex Installation Page.
It may take a few minutes before the certificates are generated and the URL starts working. For own domain scenarios this process may be even take longer
Create the Admin User to complete the installation and login to Squidex.
Azure Troubleshooting
Validation Failed
Ensure all the fields have been populated.
If you are rerunning the ARM template (either another installation or due to a previous failure) and using the same names, change them (or delete previously created resources).
Deployment failed
In the Microsoft template deployment window click Deployment failed. Click here for more details to view the error details and look for clues. This tutorial does not go into the details of Azure troubleshooting.
NOTE: Use _Redeploy_ to resubmit the deployment again (after fixing errors). This continues the operation instead of creating a fresh deployment.
Containers in waiting, failed or terminated status.
Restart the Azure Container Instance
Squidex Issues
It is very likely a configuration problem and not related to Azure. Please visit the following page:
Connecting to MongoDB Instance
On the Azure Portal, navigate to Container Instances page
Click on your Container Instance (e.g.
squidex-crm
)Select Containers from the left navigation menu
Select the MongoDB container (i.e.
etc-squidex-assets-mongodb
) by clicking on itSelect the Connect tab
Ensure /bin/bash is selected
Click Connect again
This will drop you into the Container Shell. Type mongosh
to connect to MongoDB shell.
Modifying ARM Variables
After clicking Deploy to Azure button, click Edit template.
Click Variables on left and this should show the variables section on the right.
You can now change any of the variables such as
mongoDBCPUCores
ormongoDBMemory
etc.
Last updated