Windows¶
These instructions are intended for the person who administers the instance, usually a more technical/operational profile.
Prerequisites (Windows 10/11)¶
-
Install Docker Desktop:
-
https://www.docker.com/products/docker-desktop
-
Enable WSL 2 when prompted.
- Restart the computer.
Installation¶
- Download the repository and enter the folder using PowerShell or your preferred terminal:
- Start Farinha using the Windows script:
On the first run, run.bat:
- creates the
.envfile automatically from.env-sample; - asks for the public Farinha address (in Portuguese and English). If you do not know it yet, press
Enterto leave it blank and continue; you can edit.envlater; - generates a safe
SECRET_KEY; - creates an
adminuser with a random password, shown on the console only once. Write down the password before closing the window.
The automatic key does not contain $. If a manual SECRET_KEY contains $, the script warns that Docker Compose may interpret this character as an environment variable and offers to generate a new safe key.
HTTPS and certificates¶
Farinha uses Caddy to serve HTTPS:
- With a public address configured, free certificates are obtained and renewed automatically.
- To use your own certificates, place
fullchain.pemandprivkey.pemin thecertsfolder at the project root. - Without a public address and without your own certificates (for example,
localhost), HTTPS is disabled automatically.
See the details in Security and HTTPS, including the DISABLE_HTTPS variable and bot protection (Anubis).
Updating¶
- Enter the folder where Farinha was installed:
- Stop, update, and start again:
If your instance has a specific internal procedure to stop/start containers, follow that procedure before updating the repository.
Good practices¶
- Write down the
adminuser password shown on the first run; it is not displayed again. - Keep
DEBUG=Falsein.envin real installations. - Back up the database (
db) before updates and keep thecertsfolder if you use your own certificates. - Prefer updating by stopping and starting everything again (
down+pull+run), rather than recreating a single container.
Common problems¶
- “Docker Desktop is not running”: start Docker Desktop and run
run.batagain. - The script stops without starting: check that
SECRET_KEYis present in.envand does not contain$. - I lost the
adminuser password: create another superuser from the terminal, inside the container:
- I can only access via HTTP: with
localhostor an IP, HTTPS is disabled; configure a domain or your own certificates. See Security and HTTPS. - The internal panel does not open at
/admin/: someone may have changedADMIN_PATHin.env. See SuperAdmin user.