Weblogic domain creation script - WLST

In a continuation of our previous weblogic wlst scripts and automation tools. Here comes the weblogic domain creation script to create a new domain with the feature of creating managed servers, machines, clusters.

This script is tested in weblogic11g and 12c



This is a python script that can be used in WLST scripting mode, which lets you create a new domain with more customisable properties like domain name, server name, resource mapping etc.

This script is a properties file-oriented one, which depends on the domain.properties file to create a domain, All the domain-related configuration has to be added in the standard format

[ Note*: Since the properties file name is hard codes into the script, you cannot change the properties file name unless you are changing the properties file name in python script ]


There is a better version of this script with following features

  1. JSON properties file support
  2. Creating Domains with Managed Server and Cluster and Node Manager mapping
  3. Starting the AdminServer
  4. Ansible Integration

You can write an email to [email protected] if you are in need.



Supported weblogic versions

I have tested this script in weblogic 11g and 12c.  it must work in 10 as well.  In case you are getting any errors please comment (or) write to us for support

How to execute this?

To execute this script, you must be having a weblogic WLST environment setup. You can follow the below steps to set wlst environment

setting wlst environment


  1. Go to your WLS_HOME ( wlserver directory with server and common child directories)
  2. Go to WLS_HOME/server/bin
  3. Execute the setWLSEnv.sh (or) setWLSEnv.cmd script  with two separated dots for sourcing like follows
. ./setWLSTEnv.sh


Downloading the script to the server

At the end of this post, you would be able to see the python script wls_domain_creator.py and demo domain.properties file, copy them to your server and place it in any directory.

It is mandatory that you have keep the files under the same directory

Once you are ready with the aforementioned steps you are all set to execute the script by executing the following command

java weblogic.WLST wls_domain_creator.py

If there are no issues with the steps executed, You would be able to see the script starting.

If you still have questions, Please refer to this video demo.

Hope it clarifies everything. If you still have questions (or) issues. Feel free to contact us using the comment section (or) you can write to us at mailto:[email protected]


The Python Script

The domain.Properties file

Updated Execution Output


Hope this helps as usual.


Sarav AK

Follow me on Linkedin My Profile
Follow DevopsJunction onFacebook orTwitter
For more practical videos and tutorials. Subscribe to our channel

Buy Me a Coffee at ko-fi.com

Signup for Exclusive "Subscriber-only" Content