# tuwunel

services:
    matrix:
        image: ghcr.io/matrix-construct/tuwunel:latest
        restart: unless-stopped
        ports:
            - 8448:6167
        volumes:
            - /home/matrix/tuwunel-db:/var/lib/tuwunel
            #- ./tuwunel.toml:/etc/tuwunel.toml
        security_opt:
          - "label=disable"
        userns_mode: keep-id
        environment:
            TUWUNEL_SERVER_NAME: matrix.reeseapps.com # EDIT THIS
            TUWUNEL_DATABASE_PATH: /var/lib/tuwunel
            TUWUNEL_PORT: 6167
            TUWUNEL_MAX_REQUEST_SIZE: 200000000 # in bytes, ~200 MB
            TUWUNEL_ALLOW_REGISTRATION: 'false'
            # TUWUNEL_REGISTRATION_TOKEN: 'YOUR_TOKEN' # A registration token is required when registration is allowed.
            #TUWUNEL_YES_I_AM_VERY_VERY_SURE_I_WANT_AN_OPEN_REGISTRATION_SERVER_PRONE_TO_ABUSE: 'true'
            TUWUNEL_ALLOW_FEDERATION: 'true'
            TUWUNEL_ALLOW_CHECK_FOR_UPDATES: 'true'
            TUWUNEL_TRUSTED_SERVERS: '["matrix.org"]'
            #TUWUNEL_LOG: warn,state_res=warn
            TUWUNEL_ADDRESS: 0.0.0.0
            #TUWUNEL_CONFIG: '/etc/tuwunel.toml' # Uncomment if you mapped config toml above
