Start the client dev server using pnpm dev:client and API / game servers with pnpm dev:server,
or traverse into client and server directories individually to run pnpm dev in each.
Accounts are optional. You can set accountsEnabled to false in config.ts to disable them.
If disabled, you can skip the steps below.
First generate a private key and set encryptLoadoutSecret to it, this is used to encrypt loadouts.
openssl rand -base64 10After installing PostgreSQL, start the service and create a database:
sudo -u postgres initdb --locale=C.UTF-8 --encoding=UTF8 -D /var/lib/postgres/data --data-checksums
systemctl enable --now postgresql.service
sudo -u postgres createuser survev
sudo -u postgres createdb survev -O survevThen populate the database with the schema:
cd server
# Run this everytime you make changes to schema.ts.
pnpm run db:generate
pnpm run db:migrate
# Start the server
pnpm run dev
# or
# pnpm run dev:api
# pnpm run dev:gameTo interact with the database through an interface:
pnpm run db:studio To wipe the database and start over:
# Set database permissions.
sudo -u postgres psql -c "ALTER USER survev WITH PASSWORD 'survev';"
# Wipe database.
pnpm run db:wipeNOTE: Do not run this in production!
Caching is disabled by default. Set cachingEnabled to true in config.ts to use it.
Install Redis:
sudo apt install redis-serverEnsure Redis starts on boot and is running:
systemctl enable --now redis-serverSee HOSTING.md
