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.
Requirements
Section titled “Requirements”- 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.ioto anhttp://URL other thanlocalhost. - It must be able to reach your database.
Environment variables
Section titled “Environment variables”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. |
Deploy a standalone Data API
Section titled “Deploy a standalone Data API”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:
- Push the generated project to a private git repository (the
.envfile is ignored). - Create a new web service from this repository.
- Set the environment variables listed above.
- Use
npm installas build command andnpm startas start command.
With Docker
Section titled “With Docker”FROM node:20-alpineWORKDIR /appCOPY package*.json ./RUN npm ci --omit=devCOPY . .ENV PORT=3020EXPOSE 3020CMD ["npm", "start"]docker build -t adminmate-data-api .docker run -p 3020:3020 --env-file .env.production adminmate-data-apiPut it behind your usual reverse proxy or load balancer to serve it over HTTPS.
Deploy with your existing Express app
Section titled “Deploy with your existing Express app”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.
Add the environment in the Dashboard
Section titled “Add the environment in the Dashboard”- Open Settings › Environments and add an environment, for example “Production”.
- Enter the URL of your Data API (without
/adminmate/api), for examplehttps://admin-api.example.com. - Open the environment from the project menu and enter its master password.
Then choose which teams can access this environment in their permissions.
Production checklist
Section titled “Production checklist”- Served over HTTPS
- Credentials stored as environment variables, not in the code
- A strong master password, different from your other environments
-
authorizedIpsset if your team works from fixed IP addresses (see IP filtering) -
trust proxyconfigured if you use IP filtering behind a proxy - Sensitive models read-only with options
- Teams configured with the minimum permissions they need