# Authentication

# With credentials

The immudb server runs on port 3322 as the default. The code examples below illustrate how to connect your client to the server and authenticate using default options and the default username and password. You can modify defaults on the immudb server in immudb.toml (opens new window) in the config folder.

# With Mutual TLS

To enable mutual authentication, a certificate chain must be provided to both the server and client. That will cause each to authenticate with the other simultaneously. In order to generate certs, use the generate.sh (opens new window) tool from immudb repository. It generates a list of folders containing certificates and private keys to set up a mTLS connection.

./generate.sh localhost mysecretpassword

# No Auth

You also have the option to run immudb with authentication disabled. This method is depreciated and not recommended.

A server configured with databases and user permissions can't be instantiated without authentication enabled. If a valid token is present, authentication is enabled by default.

$ ./immudb --auth=false