Skip to content

Windows

These instructions are intended for the person who administers the instance, usually a more technical/operational profile.

Prerequisites (Windows 10/11)

  1. Install Docker Desktop:

  2. https://www.docker.com/products/docker-desktop

  3. Enable WSL 2 when prompted.

  4. Restart the computer.

Installation

  1. Download the repository and enter the folder using PowerShell or your preferred terminal:
git clone https://gitlab.com/yndexa/farinha.git
cd farinha
  1. Start Farinha using the Windows script:
.\run.bat

On the first run, run.bat:

  • creates the .env file automatically from .env-sample;
  • asks for the public Farinha address (in Portuguese and English). If you do not know it yet, press Enter to leave it blank and continue; you can edit .env later;
  • generates a safe SECRET_KEY;
  • creates an admin user 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.pem and privkey.pem in the certs folder 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

  1. Enter the folder where Farinha was installed:
cd farinha
  1. Stop, update, and start again:
.\down.bat
git pull
.\run.bat

If your instance has a specific internal procedure to stop/start containers, follow that procedure before updating the repository.

Good practices

  • Write down the admin user password shown on the first run; it is not displayed again.
  • Keep DEBUG=False in .env in real installations.
  • Back up the database (db) before updates and keep the certs folder 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.bat again.
  • The script stops without starting: check that SECRET_KEY is present in .env and does not contain $.
  • I lost the admin user password: create another superuser from the terminal, inside the container:
docker compose -f docker-compose.prod.yml exec web python manage.py createsuperuser
  • I can only access via HTTP: with localhost or 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 changed ADMIN_PATH in .env. See SuperAdmin user.