Install Bark

Official Repository https://github.com/Finb/bark-server

Method A: With Docker:

docker run -dt --name bark -p 8080:8080 -v `pwd`/bark-data:/data finab/bark-server

Method B: With Docker Compose:

mkdir bark-server && cd bark-server

curl -sL https://github.com/Finb/bark-server/raw/master/deploy/docker-compose.yaml > docker-compose.yaml

docker compose up -d

Nginx Template:

# please replace yourfilepath with your real ssl certificates path in line 18,19,37

server {
    listen 80;
    listen [::]:80;
    # Replace yourdomain.com with your real domain name.
    server_name yourdomain.com;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    # Replace yourdomain.com with your real domain name.
    server_name yourdomain.com;

    ssl_certificate /yourfilepath/yourdomain.com/fullchain.pem;
    ssl_certificate_key /yourfilepath/yourdomain.com/privkey.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:MozSSL:10m;  # about 40000 sessions
    ssl_session_tickets off;

    # modern configuration
    ssl_protocols TLSv1.3;
    ssl_prefer_server_ciphers off;

    # HSTS (ngx_http_headers_module is required) (63072000 seconds)
    add_header Strict-Transport-Security "max-age=63072000" always;

    # OCSP stapling
    ssl_stapling on;
    ssl_stapling_verify on;

    # verify chain of trust of OCSP response using Root CA and Intermediate certs
    # ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates;
    ssl_dhparam /yourfilepath/ssl-dhparams.pem;

    # replace with the IP address of your resolver
    #resolver 127.0.0.1;

    location / {

        log_not_found on;
        # Replace http://192.168.1.123:8080 with the listening address of the bark server.
        proxy_pass http://192.168.1.123:8080;

        proxy_read_timeout 300;
        proxy_connect_timeout 300;
        proxy_redirect off;

        proxy_set_header Host              $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP         $remote_addr;

    }
}
Scroll to Top