2019-01-27 12:55:46 +01:00
!!! warning
2019-01-27 12:55:56 +01:00
Make sure you've read ["Prepare Your System" ](https://mailcow.github.io/mailcow-dockerized-docs/prerequisite-system ) before proceeding!
2019-01-27 12:55:46 +01:00
2017-05-01 21:30:51 +02:00
You need Docker and Docker Compose.
2017-07-05 12:05:40 +02:00
**1\.** Learn how to install [Docker ](https://docs.docker.com/engine/installation/linux/ ) and [Docker Compose ](https://docs.docker.com/compose/install/ ).
2017-05-01 21:30:51 +02:00
Quick installation for most operation systems:
- Docker
```
2017-12-30 18:16:30 +01:00
curl -sSL https://get.docker.com/ | CHANNEL=stable sh
2018-02-28 20:33:36 +01:00
# After the installation process is finished, you may need to enable the service and make sure it is started (e.g. CentOS 7)
systemctl enable docker.service
systemctl start docker.service
2017-05-06 02:07:53 +02:00
```
2017-05-01 21:30:51 +02:00
- Docker-Compose
```
curl -L https://github.com/docker/compose/releases/download/$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
```
Please use the latest Docker engine available and do not use the engine that ships with your distros repository.
2018-02-28 20:33:36 +01:00
**2\.** Clone the master branch of the repository, make sure your umask equals 0022.
2017-05-01 21:30:51 +02:00
```
2018-02-28 20:33:36 +01:00
# umask
0022
# cd /opt
# git clone https://github.com/mailcow/mailcow-dockerized
# cd mailcow-dockerized
2017-05-01 21:30:51 +02:00
```
2017-07-05 12:05:40 +02:00
**3\.** Generate a configuration file. Use a FQDN (`host.domain.tld`) as hostname when asked.
2017-05-01 21:30:51 +02:00
```
./generate_config.sh
```
2017-07-05 12:05:40 +02:00
**4\.** Change configuration if you want or need to.
2017-05-01 21:30:51 +02:00
```
nano mailcow.conf
```
If you plan to use a reverse proxy, you can, for example, bind HTTPS to 127.0.0.1 on port 8443 and HTTP to 127.0.0.1 on port 8080.
2017-05-19 10:17:40 +02:00
You may need to stop an existing pre-installed MTA which blocks port 25/tcp. See [this chapter ](https://mailcow.github.io/mailcow-dockerized-docs/firststeps-local_mta/ ) to learn how to reconfigure Postfix to run besides mailcow after a successful installation.
2017-05-01 21:30:51 +02:00
2017-10-25 14:27:08 +02:00
**4\.1\.** OpenStack users and users with a MTU not equal to 1500:
Edit `docker-compose.yml` and change the network settings according to your MTU.
Add the new driver_opts parameter like this:
```
networks:
mailcow-network:
...
driver_opts:
com.docker.network.driver.mtu: 1450
...
```
2017-07-05 12:05:40 +02:00
**5\.** Pull the images and run the composer file. The parameter `-d` will start mailcow: dockerized detached:
2017-05-01 21:30:51 +02:00
```
docker-compose pull
docker-compose up -d
```
Done!
You can now access **https://${MAILCOW_HOSTNAME}** with the default credentials `admin` + password `moohoo` .
The database will be initialized right after a connection to MySQL can be established.