# Mailcow

# Preparation
## Docker Compose

Install Docker
# Prep
# Portforwads:

https://docs.mailcow.email/getstarted/prerequisite-system/#firewall-ports





```
sudo apt install docker.io
```
Install Docker Compose
```
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
```
## Check SELinux specifics¶
Install SELinux
```
sudo apt install policycoreutils selinux-utils selinux-basics
sudo selinux-activate
sudo selinux-config-enforcing
```

Enable SELinux by creating the file `/etc/docker.daemon.json` with the content:
```
{
  "selinux-enabled": true
}
```


# Install

Create the file `compose.yaml` with this content:
```
services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    environment:
      DOMAIN: "https://vw.domain.tld"
    volumes:
      - ./vw-data/:/data/
    ports:
      - 80:80
```
Start the Container with:
```
docker-compose -f compose.yaml up -d
```

# Sources
- [Docker-Compose](https://wiki.crowncloud.net/?How_to_Install_and_use_Docker_Compose_on_Ubuntu_24_04)
- [SELinux](https://linuxconfig.org/how-to-disable-enable-selinux-on-ubuntu-22-04-jammy-jellyfish-linux)