FlaskBB
A lightweight forum software in Flask
Member
Joined:
Posts: 3

I have created a website using Python Flask which has its own registration and login system. I'm using SQLite3 for the database. Is there a way to integrate that with a FlaskBB forum? And how would I have the forum installation at a different URL (http://domain.com/forum)?

Administrator
avatar
Joined:
Posts: 139

You mean sharing username/password with flaskbb?

And how would I have the forum installation at a different URL

It depends on the reverse proxy you are using. I have included a example for nginx in docs here: https://flaskbb.readthedocs.io/en/latest/installation.html#nginx

server {
    listen 80;
    server_name yourdomain.com;

    access_log /var/log/nginx/access.forums.flaskbb.log;
    error_log /var/log/nginx/error.forums.flaskbb.log;

    location /forums {
        try_files $uri @flaskbb;
    }

    # Static files
    location /static {
       alias /var/apps/flaskbb/flaskbb/static/;
    }

    location ~ ^/_themes/([^/]+)/(.*)$ {
        alias /var/apps/flaskbb/flaskbb/themes/$1/static/$2;
    }

    # robots.txt
    location /robots.txt {
        alias /var/apps/flaskbb/flaskbb/static/robots.txt;
    }

    location @flaskbb {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header SCRIPT_NAME /forums;  # This line will make flaskbb work on /forums;
        proxy_redirect off;
        proxy_buffering off;

        proxy_pass http://127.0.0.1:5000;
    }
}

Cheers! 🍻

Member
Joined:
Posts: 3

Yeah, so if they register on my site, they will be able to login to the forum with those details

Administrator
avatar
Joined:
Posts: 139

Unfortunately this isn't possible yet (and tbh I haven't spent much time thinking about it - but this should definitely go into the next version of FlaskBB)


Cheers! 🍻

Member
Joined:
Posts: 3

Sounds good. Do you think it will be something complicated that might take some time?

Member
Joined:
Posts: 96

sh4nks wrote:

Unfortunately this isn't possible yet (and tbh I haven't spent much time thinking about it - but this should definitely go into the next version of FlaskBB)
1000%, this is the only reason i have scrolled through the threads to see if anyone mentioned it haha

Member
Joined:
Posts: 1

Integration support would be very nice; it would make FlaskBB a useful asset to any Flask application that needs a forum component. Most popular forum software is PHP based which makes integration tricky. I recognize that it's not trivial to implement, though.

Administrator
avatar
Joined:
Posts: 139

Integration support would be very nice; it would make FlaskBB a useful asset to any Flask application that needs a forum component. Most popular forum software is PHP based which makes integration tricky. I recognize that it's not trivial to implement, though.

I totally agree! After the new Plugin System has been merged into I'll have a deeper look into that.


Cheers! 🍻