Simple message board software and also a fork.
You can try it out using Docker
, for testing purposes you can skip configuring .env
file and just run:
docker-compose up -d
And then you can navigate to localhost:1337
to see your very own forum!
To host it and install it you have to have:
- Golang
- Postgresql
- Git
- Make
- Systemd (optional)
Here is how to build vpub:
git clone https://github.com/hugmouse/vpub-plus.git
cd vpub-plus
make
You should now have vpub
in ./bin/
!
For isolation purposes, we can create a user that is going to run a vpub
instance
useradd vpub
Make sure that vpub
group exists too! And if it does not, then:
groupadd vpub
Make sure that you have postgresql installed!
- Create a new database:
createdb vpub
(or create it frompsql
)
Now you have to set those environment variables:
DATABASE_URL
- Postgresql connection URLSESSION_KEY
- 32 bytes long session keyCSRF_KEY
- 32 bytes longs CSRF keyCSRF_SECURE
- Makes CSRF cookies secure (true
/false
)PORT
- What port is going to be used by avpub
HTTP server
You can check the example configuration in systemd config!
At this point you can run vpub
just fine, other steps are optional ones
Create a /etc/systemd/system/vpub.service
file and add this example config to there:
[Install]
WantedBy=multi-user.target
[Unit]
Description="Message board"
Documentation="https://github.com/hugmouse/vpub-plus"
[Service]
ExecStart=/usr/local/bin/vpub
User=vpub
Group=vpub
Environment=DATABASE_URL=postgres://[email protected]/vpub?sslmode=disable
# Default port 8080
Environment=PORT=1337
# Those keys should be 32 bytes long
Environment=SESSION_KEY=CHANGE ME
Environment=CSRF_KEY=CHANGE ME
# If you are going to use HTTPS, then use secure cookies
Environment=CSRF_SECURE=true
After that you just can run it like any other systemd service: systemctl enable --now vpub
If something goes wrong, you can use journalctl -eu vpub
to troubleshoot this service
At this point a vpub
service should be running on a 1337 port without HTTPS.
- You can add a reverse proxy, like
NGINX
, to handle a secure connection - You can install a
certbot
that is going to create a let's encrypt cert for your domain
On the first run vpub
will create an admin user with the password "admin".
Log in and change it by navigating to /admin/users
route.
To register you have to have a unique key! Create one on /admin/keys
page and use it to create a new user account.
You need to change the URL
in settings to pass the atom feed check.
Specify your domain name in /admin/settings/edit
like this: https://example.com/
.