Run without Docker
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 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 the reverse proxy.
Steps
1. Clone the repository
git clone https://github.com/goniszewski/grimoire
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 it if you're using external PocketBase installation (default: http://pocketbase)
# Example: PUBLIC_POCKETBASE_URL=https://grimoire.mydomain.com:8090
PUBLIC_POCKETBASE_URL=
# RECOMMENDED: Change this to your email
ROOT_ADMIN_EMAIL=admin@grimoire.localhost
# RECOMMENDED: Use a secure password. Can be later changed in PocketBase's admin panel
ROOT_ADMIN_PASSWORD=changeme
# Set this to your domain name (default: http://localhost:5173)
# Example: PUBLIC_ORIGIN=grimoire.mydomain.com
PUBLIC_ORIGIN=http://localhost:5173
# Set this to true if you're using HTTPS (default: false)
# Example: PUBLIC_HTTPS_ONLY=true
PUBLIC_HTTPS_ONLY=
# 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 (default: false)
PUBLIC_SIGNUP_DISABLED=false
Update the value of PUBLIC_POCKETBASE_URL
to the URL of your PocketBase instance. If you are running PocketBase locally, you can set it to http://localhost:8090
.
Please remember: admins are separate from regular users and are authenticated using /admin/login
path.
For more information, please refer to the Admins vs Users section.
3. Run Pocketbase
Move the pocketbase executable to the project root directory and run it.
./pocketbase serve
4. Build and run the app
pnpm build && node -r dotenv/config build
In case the application stops, you can run it again without rebuilding it:
node -r dotenv/config build
Congratulations! You have successfully set up Grimoire without Docker.
Although the above setups are intended for development, they are also suitable for daily use. For a better experience, it is recommended to use a Node.js process manager, such as PM2.