Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Running weechat on a remote server behind nginx

Install package

yum install epel-release
yum install weechat

Configure weechat

$ weechat
> /relay add weechat 9001
> /set relay.network.password YOURPASSWORD

Configure nginx to proxy the requests to /weechat

map $http_upgrade $connection_upgrade {
    default upgrade;
    '' close;
}

upstream weechat {
    server 127.0.0.1:9001;
}

server {
    listen       443 ssl;
    server_name  _;

    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    location /weechat {
        proxy_pass http://weechat;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 8h;
    }
}

Glowing Bear

Access https://www.glowing-bear.org.

Specify your server name, port 443 and relay password.

Now you can use it as if you were in Weechat itself (/server add, /connect, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment