Skip to content

First User Setup

After installing Slink, you need to create your first admin user. You can either set one up manually using CLI commands, or have one created automatically via environment variables on first startup (recommended for new installations).

If you prefer to set up your first user manually, or if you didn’t configure the admin environment variables during installation, follow these steps:

  1. Open your browser and navigate to the signup page: https://your-domain.com/profile/signup
  2. Fill in the registration form with your details
  3. Submit the form to create your account

If you have USER_APPROVAL_REQUIRED=true in your configuration, your account needs to be activated before you can log in:

Terminal window
docker exec -it slink slink user:activate --email=<your-email>

Grant yourself admin privileges:

Terminal window
docker exec -it slink slink user:grant:role \
--email=<your-email> ROLE_ADMIN

Navigate to the login page and use your credentials to access the application as an admin user.

When deploying Slink for the first time, you can preconfigure the first admin user using environment variables. This eliminates the need to manually activate users or assign admin roles via CLI commands after installation.

On the first container startup, if the ADMIN_EMAIL environment variable is set, Slink will automatically:

  1. Create a new user account with the specified credentials
  2. Assign the admin role to the user
  3. Activate the account (bypassing approval requirements)

Set the following environment variables in your Docker Compose file or Docker run command:

environment:
- ADMIN_USERNAME=administrator
- ADMIN_PASSWORD=YourSecurePassword123

For the full list of admin variables and their requirements, see Admin User (First-Run Setup) in the Environment Variables reference.

services:
slink:
image: anirdev/slink:latest
container_name: slink
environment:
- TZ=UTC
- ORIGIN=https://your-domain.com
# Admin user configuration (remove after first startup)
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=YourSecurePassword123
# Other settings...
- USER_APPROVAL_REQUIRED=true
- IMAGE_MAX_SIZE=15M
volumes:
- ./slink/var/data:/app/var/data
- ./slink/images:/app/slink/images
ports:
- '3000:3000'