Skip to content

Deployment

During the installation, your Data API runs on your machine (http://localhost:3020). To let your team use Adminmate, deploy it on a server, then add it as an environment in the Dashboard.

  • The Data API must be reachable from the browsers of your team: the Dashboard calls it directly from the browser. A public URL, or a private one reachable through your VPN.
  • It must be served over HTTPS: browsers block calls from https://app.adminmate.io to an http:// URL other than localhost.
  • It must be able to reach your database.

Set these variables on your hosting provider instead of shipping the .env file:

Variable Value
AM_PROJECT_ID Your project ID.
AM_SECRET_KEY Your project secret key.
AM_AUTH_KEY A random string of at least 32 characters (openssl rand -hex 32).
AM_MASTER_PWD The master password of this environment.
AM_DB_URL The connection URL of your database (CLI-generated Data API only).
PORT The port to listen on, if your provider requires one. Defaults to 3020.

The Data API generated by the CLI is a standard Node.js app, started with npm start. It can be deployed anywhere Node.js runs: Render, Railway, Fly.io, Heroku, Google Cloud Run, AWS, a VPS…

The usual steps on a platform as a service:

  1. Push the generated project to a private git repository (the .env file is ignored).
  2. Create a new web service from this repository.
  3. Set the environment variables listed above.
  4. Use npm install as build command and npm start as start command.
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
ENV PORT=3020
EXPOSE 3020
CMD ["npm", "start"]
Terminal window
docker build -t adminmate-data-api .
docker run -p 3020:3020 --env-file .env.production adminmate-data-api

Put it behind your usual reverse proxy or load balancer to serve it over HTTPS.

If you added Adminmate to your own Express app, there is nothing specific to deploy: the Adminmate routes are deployed with your app, under /adminmate/api. Just set the AM_* environment variables on your servers.

In that case, the endpoint to use in the Dashboard is the base URL of your API, for example https://api.example.com.

  1. Open Settings › Environments and add an environment, for example “Production”.
  2. Enter the URL of your Data API (without /adminmate/api), for example https://admin-api.example.com.
  3. Open the environment from the project menu and enter its master password.

Then choose which teams can access this environment in their permissions.

  • Served over HTTPS
  • Credentials stored as environment variables, not in the code
  • A strong master password, different from your other environments
  • authorizedIps set if your team works from fixed IP addresses (see IP filtering)
  • trust proxy configured if you use IP filtering behind a proxy
  • Sensitive models read-only with options
  • Teams configured with the minimum permissions they need