So does anybody have a walkthrough on how to set this beastie up? I’m not unfamiliar with docker and containers (I have personal Mastodon, Nextcloud, and Synapse Instances running via docker-compose)
Sort of where I’m stuck right now is what I need to change in the .env file, per the instructions here:
$ sudo apt-get install git
$ git clone https://codeberg.org/Kbin/kbin-core.git kbin
$ cd kbin
$ mkdir public/media
$ sudo chown 82:82 public/media
$ sudo chown 82:82 var
$ cp .env.example .env
$ vi .env # esc + !q + enter to exit
or
$ nano .env
Make sure you have substituted all the passwords and configured the basic services in .env file.
(yes, I know it’s somewhat commented, but it’s not exactly super clear) and also how to handle building it in a non-local configuration (my VPS is elsewhere, so going to kbin.localhost to do anything isn’t really going to work)
So yeah, ELI5.
-
I ignored the thing about kbin.localhost and everything on https://feddit.online is working well, also in my test environment. So, you can probably skip it too.
-
The “var” folder will not be found in the kbin folder so the chown will not work. What I did, and from other comments that I’ve read, I think this is what it should have been, “sudo chown 82:82 /var”
Here’s my .env file without the secrets.
Where I mention a long secret, you can use this Linux command to generate a strong 32-character secret
openssl rand -hex 32kbin variables
SERVER_NAME=“feddit.online”
KBIN_DOMAIN=feddit.online
KBIN_TITLE=/kbin
KBIN_DEFAULT_LANG=en
KBIN_FEDERATION_ENABLED=true
KBIN_CONTACT_EMAIL=admin@feddit.online
KBIN_SENDER_EMAIL=notifications@feddit.online
KBIN_JS_ENABLED=true
KBIN_REGISTRATIONS_ENABLED=true
KBIN_API_ITEMS_PER_PAGE=25
#Frankly unsure if the next line does anything
KBIN_STORAGE_URL=https://media.feddit.online
KBIN_META_TITLE=“Kbin Lab”
KBIN_META_DESCRIPTION=“content aggregator and micro-blogging platform for the fediverse”
KBIN_META_KEYWORDS=“kbin, content agregator, open source, fediverse”
KBIN_HEADER_LOGO=false
KBIN_CAPTCHA_ENABLED=trueRedis
REDIS_PASSWORD=password_here_that_you_make_up
REDIS_DNS=redis://${REDIS_PASSWORD}@redisS3 storage (optional) THIS DOES NOTHING. TURNS OUT IT ONLY WORKS WITH AWS S3 AND I WANT TO USE WASAB
SO THESE SETTINGS ARE NOT USED
S3_KEY=<key>
S3_SECRET=<secret>
S3_BUCKET=media.feddit.online
S3_REGION=us-east-1
S3_VERSION=latestoAuth (optional)
OAUTH_FACEBOOK_ID=
OAUTH_FACEBOOK_SECRET=
OAUTH_GOOGLE_ID=
OAUTH_GOOGLE_SECRET=
OAUTH_GITHUB_ID=
OAUTH_GITHUB_SECRET=###> symfony/framework-bundle ###
APP_ENV=prod
APP_SECRET=427f5e2940e5b2472c1b44b2d06e0525
###< symfony/framework-bundle ######> doctrine/doctrine-bundle ###
Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
==========
POSTGRES_DB=kbin
POSTGRES_USER=kbin
POSTGRES_PASSWORD=password_here_that_you_make_up
POSTGRES_VERSION=13
DATABASE_URL=“postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1:5432/${POSTGRES_DB}?serverVersion=${POSTGRES_VERSION}&charset=utf8”
###< doctrine/doctrine-bundle ######> symfony/messenger ###
Choose one of the transports below
RABBITMQ_PASSWORD=password_here_that_you_make_up
MESSENGER_TRANSPORT_DSN=amqp://kbin:${RABBITMQ_PASSWORD}@rabbitmq:5672/%2f/messages
#MESSENGER_TRANSPORT_DSN=doctrine://default
#MESSENGER_TRANSPORT_DSN=redis://${REDIS_PASSWORD}@redis:6379/messages
###< symfony/messenger ######> symfony/mailer ###
#MAILER_DSN=smtp://localhost
###< symfony/mailer ######> symfony/mailgun-mailer ###
MAILER_DSN=mailgun://KEY:DOMAIN@default?region=us
#MAILER_DSN=mailgun+smtp://postmaster@sandboxxx.mailgun.org:key@default?region=us
MAILER_DSN=smtp://notifications@feddit.online:<password here>@smtp.dreamhost.com:587
###< symfony/mailgun-mailer ######> symfony/mercure-bundle ###
See https://symfony.com/doc/current/mercure.html#configuration
The URL of the Mercure hub, used by the app to publish updates (can be a local URL)
MERCURE_URL=https://feddit.online/.well-known/mercure
The public URL of the Mercure hub, used by the browser to connect
MERCURE_PUBLIC_URL=https://feddit.online/.well-known/mercure
The secret used to sign the JWTs
MERCURE_JWT_SECRET=long_password_here_that_you_make_up
Docker
CADDY_MERCURE_URL=https://feddit.online/.well-known/mercure
CADDY_MERCURE_JWT_SECRET=long_password_here_that_you_make_up
###< symfony/mercure-bundle ######> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN=‘^https?://(kbin.localhost|127.0.0.1)(:[0-9]+)?$’
###< nelmio/cors-bundle ######> symfony/lock ###
Choose one of the stores below
postgresql+advisory://db_user:db_password@localhost/db_name
LOCK_DSN=flock
###< symfony/lock ######> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=
###< lexik/jwt-authentication-bundle ######> meteo-concept/hcaptcha-bundle ###
HCAPTCHA_SITE_KEY=<key>
HCAPTCHA_SECRET=<secret>
###< meteo-concept/hcaptcha-bundle ###Hot Damn, thanks. That should get me headed in the right direction anyway.
My last edit removes the markdown interpreter from messing up the text. I’m not sure if you saw it before I added the escape to make it more readable.
Anyway, I hope it goes well for you!
Ok, so it looks like I’m going to have to do a bit of jiggery pokery, as I don’t need caddy, I’ve already got an nginx reverse proxy running on the host. (I think they both provide similar functionality?)
-