Running on alternate ports

I’m trying to run devilbox on a shared machine that I have where I already have the native ubuntu apache running on port 80 and mysql running on 3306

So when trying to do the docker-compose up -d, it throws errors

I’ve modified both the env file and the yml file, trying to move devilbox to port 8080 and mysql to 3307 - is that possible?

I’m following the following

which as I read it, seems to say that only the php versions uncommented in the env file should be pulled down during the initial start up
first time I ran it pulled down every PHP version, although 7.2 was the only one uncommented :


I had to modify the IMAGES line below - taking out the #*
IMAGES="( grep -Eo '^PHP_SERVER=[.0-9]+' "{CWD}/env-example" | sed ‘s/.*=//g’ )" will initially pull or update every single version that could be enabled via the Devilbox. If you simply want to pull the versions you have selected use docker-compose pull

Yes, that is very much possible via .env file

# Change ports of MySQL

# Change ports of HTTPD

For more detailed information about the .env file, have a look here: .env file — Devilbox 1.0 documentation

Hey, so - a few followup questions, I followed the advice here, and made a few modifications to avoid my existing host servers’ port bindings, but now I’m unsure of how to set up my DNS and access the vhost locations in the container…


How would I set my DNS?
I assume isn’t correct, but the wizardry of docker “networks” is beyond my comprehension…
I tried the default of testone.loc in /etc/hosts, that did not work unsurprisingly, but I’m not sure how to correctly refer to the assets to be served.

I was also wondering if there was a way to configure the included Postfix instance to send email externally? is the file present in the container somewhere?

Thank you in advance!

I haven’t used this much recently, but here is my config …

Default here, so


I am using ports 8080 for the webserver and 8443 for SSL

Expose HTTPD Port to Host


/etc/hosts entries to my virt hosts with a .loc extension : geolaw.loc corleen.loc

And I have my websites in the data/www/ directory off the devilbox directory :

]$ ls -la data/www
total 16K
drwxr-xr-x 4 glaw glaw 4.0K Jan 28 12:04 .
drwxrwxr-x 7 glaw glaw 4.0K Jan 28 11:38 …
drwx–x--x 8 glaw glaw 4.0K Jan 28 14:57 corleen
drwxrwxr-x 3 glaw glaw 4.0K Jan 28 11:49 geolaw
-rw-rw-r-- 1 glaw glaw 0 Jan 28 11:38 .keepme

So from the machine running devilbox, I can hit corleen.loc:8080 and geolaw.loc:8080

I think to do the 192.168.xx.xx local address, you would need to bring those addressed up on the host machine (ie additional virtual adresses - eth0:1 eth0:2 ) and then pass those through to docker

Hey thanks!!

I ended up just using docker’s internal 172 address, and using an NGINX proxy

So my server has an aaddresss 192.xxxxx and on port 9089, it does a proxy pass to 172.xxxx:9089.
Its really clunky to me, but it works. I think I’m just not getting the whole docker concept just yet, your solution seems to at least represent the right kind of thinking, when this storm passes I’ll do a little more testing and feeling to gain some competency here…

Now on to fair Postfix!

P.S. - my Nginx config if you’re interested:

vim /etc/nginx/conf.d/devilbox.conf

server {
listen 8098 ssl;
ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
ssl on;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_http_version 1.1;


@mjhd regardint the Postfix setup, there is currently no easy way to disable this (as far as I remember). The catch-all is enabled by this env variable:

You can try to hard-code this to 0 in the docker-compose.yml and see if that works out for you or not. (It’s really been a long time since I hacked that together). Let me know either way and I will probably have to reconsider the Postfix setup.

Hey ok, I’m going to take a look over the next day or two… I’m trying to build a simple, per user, sync/backup/restore application and I’m going to try out UserFrosting, which requires working SMTP. I’ll let you know what I find out and if I come up with any workable solutions :smiley: