setup https on Revolt (with Let's encrypt and Nginx) #22

Closed
opened 2026-02-16 12:51:09 -05:00 by yindo · 6 comments
Owner

Originally created by @Cocam123 on GitHub (Feb 23, 2022).

Hello,

I would like to know if it is possible to activate an https (for Revolt) with let's encrypt and Nginx.

I can only put the port 5000 (which works with Nginx to display the login page)

To connect (as a request is sent to port 8000) I can't get it to https with let's encrypt. I would like to know if it is possible to switch the port to https

Thanks in advance for your answers

Originally created by @Cocam123 on GitHub (Feb 23, 2022). Hello, I would like to know if it is possible to activate an https (for Revolt) with let's encrypt and Nginx. I can only put the port 5000 (which works with Nginx to display the login page) To connect (as a request is sent to port 8000) I can't get it to https with let's encrypt. I would like to know if it is possible to switch the port to https Thanks in advance for your answers
yindo closed this issue 2026-02-16 12:51:09 -05:00
Author
Owner

@Ikun886-cxk commented on GitHub (Feb 25, 2022):

You can configure the reverse proxy.

@Ikun886-cxk commented on GitHub (Feb 25, 2022): You can configure the reverse proxy.
Author
Owner

@Cocam123 commented on GitHub (Feb 25, 2022):

actually, I don't know if my configuration is good enough for the other requests to be in https
(I changed my domain name and ip to "domain.com" and "ip")

map $http_host $revolt_upstream {
domain.com http://ip:5000; #revolt app
domain.com:8000 http://ip:8000; #API
domain.com:9000 http://ip:9000; #ws
domain.com:3000 http://ip:3000; #Autumn
domain.com:7000 http://ip:7000; #January
domain.com:8080 http://ip:8080; #vortex
}

server {
server_name domain.com *.domain.com;

if ($http_upgrade) {
rewrite ^(.*)$ /ws_78dd759593f041bc970fd7eef8b0c4af$1;
}

location / {
proxy_pass $revolt_upstream;
proxy_set_header Host $host;
}

location /ws_78dd759593f041bc970fd7eef8b0c4af/ {
proxy_pass $revolt_upstream/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_read_timeout 24h;
}

listen 80; # managed by Certbot

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/cocamserverguild.ddns.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/cocamserverguild.ddns.net/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

@Cocam123 commented on GitHub (Feb 25, 2022): actually, I don't know if my configuration is good enough for the other requests to be in https (I changed my domain name and ip to "domain.com" and "ip") map $http_host $revolt_upstream { domain.com http://ip:5000; #revolt app domain.com:8000 http://ip:8000; #API domain.com:9000 http://ip:9000; #ws domain.com:3000 http://ip:3000; #Autumn domain.com:7000 http://ip:7000; #January domain.com:8080 http://ip:8080; #vortex } server { server_name domain.com *.domain.com; if ($http_upgrade) { rewrite ^(.*)$ /ws_78dd759593f041bc970fd7eef8b0c4af$1; } location / { proxy_pass $revolt_upstream; proxy_set_header Host $host; } location /ws_78dd759593f041bc970fd7eef8b0c4af/ { proxy_pass $revolt_upstream/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header Connection $http_connection; proxy_set_header Upgrade $http_upgrade; proxy_read_timeout 24h; } listen 80; # managed by Certbot listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/cocamserverguild.ddns.net/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/cocamserverguild.ddns.net/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot }
Author
Owner

@whiskeytangofoxy commented on GitHub (Mar 15, 2022):

I would like to know if it is possible to activate an https (for Revolt) with let's encrypt and Nginx.

I can only put the port 5000 (which works with Nginx to display the login page)

To connect (as a request is sent to port 8000) I can't get it to https with let's encrypt. I would like to know if it is possible to switch the port to https

Having the exact same issue with regards to port 8000 connections and https. Works fine in http.

@whiskeytangofoxy commented on GitHub (Mar 15, 2022): > I would like to know if it is possible to activate an https (for Revolt) with let's encrypt and Nginx. > > I can only put the port 5000 (which works with Nginx to display the login page) > > To connect (as a request is sent to port 8000) I can't get it to https with let's encrypt. I would like to know if it is possible to switch the port to https Having the exact same issue with regards to port 8000 connections and https. Works fine in http.
Author
Owner

@nagyrobi commented on GitHub (Mar 17, 2022):

You can configure the reverse proxy.

How?

@nagyrobi commented on GitHub (Mar 17, 2022): > You can configure the reverse proxy. How?
Author
Owner

@Alauraa commented on GitHub (Mar 22, 2022):

Cocam123 > Nginx config stuff

Would IP be external IP or Internal?

@Alauraa commented on GitHub (Mar 22, 2022): > Cocam123 > Nginx config stuff Would IP be external IP or Internal?
Author
Owner

@insertish commented on GitHub (Apr 29, 2022):

In an effort to clean up the global issue tracker, I'm currently consolidating all issues regarding self-hosting into https://github.com/revoltchat/self-hosted/issues/25#issuecomment-1113606628.

@insertish commented on GitHub (Apr 29, 2022): In an effort to clean up the global issue tracker, I'm currently consolidating all issues regarding self-hosting into https://github.com/revoltchat/self-hosted/issues/25#issuecomment-1113606628.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/self-hosted#22