Creating a Website and an Email Account on Ajenti V
Creating a Website and an Email Account on Ajenti V
We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →

Creating a Website and an Email Account on Ajenti V

Posted Jun 26, 2015 35.8k views Email Monitoring Control Panels Arch Arch Linux CentOS CoreOS Debian FreeBSD RHEL Ubuntu


Ajenti is an open source, web-based control panel that can be used for a large variety of server management tasks. The add-on package called Ajenti V allows you to manage multiple websites from the same control panel. By now you should have Ajenti and Ajenti V installed.

In this tutorial we will setup a basic website using Ajenti V from the Ajenti control panel and create an email account on your website's domain.


For this tutorial, you will need:

Configuring your Domain

So far, https://panel.your_domain_name:8000/ opens the Ajenti control panel. Before we can setup your website at http://your_domain_name/ and configure email addresses for your domain, there are a few DNS modifications that need to be made.

We need to add 2 records to make sure your website and email addresses work properly. Go to and click on the blue View button (it looks like a magnifying glass) for the domain you configured when setting up the Ajenti control panel and Ajenti V.

Click the blue Add Record button, and select MX. In the Enter Hostname text box, enter @. In the Enter Priority text box, enter 10. Then click the blue Create MX Record button.

If you are configuring the same domain that has the Ajenti control panel on it, you also need to add a TXT record. For instance, if you access Ajenti on you should add this record. If you access it on, you do not need to add the TXT record.

To add the TXT record, click the blue Add Record button again, and select TXT. In the Enter Name text box, enter @. In the Enter Text text box, paste this in: v=spf1 a ip4:your_server_ip ~all (replacing the IP with your Droplet's IP). Click the Create TXT Record button.

Your domain DNS settings should now look like this. Note that the domain I used was Your domain will vary.

Example DNS Settings

Your zone file will then look something like this:

$TTL 1800 IN SOA 1434177047 10800 3600 604800 1800 1800 IN NS 1800 IN NS 1800 IN NS 1800 IN A 1800 IN MX 10 1800 IN TXT v=spf1 a ip4: ~all 1800 IN A

Creating the Website Directory

In your browser, browse to and log into Ajenti. In the sidebar to the right, under the Web section, click Websites. The first time it may give you a notice that it is not active yet. Click the Enable button to allow Ajenti V to make the necessary config changes.

There is a section called New Website. Under that there is a Name text field. You can type anything you want to identify your website with in this field. Click the Create button, and you will notice your website is now listed under the Websites section at the top of the page. Click Manage next to your website.

Under the Website Files section, change /srv/new-website to any directory, for example /srv/ Click the Set button, and then click the Create Directory button. Remember this directory. You will need to upload files to it soon.

Under the General tab, uncheck the Maintenance mode setting. Click Apply changes at the bottom of the page.

At the top of the page click on the Domains tab. Click the Add button, and type your domain name in the text field that appears. Click the Apply Changes button.

Creating/Uploading the Website Files

Now that you have a directory for your website files, you need some files to go in it.

Under the Tools section in the sidebar, click File Manager. Click on the folder names to navigate to the directory you created for the website files such as /srv/ The folder should be empty. Here you can upload whatever files and folders you would like for your static website.

For the purposes of this tutorial, we are going to make a simple "Hello world!" document on the website. Click the New File button at the top of the screen. A file named new file should appear in the folder. At the end of the line for the file, click the menu button.

Click the Menu Button

In the Name field, change new file to index.html. Click Save, and open that same menu again. This time, click the Edit button to open a Notepad. The following text is an example of what you could enter to ensure your website is working. Of course, you can enter anything you'd like here instead.

<!DOCTYPE html>
  <title>This website is working!</title>
<h1>Hello, world!</h1>
<p>If you can read this correctly, your website is functional!</p>

Click Save at the top of the Notepad, and the file will go live.

Repeat these steps as needed to build your website. You can also make use of the File Manager's upload function. Back in File Manager, towards the bottom of the screen there is a button titled Choose File. You can click that and a normal prompt to choose a file from your computer to upload will appear. From here, any files you select will be uploaded to the site.

Browse to Your Website

Browse to your domain name such as in your web browser. If you see the "Hello World!" page you made in the last step, everything works!

Hello, world!

You can choose to finish now or read on to create your own email account for your own domain.

Creating an Email Account

Now we will make an email account with your registered domain name.

Go to your Ajenti Control Panel. Under the Web section, click Mail. Click the Enable button if prompted. Under New Mailbox there are a few sections to fill out. The Address text box is whatever you want to come before the @ sign in your email address. If you enter sammy here, your email will be There is also a dropdown box to select a domain. If you have more than one website configured with Ajenti V, there will be multiple options here. Don't put anything in the Custom domain field. After you've filled out this information, click + Mailbox.

As you can see, your new email address now appears under the Mailboxes section of this page. Click it, and then click the Change password link. Type a new password for your mailbox, press ENTER, and then click Apply Changes at the bottom of the screen.

Now click the Advanced tab at the top of the page. In the TLS section, check the box next to enable, then click the Generate new certificate button. After you're done, click Apply changes at the bottom of the page. This increases security when connecting to your mailbox and increases compatibility with email clients.

To retrieve your email, you can connect with an email client (like Outlook, Thunderbird, K-9 Mail, etc.) or you can install RainLoop, a webmail program for accessing your mail in a browser in Ajenti.

To connect to this mailbox in an email client, the following information should be useful:

Password: your_mailbox_password
IMAP Server:
IMAP Port: 143
IMAP Encryption: STARTTLS (Accept all certificates)
SMTP Server:
SMTP Port: 25
SMTP Encryption: None


You should now have a working email account and website for your domain name. They were both created within the Ajenti V Control Panel and can both be modified with the same control panel.

Check out Installing the RainLoop Email Client on Ajenti V if you want to learn how to install a web-based email client on your server.


Creative Commons License