Run without Docker
This guide was updated for the latest version of Grimoire (>0.4
).
There are times when you want to just stay away from Docker. Maybe you have a server with a different setup, or perhaps you don't like the idea of containers. Whatever the reason, we got you covered!
The steps required to run Grimoire without Docker are quite similar to the ones in the Development guide. But we will have to go through a few additional steps to set it up.
Prerequisites​
All prerequisites are meant for the machine that will be running Grimoire.
Steps​
Step 1: Clone the repository​
git clone https://github.com/goniszewski/grimoire
Step 2: Rename the .env.example
file to .env
and update it​
mv .env.example .env
Then update the .env
file to set the initial admin user credentials and other settings. The default values will look like this:
# Set this to your domain name (default: http://localhost:5173)
# Example: PUBLIC_ORIGIN=https://grimoire.yourdomain.com
PUBLIC_ORIGIN=http://localhost:5173
# Set this to true if you're using HTTPS (recommended for production)
PUBLIC_HTTPS_ONLY=false
# Change to the port you want the app to listen on (default: 5173)
# Example: PORT=80
PORT=5173
# Set this to true if you want to disable public signups (recommended for private instances)
PUBLIC_SIGNUP_DISABLED=false
Update these values according to your specific setup and security requirements:
PUBLIC_ORIGIN
: Set this to the full URL where Grimoire will be accessible, including the protocol (http://
orhttps://
).PUBLIC_HTTPS_ONLY
: Set totrue
if you're using HTTPS (recommended for production). When set totrue
, Grimoire will redirect all HTTP traffic to HTTPS and set the Secure flag on cookies.PORT
: This sets the internal port on which Grimoire will run. Default is5173
.PUBLIC_SIGNUP_DISABLED
: Set totrue
to disable public sign-ups (recommended for private instances).
Step 3: Build and run the app​
bun --bun run preview
Congratulations! You have successfully set up Grimoire without Docker.
Although the above setup is intended for development, it is also suitable for daily use. For a better experience in a production environment, it is recommended to use a Node.js process manager, such as PM2, and set up a reverse proxy like Nginx or Traefik for handling HTTPS and domain routing.
Troubleshooting​
Here are some common issues you might encounter and their solutions:
Grimoire is not accessible​
-
Check if the Grimoire process is running:
ps aux | grep "bun --bun"
If it's not listed, try restarting the application:
bun --bun run preview
-
Verify that the
PORT
in your.env
file matches the port you're trying to access. -
Check the application logs for any errors.
SSL certificate issues (if using HTTPS)​
- Ensure your domain's DNS is properly configured and pointing to your server.
- If you're using a reverse proxy, check its logs for certificate-related errors.
- Verify that ports
80
and443
are open on your firewall.
Application fails to start​
- Check the console output for any error messages when starting the application.
- Ensure all required environment variables are set correctly in your
.env
file. - Verify that you have the latest version of Bun installed.
If you're still experiencing issues, please check the Grimoire GitHub Issues or create a new issue with details about your setup and the problem you're facing.