Comment on page
Setup exbuilder deployer
Great! Now that you've got your server and its domain name, you can setup
exbuilder deployer. If you haven't already, check out the Overview video, which explains what exbuilder deployer is doing (and why!). Then, follow the steps below to set exbuilder deployer up on your server. There is another video tutorial to walk you through this part if that's helpful to you.
Setup exbuilder deployer: getting started with exbuilder deployer
git clone https://github.com/exbuilder/deployer.git
To configure exbuilder deployer, you need to create a
.envfile to set some passwords for the deployer's database. From the deployer directory, run
cp .env.sample .env
nanoto edit the two passwords in your
.envfile. You can make these anything you like. Use
nanoand save your changes.
Now you are ready to start the deployer's containers. From the
docker-compose up -d
Then, check to make sure the
exbuilder_deployernetwork has been created with
docker network list
The first build can take a few minutes. Once everything is built, you should have two containers with the following names:
You can check that the containers were stared with
Now you can visit yourwebsite.com:81 - provided you have already created a domain name with
@A records - to access deployer's nginx proxy manager! The first time you login, use the credientials:
When you do, you'll be prompted to change your login and password. You can also access your ngnix proxy manager from your server's IP address on port 81.
You are now hosting your very own nginx proxy manager inside a container on your server called
nginxproxymanager- hooray! Self-hosting means you are holding all of your own data, including any login credentials you use to access your nginx proxy manager (this database is in your
To access your nginx proxy mangager, you'll need to visit your website at port 81: yourwebsite.com:81. We can demonstrate the utility of the proxy manager by creating a subdomain -for example, manage.yourwebsite.com - that points visitors directly to the
nginxproxymanagercontainer for this purpose. Because you are running your nginx proxy manager on the
exbuilder_deployerdocker network, it has access to all of the containers on that network.
This means you can select
Add proxy host, and add a subdomain of your choice (e.g. manage.yourwebsite.com). Then, select http as the
Schemeand use nginxproxymanager (the name of the docker container on the
exbuilder_deployernetwork) as the
Forward Hostname. You'll also need to choose 81 as the
Forwarding Port(the port that container is listenting on) and toggle on Block Common Exploits.
Add proxy host
Before you save, you can secure things a bit more by navigating to the
SSLtab to obtain an SSL cert for this subdomain. Select
Request a new SSL Certificateand then toggle on: Force SSL, HTTP/2 Support, and HSTS Enabled. Enter your email address and toggle on I Agree to the Let's Encrypt Terms of Service. Then save your new proxy host!
Request SSL certificate
Check that it works by visiting the subdomain manage.yourwebsite.com.
Wonderful! Now you can manage all of your proxy hosts at manage.yourwebsite.com. At the moment, anyone on the internet can visit this site. Visitors need login credentials to do anything, but you may wish to secure things a bit more to ensure only authorized users can access this site in the first place.
Your nginx proxy manager provides a way to do this with Access Lists. From the Access List menu, click Add Access List. Give your list a name so you can identify what it is for (e.g. managers). There are two ways to restrict access:
- 1.Authorization: You add usernames and passwords that visitors will have to enter to access your subdomain.
- 2.Access: You deny access to all IP addresses, except those you explicitly allow in the list.
On the details menu, you can toggle on Satisfy Any if visitors can satisfy either the Authorization or Access methods. Once you've selected your methods, edit the proxy host's Access List to select your newly created access list.