How to setup Focalboard with Docker
2023-01-27, in:
Focalboard seems to be a nice self-hosted open-source software for managing your tasks. Deploying it with Docker however isn’t (at the moment of writing) as easy as it usually goes with other software.
If you visit the Docker Hub page you will notice that it displays the same README that you can find on GitHub repo. Even some links are dead because they are relative. A tiny section about docker only shows a single command to run the official image:
docker run -it -p 80:8000 mattermost/focalboard
But there is nothing about data persistence. There is no paths, no user id that runs the app inside container, the image itself doesn’t contain a shell, so you cannot enter into the running container to look around.
I will write a tutorial how you can solve such issues soon, meanwhile grab this tl;dr:
mkdir -p /tmp/focalboard/data
sudo chown 65534:65534 /tmp/focalboard/data
docker run -it -v "/tmp/focalboard/data:/data" -p 8000:8000 mattermost/focalboard
This will run the app with SQLite database. If you want to go further with configuration here is the path to the config
file: /opt/focalboard/config.json and default content (again, at moment of writing):
{
"serverRoot": "http://localhost:8000",
"port": 8000,
"dbtype": "sqlite3",
"dbconfig": "/data/focalboard.db",
"postgres_dbconfig": "dbname=focalboard sslmode=disable",
"useSSL": false,
"webpath": "./pack",
"filespath": "/data/files",
"telemetry": true,
"session_expire_time": 2592000,
"session_refresh_time": 18000,
"localOnly": false,
"enableLocalMode": true,
"localModeSocketLocation": "/var/tmp/focalboard_local.socket"
}