# DRONE\_ADMIN not working as expected

**URL:** <https://drone.discourse.group/t/drone-admin-not-working-as-expected/10959>\
**Category:** Drone Support\
**Created:** [August 31, 2018, 9:43pm UTC](https://drone.discourse.group/t/drone-admin-not-working-as-expected/10959 "2018-08-31T21:43:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![southwel](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@southwel](https://drone.discourse.group/u/southwel)\
**Post date:** [August 31, 2018, 9:43pm UTC](https://drone.discourse.group/t/drone-admin-not-working-as-expected/10959/1 "2018-08-31T21:43:32Z")

</div>

I’m testing out the 0.9 version of drone along with the autoscaler on GCE and I’ve hit an issue where it doesn’t seem like DRONE\_ADMIN is being read. Here’s how I start the server container.

```
   docker run \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --volume=/var/lib/drone:/data \
  --env=DRONE_TLS_AUTOCERT=true \
  --env=DRONE_ORGS=MyCompany \
  --env=DRONE_ADMIN=southwel \
  --env=DRONE_GITHUB_CLIENT_ID=${DRONE_GITHUB_CLIENT_ID} \
  --env=DRONE_GITHUB_CLIENT_SECRET=${DRONE_GITHUB_CLIENT_SECRET} \
  --env=DRONE_SERVER_HOST=${DRONE_SERVER_HOST} \
  --env=DRONE_SERVER_PROTO=https \
  --env=DRONE_RUNNER_CAPACITY=0 \
  --env=DRONE_DATABASE_DATASOURCE=postgres://${DRONE_PSQL_USER}:${DRONE_PSQL_PASSWD}@${DRONE_PSQL_HOST}:${DRONE_PSQL_PORT}/drone\
  --env=DRONE_DATABASE_DRIVER=postgres \
  --env=DRONE_RPC_SECRET=forgetaboutit \
  --env=DRONE_LOGS_DEBUG=true \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:0.9.0-alpha.1

```

When I login I only get the options that a regular no admin user would get. No ability to add docker registry credentials etc.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [August 31, 2018, 9:47pm UTC](https://drone.discourse.group/t/drone-admin-not-working-as-expected/10959/2 "2018-08-31T21:47:31Z")

</div>

DRONE\_ADMIN is not a valid variable in 0.9

There have been a number of configuration changes (at [https://readme.drone.io/reference/](https://readme.drone.io/reference/)). All configuration parameters are documented, but this being an alpha, I haven’t created an upgrade guide yet.

---

<div class="post-metadata">

**Author:** ![southwel](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@southwel](https://drone.discourse.group/u/southwel)\
**Post date:** [August 31, 2018, 9:53pm UTC](https://drone.discourse.group/t/drone-admin-not-working-as-expected/10959/3 "2018-08-31T21:53:28Z")

</div>

Thanks! I looked there and in GitHub at the code, but didn’t see any obvious new equivalent. I’m guessing what I’m looking for is: [https://readme.drone.io/reference/server/drone-user-create/](https://readme.drone.io/reference/server/drone-user-create/)

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [August 31, 2018, 9:56pm UTC](https://drone.discourse.group/t/drone-admin-not-working-as-expected/10959/4 "2018-08-31T21:56:04Z")

</div>

Yes, DRONE\_USER\_CREATE is exactly what you want. It will boostrap the system with a new user account. You can use this to create the first admin user (or an admin machine account) which can be used to then spawn new users.

Whether or not a user is an administrator is now stored in the database. I will eventually be adding screens to the user-interface to manage users, prior to the 0.9-rc.1 release which is still a couple of weeks away.

---

<div class="post-metadata">

**Author:** ![hoo2](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/hoo2/32/5463_2.png) [@hoo2](https://drone.discourse.group/u/hoo2)\
**Post date:** [March 26, 2019, 9:47am UTC](https://drone.discourse.group/t/drone-admin-not-working-as-expected/10959/5 "2019-03-26T09:47:20Z")

</div>

How is this possible? We just add a:  
–env=DRONE\_USER\_CREATE=usename:myname, machine:false,admin=true,token:mypassword   
line to docker run command?  
What exactly is token? [https://readme.drone.io/reference/server/drone-user-create/](https://readme.drone.io/reference/server/drone-user-create/) is not very clear on that.
