1. Start your local Fief instance¶
We provide a Docker image to help you start the Fief server locally in no time!
Quickstart command¶
Run the following command:
The command will ask you to give an email address for the first admin user. It'll be automatically created when starting the server.
The result of this command is a complete docker run
command with the required secrets generated and environment variables to help you get started. It'll look like the following:
docker run \
--name fief-server \
-p 8000:8000 \
-d \
-e "SECRET=XXX" \
-e "FIEF_CLIENT_ID=XXX" \
-e "FIEF_CLIENT_SECRET=XXX" \
-e "ENCRYPTION_KEY=XXX" \
-e "PORT=8000" \
-e "FIEF_DOMAIN=localhost:8000" \
-e "FIEF_MAIN_USER_EMAIL=anne@bretagne.duchy" \
-e "FIEF_MAIN_USER_PASSWORD=XXX" \
-e "CSRF_COOKIE_SECURE=False" \
-e "SESSION_DATA_COOKIE_SECURE=False" \
-e "USER_LOCALE_COOKIE_SECURE=False" \
-e "LOGIN_SESSION_COOKIE_SECURE=False" \
-e "SESSION_COOKIE_SECURE=False" \
-e "FIEF_ADMIN_SESSION_COOKIE_SECURE=False" \
ghcr.io/fief-dev/fief:latest
Save those secrets somewhere safe!
If you need to restart or recreate your container, you'll need to set the same secrets again. If you lose them, you'll likely lose access to data or have a bad configuration. Read more about secrets and environment variables.
Info
The container is available on the port 8000 of your local machine by default.
Good to go!¶
At this point, your Fief server should be up-and-running! Open http://localhost:8000/admin/ to access the admin dashboard. You'll be redirected to a login page. Authenticate with the user credentials you specified in the previous section.
You'll then be redirected to the admin dashboard.
Congratulations! Your Fief server instance is up-and-running 🎉 You can now try Fief features and start to integrate authentication in your app.
Tip
For production deployment, we strongly recommend you to go through the self-hosting documentation.